Skip to main content

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.

The public surface of the eve package is a set of define* helpers you author with, a runtime ctx object passed to each handler, and a set of secondary helpers for routing, approval, and auth. Everything exported lives in packages/eve/src/public/index.ts; anything not exported there is a framework internal. Identity comes from the filesystem, not a field you set. A tool at agent/tools/get_weather.ts is get_weather, and a connection at agent/connections/linear.ts is linear, so no definition carries a name or id. Most authored files share the same shape: import a helper, call it, and default-export the result.
agent/agent.ts
import { defineAgent } from "eve";

export default defineAgent({ model: "anthropic/claude-opus-4.8" });
agent/tools/get_weather.ts
import { defineTool } from "eve/tools";
import { z } from "zod";

export default defineTool({
  description: "Get the weather for a city.",
  inputSchema: z.object({ city: z.string() }),
  async execute({ city }, ctx) {
    return { city, condition: "Sunny" };
  },
});

The define* helpers

HelperImport fromAuthored atDescription
defineAgenteveagent/agent.tsDeclare the root agent: model, modelOptions, compaction, build, and experimental config
defineRemoteAgenteveagent/subagents/<id>/agent.tsDeclare a remote agent that the root can delegate to
defineTooleve/toolsagent/tools/<name>.tsDeclare a typed, executable tool with an input schema and execute handler
defineDynamiceve/tools, eve/skills, eve/instructionsagent/{tools,skills,instructions}/Declare a resolver that re-evaluates tool, skill, or instruction lists at runtime
disableTooleve/toolstools, hooksReturn from a dynamic resolver to remove a built-in or authored tool from the active set
defineMcpClientConnectioneve/connectionsagent/connections/<name>.tsDeclare an MCP client connection to a remote MCP server
defineOpenAPIConnectioneve/connectionsagent/connections/<name>.tsDeclare an OpenAPI connection that generates tools from a spec
defineChanneleve/channelsagent/channels/<name>.tsDeclare a custom HTTP or messaging channel with lifecycle handlers
eveChanneleve/channels/eveagent/channels/eve.tsThe built-in eve web channel factory
slackChanneleve/channels/slackagent/channels/slack.tsThe Slack channel factory
discordChanneleve/channels/discordagent/channels/discord.tsThe Discord channel factory
teamsChanneleve/channels/teamsagent/channels/teams.tsThe Microsoft Teams channel factory
telegramChanneleve/channels/telegramagent/channels/telegram.tsThe Telegram channel factory
twilioChanneleve/channels/twilioagent/channels/twilio.tsThe Twilio SMS/voice channel factory
githubChanneleve/channels/githubagent/channels/github.tsThe GitHub channel factory
linearChanneleve/channels/linearagent/channels/linear.tsThe Linear channel factory
defineSkilleve/skillsagent/skills/<name>.tsDeclare a module-backed skill (procedure or capability pack)
defineInstructionseve/instructionsagent/instructions.tsDeclare a module-backed system-prompt contribution
defineHookeve/hooksagent/hooks/<slug>.tsSubscribe to lifecycle events and session-stream events
defineScheduleeve/schedulesagent/schedules/<name>.tsDeclare a recurring job with a cron expression and prompt
defineStateeve/contexttools, hooks, lifecycleDeclare a named, typed session-scoped state slice
defineSandboxeve/sandboxagent/sandbox.tsDeclare the agent’s sandbox backend and configuration
defineInstrumentationeve/instrumentationagent/instrumentation.tsDeclare OTel exporter settings and AI SDK span configuration
defineEvaleve/evalsevals/*.eval.tsDeclare a single eval case with inputs, assertions, and optional scoring
defineEvalConfigeve/evalsevals/evals.config.tsDeclare project-level eval configuration (reporters, timeouts, thresholds)
useEveAgenteve/react, eve/vue, eve/sveltefrontend componentsReact/Vue/Svelte hook for connecting to an agent session from the browser
defineDynamic is exported from three packages — eve/tools, eve/skills, and eve/instructions — because dynamic resolvers are slot-specific. Import it from the package that matches the slot you’re resolving.

Runtime context (ctx)

ctx is passed to your tool execute handlers, hook handlers, and channel event handlers. It is live only while authored code is running; reaching for it at module top level throws.
MemberUse
ctx.sessionCurrent session, turn, auth, and optional parent lineage (read-only)
ctx.getSandbox()Resolve the live sandbox handle for the current agent
ctx.getSkill(identifier)Resolve a handle for a named skill visible to the current agent
ctx.getToken(provider)Resolve a bearer token for an inline auth provider such as connect("...")
ctx.requireAuth(provider)Evict and re-authorize an inline provider, commonly after a downstream 401
ctx is scoped to a single handler invocation. Do not store it in a module-level variable or use it after the handler returns — the framework will throw.

Imports at a glance

ImportHolds
evedefineAgent, defineRemoteAgent, agent config types (AgentDefinition, AgentWorkflowDefinition, AgentWorkflowWorldDefinition, etc.)
eve/toolsdefineTool, defineDynamic, disableTool, ExperimentalWorkflow
eve/tools/defaultsBuilt-in tools as plain values: bash, readFile, writeFile, glob, grep, webFetch, webSearch, todo, loadSkill
eve/tools/approvalApproval predicates: always, once, never
eve/connectionsdefineMcpClientConnection, defineOpenAPIConnection
eve/channelsdefineChannel, route verbs (GET, POST, PUT, PATCH, DELETE, WS)
eve/channels/eveeveChannel
eve/channels/authChannel auth helpers: localDev, vercelOidc, placeholderAuth
eve/channels/slackslackChannel
eve/channels/discorddiscordChannel
eve/channels/teamsteamsChannel
eve/channels/telegramtelegramChannel
eve/channels/twiliotwilioChannel
eve/channels/githubgithubChannel
eve/channels/linearlinearChannel
eve/hooksdefineHook
eve/schedulesdefineSchedule
eve/skillsdefineSkill, defineDynamic
eve/instructionsdefineInstructions, defineDynamic
eve/contextdefineState, session and state types
eve/sandboxdefineSandbox, sandbox backends
eve/instrumentationdefineInstrumentation, isChannel
eve/evalsdefineEval, defineEvalConfig, eval types
eve/evals/expectAssertion helpers: includes, equals, matches, similarity
eve/evals/reportersReporter integrations: Braintrust, JUnit, EvalReporter
eve/evals/loadersDataset loaders: loadJson, loadYaml
eve/reactuseEveAgent (React)
eve/vueuseEveAgent (Vue)
eve/svelteuseEveAgent (Svelte)
eve/nextNext.js bundler plugin
eve/nuxtNuxt bundler plugin
eve/sveltekitSvelteKit bundler plugin
eve/clientClient, ClientSession for server-to-server and scripting use
Exported types ship from the same entrypoint as the helper they describe — for example, ToolDefinition and ToolContext come from eve/tools. For the exhaustive list, read packages/eve/src/public/index.ts.

Non-define* helpers

Route verbs

Imported from eve/channels, used inside defineChannel to declare HTTP route handlers:
import { defineChannel, GET, POST, WS } from "eve/channels";
Available verbs: GET, POST, PUT, PATCH, DELETE, WS.

Approval predicates

Imported from eve/tools/approval, used in tool definitions to control when the agent asks for human approval before executing:
import { always, once, never } from "eve/tools/approval";

export default defineTool({
  approval: always(),
  // ...
});
PredicateMeaning
always()Always require approval before executing
once()Require approval once per session
never()Never require approval (framework default)

Channel auth helpers

Imported from eve/channels/auth, used in defineChannel to protect channel routes:
import { localDev, vercelOidc, placeholderAuth } from "eve/channels/auth";
HelperMeaning
localDev()Allow anonymous loopback requests in local development
vercelOidc()Require a valid Vercel OIDC bearer token in deployed environments
placeholderAuth()Stub auth — marks a route as intentionally unprotected

Default tool values

To wrap or disable a built-in tool, import its default value from eve/tools/defaults:
import { bash, readFile, writeFile, glob, grep, webFetch, webSearch, todo, loadSkill } from "eve/tools/defaults";
These are plain values representing the built-in tools — pass them to disableTool or use them as a base for a dynamic resolver.

Project Layout

Where each define* file lives on disk

HTTP API

Sessions, streaming, and follow-up messages

Build docs developers (and LLMs) love