Every eve session is a durable conversation. It can run for days and survive process restarts and redeploys without any additional configuration on your part. You write the capabilities — tools, instructions, channels — and eve runs the loop. This page explains how that loop is structured, how durability is achieved, and what happens when things go wrong.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/vercel/eve/llms.txt
Use this file to discover all available pages before exploring further.
Sessions, turns, and steps
Work inside eve nests in three levels:| Level | Scope |
|---|---|
| session | The whole durable conversation or task. Long-lived — can span many requests over days or weeks without losing context. |
| turn | One user message and all the work it triggers (model calls, tool calls, reasoning) until the agent produces its response. |
| step | A durable checkpoint inside a turn — one model call and the tool calls it makes. |
You never write workflow code directly. Workflow primitives (
start(), resumeHook(), and so on) are an implementation detail of eve’s runtime layer. Two surfaces give your own code access to session data: tools read the current session’s metadata via ctx.session, and defineState reads or writes session-scoped durable state.Durable by default: the Workflow SDK
The Workflow SDK is not inherently tied to Vercel. The active world determines how workflows are persisted and dispatched:- Local development /
eve start: uses the SDK’s local world by default. Workflow runs are persisted on disk (normally under.workflow-data) and dispatched through the same Nitro-hosted workflow routes. - Vercel deployment: the same workflow code runs against Vercel Workflow, which adds platform features such as latest production deployment routing and dashboard run metadata.
agent/sandbox or defaultBackend().
When a Vercel production deployment changes, the next model turn in an existing session uses that deployment’s current instructions, model, and tools. The durable session keeps its conversation history and authored state, so identity-based channels (Telegram private chats, Twilio phone-number conversations) adopt agent updates without requiring a new session.
Vercel vs. self-hosted: workflow world differences
For advanced self-hosted deployments, select the installed Workflow world package usingexperimental.workflow.world in agent/agent.ts:
agent/agent.ts
agent.ts. See Workflow Worlds for available implementations.
Resuming after a crash
Crash the process, hit a timeout, or redeploy mid-turn, and the run picks up from the last completed step rather than replaying the whole turn.Step completes and is checkpointed
eve serializes the step result to durable state before moving on.
Process crashes or is redeployed
The in-flight turn is interrupted. The workflow run is marked as needing recovery.
Parked work: human-in-the-loop, OAuth, subagents
Some work has to wait. At those points the turn parks durably:- Human approval: a tool gated on human approval suspends the turn.
- Interactive OAuth: a connection initiating a sign-in flow parks while the user completes it.
- Long-running subagents: a delegated subagent running in its own session parks the parent until the child completes.
Message delivery and queueing
eve does not maintain a durable FIFO queue of user messages for a session. Understanding this distinction is important for building reliable agents.The
continuationToken is a resume handle for the session’s current workflow hook, not a general message-queue address. Only one active session can own a continuation token at a time.- When a session is waiting, delivering to the current continuation token wakes the session and starts the next turn.
- When a turn is already active, the hook may accept additional deliveries, but the runtime only drains them at specific workflow boundaries. If more than one delivery is ready when the driver checks, eve may fold them into the next turn — this drain is best-effort and depends on workflow and transport timing.
- A competing session that tries to claim an already-owned token is rejected, not queued.
session.waiting before sending the next message to the same session. If your channel can receive bursts while the agent is working, maintain your own per-session queue in the channel or app layer, then deliver the next message after the session parks again.
Session history ordering
Conversation history within a session is append-only. Turns land in order, and the tool calls inside a turn (plus their results) keep their order too. Reading a session back shows events in the order they happened.Subagents
A turn can hand work off to a subagent. Each subagent gets its own context and its own durable session. A declared subagent also gets its own sandbox, skills, and state. Nothing crosses the boundary implicitly — the parent session only sees what the child explicitly returns.Sessions & Streaming
The handles you hold and the event stream you watch.
Security Model
The trust boundaries the runtime enforces.
Context Control
Managing what the model sees across instructions, skills, and subagents.
Workflow Worlds
Available world implementations for self-hosted deployments.