The Daemon
The Node.js process that owns every runtime, tool call, and piece of state.
The daemon is a Node.js process (TypeScript, Hono HTTP) that runs in the background and holds all authority. The Tauri shell supervises it; nothing else may talk to a provider, a database, or an executor directly.
Anatomy
Tauri Desktop Shell (Rust)
└─ Daemon supervisor (spawn · health · restart · terminate)
└─ Node.js daemon (Hono, loopback HTTP)
├─ Runtime host agent · tool · coding · memory · voice · scheduler
├─ Workflow plane dispatcher · queue · slots · delegation · DAG · judge
├─ Permission Guard risk → policy → approval → audit
├─ MCP client stdio / HTTP / SSE servers
└─ Persistence SQLite (default) · Supabase · PostgreSQLSupervising process
The Rust side:
- starts the daemon sidecar when the app launches
- checks health and restarts on crash
- passes paths and ports through environment variables
- terminates the daemon on exit
Runtime status is available to the UI through GET /api/runtime/status (pid, uptime, memory, storage mode, paths, per-runtime health) and GET /api/runtime/components.
HTTP surface
The daemon listens on loopback, port 3001 by default. Route groups are mounted in daemon/src/bootstrap/register-routes.ts:
/api/chat · /api/conversations · /api/tasks · /api/articles · /api/reviews · /api/settings · /api/voice · /api/mcp · /api/tools · /api/tasks/scheduled · /api/approvals · /api/workspaces · /api/projects · /api/runs · /api/runtimes · /api/runtime/queue · /api/memories · /api/agent-profiles · /api/events · /api/audit · /api/runtime · /api/agent-broker
See API Endpoints for the important routes.
Development and production
| Mode | How it runs |
|---|---|
| Development | pnpm dev:daemon — tsx watch restarts on change |
| Production | pnpm build:daemon:sidecar — bundled SEA binary launched by the shell |
State
The daemon is stateless between restarts except for what it persists. Long-running work is persisted as runs and queue entries, and pending approvals are stored, so a restart resumes rather than forgets.
Next Steps
- System Overview — the full topology
- Storage — where state lives on disk
- Build From Source — build the daemon