Skip to main content
reopt Handbook
reopt Handbook
Enterprise Eve Agent Development

Core Architecture

Ch1. Eve Mental ModelCh2. Source Code AtlasCh3. Project Layout and DiscoveryCh4. Compiler and Runtime Graph

Agent Quality Design

Ch5. agent.ts, Models, CompactionCh6. Context, Skills, Dynamic CapabilitiesCh7. Tools, Approval, ConnectionsCh8. Sandbox Secure Runtime

Operational Runtime

Ch9. Channels, Auth, StreamingCh10. Subagents, Workflows, Remote AgentsCh11. Schedules, State, HooksCh12. Evals and Quality Gates

Production Operations

Ch13. Observability and DeploymentCh14. Enterprise PatternsCh15. Migration and Governance

Appendix

Official Docs CrosswalkVerification ReportUpdates
Handbook›엔터프라이즈 Eve 에이전트›Ch10. Subagents, Workflows, Remote Agents
한국어KOEnglishEN

Ch10. Subagents, Workflows, Remote Agents

Design Eve 0.82.0 task-based delegation, root copies, isolated specialists, structured output, workflows, and remote authentication.

Written and reviewed by Eric Han · Co-founder & CTO, reopt

Key takeaways

  • Model-facing subagent calls return a receipt with taskId; the child's reply arrives later as a task result.
  • The built-in agent is root-only and shares its sandbox. Declared specialists own their tools, instructions, and sandbox.
  • Await dependent work explicitly in a workflow and request structured output on the child's send call.

Delegation and isolation

ModeContractUse
Root built-in agentRoot copy, shared sandbox, fresh history/stateParallel work with separate write scopes
Declared local subagentIndependent authored capabilities and sandboxSpecialist roles and reduced authority
Remote agentSeparate deployment and outbound authenticationSeparate service/team ownership

Root copies do not receive the root-only agent tool recursively. Give parallel children non-overlapping writes. Children do not automatically receive parent conversation history; send necessary evidence and scope in the message.

Distinguish acceptance from completion

Model-facing local and remote subagent calls run as tasks. The parent can continue after receiving a receipt, but its turn does not end while the child is working. Reuse taskId for follow-up messages; a child failure fails the task.

interface DelegationInput {
  message: string;
  taskId?: string;
}

Do not trigger dependent work on acceptance alone. For review-then-publish, await the child result inside an authored workflow before continuing. eve__task_wait waits; eve__task_cancel cancels current work.

Declared specialist

agent/subagents/reviewer/agent.ts
import { defineAgent } from "eve";

export default defineAgent({
  description: "Review proposed operations for risk and missing approvals.",
  model: "anthropic/claude-opus-5.5",
  tool: false,
});

Description is required. tool: false hides the direct model-facing tool but does not prevent workflow ctx.agent calls. Review the child's instructions, tools, connections, skills, and sandbox separately.

Await structured results in a workflow

agent/tools/review_plan.ts
import { defineWorkflowTool } from "eve/tools";
import { z } from "zod";

export default defineWorkflowTool({
  description: "Obtain a structured risk review of a proposed plan.",
  inputSchema: z.object({ plan: z.string() }),
  async execute({ plan }, ctx) {
    "use workflow";
    const reviewer = ctx.agent("reviewer");
    const response = await reviewer.send(plan, {
      outputSchema: z.object({
        risk: z.enum(["low", "medium", "high"]),
        findings: z.array(z.string()),
      }),
      signal: ctx.abortSignal,
    });
    const result = await response.result();
    if (!result.data) throw new Error("Missing structured review.");
    return result.data;
  },
});

ctx.agent and ctx.ask belong to workflow bodies, not ordinary tools or channel/schedule handlers. Put side effects, clocks, randomness, and environment access in use-step helpers. Sensitive follow-up actions also need execution-time authorization and approval.

Model-generated workflows

Replace the old ExperimentalWorkflow export with this factory:

agent/tools/workflow.ts
import { workflow } from "eve/tools/workflow";

export default workflow({ maxSubagents: 20 });

The generated program's host capability is limited to ctx.agent(name, { message, outputSchema? }). It has no direct ordinary-tool, credential, or arbitrary-import access. Each call creates a new child session; the return must be JSON-serializable. maxSubagents defaults to 100 and accepts 1–128. Promise.all supports fan-out; Promise.race does not resume immediately after only one child settles. This tool also runs as a task, so wait for its result.

Remote agents and identity

agent/subagents/weather.ts
import { defineRemoteAgent } from "eve";
import { vercelOidc } from "eve/agents/auth";

export default defineRemoteAgent({
  url: "https://weather-agent.example.com",
  description: "Answers weather and forecast questions.",
  auth: vercelOidc(),
});

Configure outbound authentication and receiving-side validation. forwardPrincipal defaults to false; enable identity forwarding only when the receiver explicitly trusts the caller. Deployment authentication does not automatically authorize the end user or tenant. Remote model, usage limits, and retention belong to that deployment.

Release regressions

CheckExpected result
Root-copy recursionChildren cannot recursively use the root-only agent tool
Shared filesConcurrent child writes do not overlap
Acceptance/completionReceipt is not reported as successful task completion
SchemaValidate each requested turn and handle absent/error results
Cancellation/usageVerify parent/child cancellation and aggregation
Remote identityTest invalid tokens, wrong tenants, and forwarding policy

Subagents · Workflow tools · Remote agents.

Related docs

Ch4. Compiler and Runtime Graph

How Eve transforms source manifests into compiled manifests and runtime agent graphs.

Ch3. Project Layout and Discovery

How Eve turns agent directory slots into a source manifest, and why path-derived identity is an operations contract.

Cloud Tasks

Advanced Codex Usage · Use remote Codex tasks for parallel attempts, long work, and reviewable outputs.

Subagents

Claude Code Complete Guide · Delegate bounded work while keeping the main Claude Code session accountable.

Case: OpenAI

Harness Engineering · Analyze OpenAI's harness view through repo-readability, observability, sandboxing, runtime surface, and cleanup.

Ch9. Channels, Auth, Streaming

How Eve channels own session creation, continuation tokens, route auth, NDJSON streams, and frontend/client integration.

Ch11. Schedules, State, Hooks

Connect Eve cron schedules, durable state, and stream-event hooks to automation, memory, and audit.

On this page

Delegation and isolationDistinguish acceptance from completionDeclared specialistAwait structured results in a workflowModel-generated workflowsRemote agents and identityRelease regressions