A subagent is a child agent that one agent delegates a focused subtask to. Split work into a subagent to run it in parallel, to give the child a narrower tool surface, or to give a specialist its own identity and instructions. There are two kinds: the built-inDocumentation 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.
agent tool (a copy of the agent itself), and declared subagents (specialists with their own directory under agent/subagents/).
The built-in agent tool
Every agent gets an agent tool by default. The model calls it to delegate a subtask to a copy of itself. The copy shares the parent’s sandbox and tools, and its file writes are immediately visible to the parent — which makes parallel fan-out natural:
agent, the child is a copy of that subagent, not the root.
An authored tool at
agent/tools/agent.ts takes priority over the built-in agent tool.Declared subagents
A declared subagent lives underagent/subagents/<id>/ and uses the same defineAgent helper as the root. Its location under subagents/ is the only thing that marks it as a subagent. Declare one when the child needs a clearly different prompt, role, or tool surface.
agent/subagents/researcher/agent.ts
description is required on every declared subagent. The parent reads it to decide whether to delegate, so the compiler rejects any subagent agent.ts that omits it.
Minimum file structure
schedules/ and channels/ are not supported inside declared subagents — those are root-only.
The isolation boundary
A declared subagent inherits nothing from the root’s authored slots. Discovery treats its directory as its own agent root. An absent slot falls back to the framework default, not to the root’s version.| Slot | Built-in agent tool | Declared subagent |
|---|---|---|
| Instructions | Inherited (copy of the agent) | Own instructions.{md,ts}, optional |
| Tools | Inherited | Own tools/ |
| Connections | Inherited | Own connections/ |
| Skills | Inherited | Own skills/ |
| Sandbox | Shared with parent | Own sandbox/, else framework default |
| Hooks | Inherited | Own hooks/ |
| State | Fresh | Fresh |
| Channels | Root-only | Root-only |
| Schedules | Root-only | Root-only |
skills/ directory, or share typed helpers via lib/. defineState is never shared — each child starts with fresh durable state.
What the parent sees
eve lowers every subagent into a model-visible tool with the{ message, outputSchema? } input shape. A declared subagent’s tool name is the bare path-derived name, with no prefix. agent/subagents/researcher/ registers as the tool researcher.
The parent packs message with everything the child needs, since the child never sees the parent’s history. Set outputSchema to run the child in task mode, returning structured output as the tool result:
agent/subagents/researcher/agent.ts
Nested subagents
Subagents can have their own subagents. A nested subagent follows the same rules — its own directory, its own isolation boundary, its ownagent.ts with a description:
Monitoring child sessions
Each delegated subagent spins up its own child session and stream. The parent stream carries only the control-plane eventssubagent.called and subagent.completed. To follow the child’s full progress, read subagent.called.data.childSessionId and subscribe at GET /eve/v1/session/:childSessionId/stream.
Remote agents
To call another eve deployment as a subagent, usedefineRemoteAgent from 'eve':
agent/subagents/remote-researcher/agent.ts
When to use a subagent vs a skill
Split out a subagent when the task needs a different prompt or specialist role, a narrower tool surface, or its own runtime context. If the agent can keep its identity and only needs an optional procedure, a skill is the lighter choice.Do not rely on subagent delegation alone as an approval boundary. Put sensitive tools behind
needsApproval, connection approval, route/session authorization, or other controls wherever those tools can be called.Data handling
The parent transfers data to the child through themessage input. Do not include sensitive data in a subagent request unless that child and its inherited tools, connections, sandbox, and telemetry path are appropriate for that data.