How erlidev/eika works
Eika is a Docker-native agentic coding harness. A user configures authentication, model providers, and a project through the web UI, then starts a session; the run manager drives an agent that builds model context and invokes tools. Workspace file access and commands go through sandbox containers, and the UI presents transcripts, terminal output, edits, and diffs. Major adjacent capabilities include search, MCP servers, profiles, and parallel subagents. Several backend links are supported by the source index; unsampled frontend and subsystem wiring is shown only where the README documents the capability.
Main entry points: run_manager.go Run manager · routes.go HTTP API · registry.go Built-in tools · host.go Workspace lifecycle
Components 21
Harness API
- Harness process
cmd/eika/main.go - HTTP API
internal/server/routes.go - Run manager
internal/server/run_manager.go - Persistent state
internal/store/store.go - Event bus
internal/event/bus.go
Agent Runtime
- Agent context
internal/agent/context.go - Session history
internal/session/store.go - Built-in tools
internal/tool/builtin/registry.go - Parallel subagents
internal/subagent/spawn.go
Workspace Execution
- Workspace lifecycle
internal/workspace/host.go - Sandbox executor
internal/executor/sandbox/sandbox.go - Sandbox daemon
internal/eikad/daemon.go - Network egress
internal/egress/proxy.go
Model Integrations
- Web search
internal/search/engine.go - MCP servers
internal/mcp/server.go - Model providers
internal/provider/openai/openai.go
Web Interface
- Web application
web/src/app/App.tsx - API client
web/src/api/client.ts - Session interface
web/src/features/session/SessionView.tsx - Workspace panels
web/src/features/workspaces/queries.ts
Other components
- User
Connections 27
- User → Web application: configures and starts
- Web application → API client: requests data
- API client → HTTP API: calls API
- Harness process → HTTP API: starts server
cmd/eika/main.go - HTTP API → Run manager: starts runs
- Run manager → Agent context: drives agent
internal/server/run_manager.go - Run manager → Persistent state: reads and records runs
internal/server/run_manager.go - Run manager → Session history: loads session
internal/server/run_manager.go - Run manager → Model providers: selects provider
internal/server/run_manager.go - Agent context → Built-in tools: offers tools
- Agent context → Model providers: sends model context
internal/agent/context.go - Built-in tools → Sandbox executor: executes in sandbox
- Run manager → Event bus: publishes run updates
- Run manager → Parallel subagents: supports child runs
- Parallel subagents → Persistent state: records child results
internal/subagent/spawn.go - Parallel subagents → Event bus: emits child events
internal/subagent/spawn.go - Built-in tools → Web search: offers web search
- Built-in tools → MCP servers: offers MCP tools
- HTTP API → Persistent state: serves saved resources
- HTTP API → Workspace lifecycle: manages workspaces
- Workspace lifecycle → Sandbox executor: provides workspace access
internal/workspace/host.go - Sandbox executor → Sandbox daemon: sends sandbox operations
internal/executor/sandbox/sandbox.go - Workspace lifecycle → Network egress: restricts container network
- User → Session interface: reviews run
- Session interface → Workspace panels: uses workspace panels
- Workspace panels → Workspace lifecycle: views files and diffs
- HTTP API → Web application: serves UI