Ch10. Subagents, Workflows, Remote Agents
Use Eve built-in agent tool, declared subagents, remote agents, and experimental Workflow for multi-agent design.
핵심 요약
- Eve subagents are delegation units with their own sessions, not simple function calls.
- Built-in
agentshares parent capabilities; declared subagents have their own tools, skills, sandbox, and state. - Remote agents and experimental Workflow need explicit output schemas, auth, and failure policy.
Subagents are how Eve breaks work into smaller durable runs. Use them for quality, specialization, and authority reduction.
Two Subagent Types
| Type | Defined by | Authority/state |
|---|---|---|
built-in agent tool | current agent copy | shares parent tools/sandbox, fresh history/state |
| declared subagent | agent/subagents/<id>/ | own tools, skills, sandbox, state |
Built-in agent Tool
The built-in agent tool launches a fresh copy of the current agent for parallel or focused work. It is useful for decomposition but is not a security boundary because it shares the parent's capability surface.
Use it for:
- parallel summarization
- drafting alternatives
- independent analysis of the same evidence
Avoid it when authority must be reduced.
Declared Subagent
agent/subagents/researcher/
├── agent.ts
├── instructions.md
├── tools/
└── skills/import { defineAgent } from "eve";
export default defineAgent({
description: "Research internal documentation and return cited findings.",
model: "anthropic/claude-opus-4.8",
});The description is required because the parent model uses it to decide when to delegate.
Isolation Boundary
| Surface | Shared with parent? |
|---|---|
| history | no |
| state | no |
| skills | no |
| tools | no |
| sandbox | separate for declared subagent |
| channel metadata | projected from parent where applicable |
This is why declared subagents are useful for least-privilege architecture. Give a researcher read-only connections and an operator approval-gated write tools.
What The Parent Sees
The parent receives the subagent result, not all internal reasoning. Use outputSchema when the parent needs a stable machine-readable contract.
outputSchema: z.object({
finding: z.string(),
citations: z.array(z.string()),
risk: z.enum(["low", "medium", "high"]),
});Remote Agents
Remote agents let one Eve deployment call another deployment as a subagent.
import { defineRemoteAgent } from "eve/agents";
import { vercelOidc } from "eve/agents/auth";
export default defineRemoteAgent({
url: "https://data-reviewer.example.com",
description: "Reviews warehouse analysis plans for privacy and cost risk.",
auth: vercelOidc(),
});Use remote agents when:
- ownership belongs to another team
- the capability has its own deploy cadence
- data boundaries require a separate service
- scaling characteristics differ
Remote Auth
| Auth pattern | Use |
|---|---|
vercelOidc() | Vercel deployment-to-deployment trust |
| bearer/header function | custom service auth |
| no auth | local development only |
Remote agents are production APIs. Treat them like external services with SLOs, auth, versioning, and incident ownership.
Experimental Workflow
ExperimentalWorkflow lets the model write JavaScript to orchestrate subagents inside a durable step.
export { ExperimentalWorkflow as default } from "eve/tools";Use it narrowly:
- only subagent orchestration
- no direct filesystem/network/arbitrary imports
- no sensitive side effects inside workflow code
- strong eval coverage
Orchestration Patterns
| Pattern | Structure | Use |
|---|---|---|
| Fan-out/fan-in | parent calls multiple subagents and aggregates | research, review, analysis |
| Specialist chain | researcher -> reviewer -> operator | safe execution pipeline |
| Authority split | read-only agent vs write agent | compliance and approval |
| Remote portfolio | team-owned remote agents | organizational scaling |
| Human proxy | child HITL surfaced through parent channel | unified approval UX |
Evaluation Criteria
| Concern | Eval |
|---|---|
| delegation | parent calls expected subagent |
| isolation | child cannot call parent-only tool |
| output contract | schema validation |
| failure | parent handles child failure |
| HITL proxy | child approval reaches user |
| cost | subagent fan-out bounded |