Build durable backend agents with eve Beta
You are a concise assistant. Use tools when they are available.import { defineAgent } from 'eve';
export default defineAgent({
model: 'openai/gpt-5.4-mini',
});import { defineTool } from 'eve/tools';
import { z } from 'zod';
export default defineTool({
description: 'Get the current weather for a city.',
inputSchema: z.object({ city: z.string() }),
async execute({ city }) {
return { city, condition: 'Sunny', temperatureF: 72 };
},
});# Run against a local eve agent
curl -X POST http://127.0.0.1:3000/eve/v1/session \
-H 'content-type: application/json' \
-d '{"message":"What is the weather in Brooklyn?"}'These docs cover deploying and running eve on Vercel. In this environment, the compiled app runs on Vercel Functions and integrates with these services:
- Vercel Workflows persist session state and resume interrupted work.
- Vercel Sandbox isolates code execution.
- AI Gateway routes model requests and handles provider fallbacks.
- Vercel Connect manages OAuth tokens and API keys for eve connections and channels.
- Vercel Observability shows agent runs, token usage, and performance.
The eve CLI scaffolds a new agent project, installs dependencies, initializes Git, and starts the development server.
npx eve@latest init my-agentTo add eve to an existing app, follow the quickstart steps.
Follow the generated README for the project-specific dev command, or run the agent locally with the standard script from the scaffold:
pnpm devSee the eve Getting Started guide for the complete setup, local development, and first-session walkthrough.
A minimal agent is two files. agent/instructions.md:
You are a concise assistant. Use tools when they are available.And agent/agent.ts:
import { defineAgent } from 'eve';
export default defineAgent({
model: 'openai/gpt-5.4-mini',
});eve resolves model strings such as openai/gpt-5.4-mini through AI Gateway, so
on Vercel you authenticate with OIDC and don't need to manage provider API keys.
Each file in agent/tools/ is one tool. Create agent/tools/get_weather.ts:
import { defineTool } from 'eve/tools';
import { z } from 'zod';
// The runtime tool name comes from the filename, so the model sees `get_weather`.
export default defineTool({
description: 'Get the current weather for a city.',
inputSchema: z.object({
city: z.string(),
}),
async execute(input) {
return { city: input.city, condition: 'Sunny', temperatureF: 72 };
},
});Start a durable session and stream its output:
curl -X POST http://127.0.0.1:3000/eve/v1/session \
-H 'content-type: application/json' \
-d '{"message":"What is the weather in Brooklyn?"}'The response returns a continuationToken in the body and an x-eve-session-id header. Attach to
the session stream to receive NDJSON lifecycle events:
curl http://127.0.0.1:3000/eve/v1/session/<sessionId>/stream- Agent project: Author an agent from files under
agent/, including instructions, runtime config, tools, skills, channels, connections, and a sandbox. - Durable sessions: Create sessions that stream incremental output and resume after cold starts, deploys, or long pauses.
- Tools and skills: Give the model typed actions and load larger procedures only when relevant.
- Agent Runs: Inspect sessions, turns, tools, reasoning, timing, and token usage in the Vercel dashboard.
Deploy an eve template to start building AI agents that use Vercel Connect to securely access third-party services and APIs:
eve documentation
Explore the complete framework documentation, including guides, channels, tools, skills, and API references.
Concepts
Learn how eve agents, sessions, channels, tools, skills, connections, and sandboxes fit together.
Pricing and Limits
Understand how eve usage maps to Vercel resources and inherited platform limits.
Observability
Inspect agent runs in the Vercel dashboard with no setup, and optionally export AI SDK spans through OpenTelemetry.
Was this helpful?


