본문으로 바로가기
리옵트 핸드북
리옵트 핸드북
엔터프라이즈 Eve 에이전트 개발

기초 아키텍처

Ch1. Eve 멘탈 모델Ch2. 소스 코드 지도Ch3. 프로젝트 레이아웃과 DiscoveryCh4. Compiler와 Runtime Graph

에이전트 품질 설계

Ch5. agent.ts, 모델, 컴팩션Ch6. Context, Skills, Dynamic CapabilitiesCh7. Tools, Approval, ConnectionsCh8. Sandbox 보안 런타임

운영 런타임

Ch9. Channels, Auth, StreamingCh10. Subagents, Workflows, Remote AgentsCh11. Schedules, State, HooksCh12. Evals와 품질 게이트

프로덕션 운영

Ch13. Observability와 DeploymentCh14. Enterprise PatternsCh15. Migration과 Governance

부록

공식 문서 대조표검증 리포트업데이트 내역
핸드북›엔터프라이즈 Eve 에이전트›Ch10. Subagents, Workflows, Remote Agents
한국어English

Ch10. Subagents, Workflows, Remote Agents

Eve의 built-in agent tool, declared subagents, remote agents, experimental Workflow를 활용한 멀티에이전트 설계를 정리한다.

핵심 요약

  • Eve subagent는 별도 session에서 도는 delegation 단위이며 병렬 처리와 권한 축소 경계로 쓸 수 있습니다.
  • built-in agent tool은 parent 능력을 공유하고, declared subagent는 tools/skills/sandbox/state를 따로 둡니다.
  • remote agent와 experimental Workflow는 오케스트레이션 표면이므로 출력 스키마와 실패 정책을 먼저 고정해야 합니다.

Eve의 subagent는 단순 함수 호출이 아니라 별도 session에서 도는 delegation 단위입니다. 고급 설계에서는 subagent를 병렬 처리 도구이자 권한 축소 경계로 사용합니다.

두 종류의 subagent

종류정의권한/상태
built-in agent tool현재 agent의 copyparent tools/sandbox 공유, fresh history/state
declared subagentagent/subagents/<id>/ 디렉터리자체 tools/skills/sandbox/state

built-in agent는 같은 파일 작업을 병렬로 나누는 데 좋습니다. declared subagent는 역할과 권한을 분리하는 데 좋습니다.

Built-in agent tool

모든 agent에는 기본적으로 agent tool이 있습니다.

{
  message: string;
  outputSchema?: object;
}

특징:

  • parent history를 자동으로 보지 않습니다.
  • parent가 message에 필요한 정보를 넣어야 합니다.
  • parent sandbox를 공유합니다.
  • child가 쓴 파일은 parent에게 보입니다.
  • state는 fresh합니다.

코딩 에이전트에서 이 도구가 특히 쓸모 있습니다. 파일 A/B/C 수정 작업을 병렬 child에게 나눠 주고 parent가 결과를 합칠 수 있습니다.

Declared subagent

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

export default defineAgent({
  description: "Investigate ambiguous questions before the parent responds.",
  model: "anthropic/claude-opus-4.8",
});

description은 필수입니다. parent model은 이 설명을 보고 delegation 여부를 결정합니다.

구조:

agent/subagents/researcher/
├── agent.ts
├── instructions.md
├── tools/
├── skills/
├── connections/
├── hooks/
├── sandbox/
└── subagents/

Declared subagent에는 channels/와 schedules/가 없습니다. entrypoint는 root agent가 소유합니다.

격리 경계

항목built-in agentdeclared subagent
promptparent와 동일자체 instructions
toolsparent와 동일자체 tools
connectionsparent와 동일자체 connections
skillsparent와 동일자체 skills
sandboxparent와 공유자체 sandbox
statefreshfresh
streamchild session streamchild session stream

보안상 declared subagent가 더 중요합니다. 예를 들어 researcher에는 read-only connection만 주고, operator에는 approval-gated write tool만 주는 구조가 가능합니다.

Parent가 보는 것

Parent stream에는 subagent.called와 subagent.completed가 나타납니다. child의 자세한 progress는 subagent.called.data.childSessionId로 child stream에 attach해야 합니다.

운영 UI에서 parent trace만 보여주면 부족합니다. 멀티에이전트 UI는 child session tree를 펼칠 수 있어야 합니다.

Output schema로 delegation 계약 만들기

Subagent 호출은 outputSchema를 받을 수 있습니다. parent가 downstream 로직을 해야 한다면 string summary 대신 structured output을 요구합니다.

const riskSchema = {
  type: "object",
  properties: {
    risk: { enum: ["low", "medium", "high"] },
    reason: { type: "string" },
  },
  required: ["risk", "reason"],
};

패턴:

SubagentOutput
researcherclaims, sources, uncertainty
reviewerrisk, blockers, required approval
writerdraft, assumptions, missing inputs
operatorproposed action, dry-run result

Remote agents

defineRemoteAgent는 다른 Eve deployment를 subagent처럼 호출합니다.

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(),
});

Remote dispatch는 비동기입니다.

  1. parent가 remote POST /eve/v1/session에 task-mode session을 시작한다.
  2. parent turn은 durable하게 park된다.
  3. remote가 terminal callback을 post한다.
  4. parent가 resume되어 결과를 tool result로 받는다.

원격 호출은 조직/도메인 경계에 적합합니다. 예를 들어 보안팀이 소유한 risk agent, 데이터팀이 소유한 warehouse agent를 각각 별도 배포로 운영할 수 있습니다.

Remote auth

Outbound auth helper:

Helper사용
vercelOidc()Vercel deployment-to-deployment trust
bearer(token)static/dynamic bearer
basic({ username, password })service basic auth

Receiving side도 route auth를 올바르게 구성해야 합니다. defineRemoteAgent의 auth는 outbound header일 뿐, remote가 이를 검증하지 않으면 의미가 없습니다.

Experimental Workflow

ExperimentalWorkflow는 모델이 JavaScript로 subagent orchestration을 작성하게 하는 opt-in tool입니다.

agent/tools/workflow.ts
export { ExperimentalWorkflow as default } from "eve/tools";

이 tool이 할 수 있는 일은 subagent orchestration뿐입니다. 파일, shell, network, arbitrary import는 없습니다. QuickJS sandbox 안에서 tools.<subagent>()만 호출하는 구조입니다.

사용하기 좋은 경우:

  • metric 목록을 먼저 결정하고 각 metric을 analyst subagent에 fan-out
  • 여러 reviewer 결과를 취합해 final recommendation 생성
  • remote agent 여러 개를 map-reduce처럼 호출

피해야 할 경우:

  • 외부 side effect tool orchestration
  • shell/file 작업을 JS로 제어하려는 목적
  • deterministic workflow가 필요한 regulated process

오케스트레이션 패턴

패턴구조사용
Fan-out/Fan-inparent -> N child -> merge문서/코드/리서치 병렬화
Reviewer gateworker -> reviewer -> operator고위험 작업 승인 전 검토
Specialist routerparent가 task에 맞는 child 선택support/research/ops 분리
Remote domain agentparent -> external deployment조직별 ownership
Human proxychild HITL을 parent channel로 proxysubagent approval UX 통합

평가 기준

Subagent는 eval에서 반드시 별도 검증해야 합니다.

Eval기대
delegation관련 task에서 calledSubagent("researcher")
no over-delegation간단 task에서 subagent 미호출
output schemachild structured output validation
child failureparent가 실패를 설명하거나 fallback
HITL proxychild approval request가 parent channel에 노출
remote authinvalid token 401/valid token success

Subagent는 품질을 높이지만 그만큼 복잡도도 키웁니다. “역할이 다른가, 권한이 다른가, 병렬성이 필요한가” 중 하나가 명확할 때만 분리합니다.

관련 문서

Ch9. 멀티에이전트

Codex 고급 활용 · default/worker/explorer/monitor 역할 분리, agents.max_threads/max_depth 설정, fork+steering과 spawn_agents_on_csv 배치, guardian 승인과 샌드박스 상속까지 멀티에이전트 병렬 워크플로우 운영

Ch13. Observability와 Deployment

Eve의 OpenTelemetry, Workflow tags, Vercel/self-host 배포, 운영 점검 절차를 정리한다.

Ch2. 소스 코드 지도

packages/eve/src를 구현 책임별로 해부하고 엔터프라이즈 설계자가 읽어야 할 핵심 파일을 정리한다.

멀티 에이전트 아키텍처

Vercel 엔터프라이즈 AI 플랫폼 · AI SDK의 subagent, tool delegation, 역할 분리를 활용한 멀티 에이전트 패턴을 정리합니다.

Ch9. Channels, Auth, Streaming

Eve channel이 세션 생성, continuation token, route auth, NDJSON stream을 어떻게 책임지는지 분석한다.

Ch11. Schedules, State, Hooks

Eve의 cron schedule, durable state, stream event hook을 운영 자동화와 감사 체계로 연결한다.

On this page

두 종류의 subagentBuilt-in agent toolDeclared subagent격리 경계Parent가 보는 것Output schema로 delegation 계약 만들기Remote agentsRemote authExperimental Workflow오케스트레이션 패턴평가 기준