본문으로 바로가기
리옵트 핸드북
리옵트 핸드북
엔터프라이즈 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 에이전트›Ch2. 소스 코드 지도
한국어English

Ch2. 소스 코드 지도

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

핵심 요약

  • packages/eve/src는 public API, discovery/compiler, runtime/harness, execution 계층으로 읽으면 구조가 명확해집니다.
  • Discovery와 compiler는 authored module을 곧바로 믿지 않고 manifest와 .eve/ 산출물로 실행 표면을 정규화합니다.
  • 운영자는 source file이 아니라 runtime graph, tool registry, durable execution driver를 리뷰 대상으로 삼아야 합니다.

이 장은 Eve 0.11.4의 packages/eve/src를 읽기 위한 지도입니다. 전체 파일을 무작정 따라가면 public, internal, execution, runtime, harness, setup, evals가 뒤섞여 보이지만 계층은 분명합니다.

디렉터리 책임

디렉터리책임읽는 목적
public/사용자-facing API와 framework integrationsauthoring contract 확인
discover/agent/ 파일 슬롯 탐색어떤 파일이 권한 표면이 되는지 확인
compiler/source manifest를 compiled manifest/module map으로 변환배포 산출물과 진단 artifact 이해
runtime/compiled graph를 실행 가능한 registry로 해석framework defaults, subagent, sandbox, hook 결합 이해
harness/AI SDK tool loop, compaction, HITL, telemetry한 turn의 품질/안전 메커니즘 이해
execution/Workflow session/turn/step orchestrationdurable execution과 park/resume 이해
channel/channel adapter, send/receive/session helpersdelivery, continuation token, event handler 이해
client/TypeScript client, reducer, NDJSON stream앱/테스트/스크립트 호출 방식 이해
evals/eve eval runner와 assertionregression gate 설계
setup/eve init, channel add, Vercel link/deploy helpersbootstrap 자동화와 scaffolding 이해
shared/공통 타입, schema, guardmanifest와 런타임 공통 계약 이해

공개 API는 public/에서 시작한다

packages/eve/src/index.ts는 거의 비어 있고 #public/index.js를 export합니다. 사용자가 import하는 표면은 다음처럼 분리됩니다.

Import주 용도
evedefineAgent, defineRemoteAgent
eve/toolsdefineTool, defineDynamic, disableTool, ExperimentalWorkflow
eve/connectionsMCP/OpenAPI connection 정의
eve/channels/*Eve/Slack/GitHub/Teams 등 채널
eve/sandbox/*Vercel/Docker/microsandbox/just-bash backend
eve/evalseval config와 eval case
eve/client세션 생성, follow-up, stream 소비

운영 관점에서 public/은 “작성자가 건드릴 수 있는 API”이고, 나머지 디렉터리는 “Eve가 책임지는 실행 엔진”입니다. 내부 구현에 기댄 monkey patch는 피하세요.

Discovery와 Compiler는 authored code를 신뢰하지 않는다

discover/discover-agent.ts는 agent root를 읽고 슬롯별 source ref를 모읍니다. 이 단계의 핵심은 authored module을 import하지 않는다는 데 있습니다. 파일 경로, 확장자, 디렉터리 형태, markdown frontmatter 같은 정적 정보만 수집합니다.

읽어야 할 파일:

파일핵심 역할
discover/project.tsflat/nested agent root 해석
discover/discover-agent.tsroot entries를 슬롯별 discovery로 분기
discover/grammar.tstool/channel/hook 이름 검증, instructions discovery
discover/skills.tsflat skill, packaged skill, frontmatter 처리
discover/sandbox.tssandbox.ts vs sandbox/sandbox.ts와 workspace seed
compiler/compile-agent.tsdiscovery 실행, artifact write, diagnostic error 처리
compiler/manifest.tscompiled manifest schema와 version

이 구조 덕분에 eve info, eve build, .eve/diagnostics.json는 운영자가 신뢰할 수 있는 inspection surface가 됩니다.

Runtime은 graph와 registry를 만든다

runtime/resolve-agent-graph.ts는 compiled manifest를 실행 가능한 agent graph로 바꿉니다. 여기서 중요한 병합이 발생합니다.

  • framework default tools와 authored tools 병합
  • disableTool() sentinel 처리
  • framework default channels와 authored channels 병합
  • connections가 있으면 connection__search dynamic resolver 추가
  • subagent를 model-visible tool namespace에 등록
  • sandbox registry, tool registry, hook registry 생성

그래서 실제 모델이 보는 도구 목록은 agent/tools/ 파일 목록 그대로가 아닙니다. built-in tools, authored overrides, disabled defaults, dynamic tools, subagents, connections를 모두 합친 결과입니다.

Harness는 한 turn의 품질 엔진이다

harness/tool-loop.ts는 Eve 실행의 중심입니다. AI SDK ToolLoopAgent를 사용하지만, Eve가 그 위에 다음 기능을 얹습니다.

기능구현 관심사
compactioncontext window threshold, summary checkpoint
HITLinput.requested, approval/question park
dynamic capabilitiesstream event 후 tool/skill/instruction resolver
telemetryOTel parent span, runtimeContext, usage tags
provider toolsweb_search provider mapping
tool output shapingtoModelOutput, authorization output redaction
runtime actionssubagent/remote agent action dispatch
code modeexperimental model-authored JS tool orchestration

고급 사용자가 가장 자주 붙잡고 디버깅하는 곳도 이 레이어입니다. “왜 도구가 안 보이지?”, “왜 승인 후 메시지가 밀렸지?”, “왜 session.waiting에서 멈췄지?”는 대부분 harness와 execution이 맞물린 지점에서 생깁니다.

Execution은 durable workflow driver다

execution/workflow-entry.ts는 long-lived workflow body입니다. 여기서 session을 만들고, turn workflow를 dispatch하고, park hook을 만들고, runtime action result나 follow-up delivery를 받아 다음 turn으로 넘깁니다.

핵심 파일:

파일역할
execution/workflow-entry.tssession driver loop, park/resume, auth hook
execution/turn-workflow.ts한 turn을 short-lived workflow로 실행
execution/workflow-steps.tsdurable "use step" 경계에서 harness 실행
execution/durable-session-store.tssession snapshot과 migration-aware durable state
execution/session.tsHarnessSession 생성/재수화/compaction config
execution/subagent-tool.tssubagent 호출과 parent notification
execution/remote-agent-dispatch.ts원격 Eve agent dispatch

이 레이어를 이해하면 Eve의 내구성이 단순한 retry가 아님이 보입니다. session snapshot, continuation token, emission state, proxy input request state가 step result를 타고 이동합니다.

엔터프라이즈 코드 리뷰 관점

소스 지도는 코드 리뷰 체크리스트로 바로 바뀝니다.

변경 위치리뷰 질문
agent/tools/**외부 부작용이 있는가? approval/idempotency가 있는가? output redaction이 있는가?
agent/connections/**token principal type, allow/block filter, approval이 적절한가?
agent/channels/**route auth가 fail-closed인가? body-supplied identity를 신뢰하지 않는가?
agent/sandbox/**network policy가 production에 맞는가? seed file에 비밀값이 없는가?
agent/hooks/**hook failure가 turn failure로 번지지 않도록 격리했는가?
agent/subagents/**root 권한을 불필요하게 복제하지 않았는가?
evals/**변경된 risk surface를 실제 HTTP session으로 검증하는가?

Eve를 도입할 때는 이 지도를 팀의 CODEOWNERS, PR template, release checklist에 반영하는 편이 좋습니다.

관련 문서

Ch4. Compiler와 Runtime Graph

Eve가 source manifest를 compiled manifest와 runtime agent graph로 바꾸는 과정을 분석한다.

검증 리포트

엔터프라이즈 Eve 에이전트 개발 핸드북 작성 시 확인한 소스, 문서, 구현 근거와 남은 리스크를 기록한다.

AI SDK 런타임

Vercel 엔터프라이즈 AI 플랫폼 · AI SDK 6를 애플리케이션 계층 표준으로 사용해 agent, tool, MCP, telemetry를 구성하는 방법을 정리합니다.

터미널 CLI 명령·플래그 전체 참조

Claude Code 명령어 마스터 · Claude Code 공식 CLI reference의 실행 형태 34개와 공통 플래그 79개, 최신 하위 옵션

Ch1. Eve 멘탈 모델

Eve를 파일시스템 작성 표면, durable workflow, runtime harness, channel protocol로 나누어 이해한다.

Ch3. 프로젝트 레이아웃과 Discovery

agent 디렉터리 슬롯이 source manifest로 변환되는 과정을 운영 관점에서 분석한다.

On this page

디렉터리 책임공개 API는 public/에서 시작한다Discovery와 Compiler는 authored code를 신뢰하지 않는다Runtime은 graph와 registry를 만든다Harness는 한 turn의 품질 엔진이다Execution은 durable workflow driver다엔터프라이즈 코드 리뷰 관점