Build agents with your existing stack
Keep your app, hosting, and model provider. Cereal runs durable agent sessions.
Cereal runs agents for your application. Keep your language, framework, database, authentication, and model provider. Define what the agent does and connect the tools it can use; Cereal manages execution, session history, sandboxes, traces, and prompt caching.
Your app can run on serverless functions or an existing server. It sends requests to Cereal and handles tool callbacks without keeping the agent loop alive between requests. You do not need a new application backend or an always-on worker for the agent.
Run your first agent
Understand the agent definition
Connect your application
Look up an API call
What Cereal handles
| Capability | What it does for your app |
|---|---|
| Durable sessions | Saves conversation state and records model and tool work independently of your app's request lifetime. |
| Tools and approvals | Calls your tools and pauses for decisions when your policy requires them. |
| Sandboxes | Provisions a workspace when an agent needs to run commands or work with files. |
| Traces and usage | Shows model requests, tool calls, timing, token usage, and reported cache activity. |
| Context and caching | Compacts long conversations and keeps prompt prefixes stable for providers that support caching. |
| Streaming | Delivers session updates to your UI with scoped access and reconnect support. |
Your model calls use credentials you register for a supported provider. Custom tools run in your application, with your permission checks and database access. Tool results pass through Cereal and can be stored in session history and traces.
Start with one definition
An agent definition describes reusable behavior. A session pins a version of that definition. A turn is the work triggered by a message, which can include several model requests and tool calls.
Start with the agent definition, then add only the capabilities your application needs. The research-agent tutorial walks through tools, chat, customer access, approvals, and application deployment.