Skip to content

Architecture

CLI · REST API · Mission Control (web) · schedules
│
┌────────▼────────┐
│ Azhi server │ roles: api · interpreter · gateway · scheduler
└───┬─────────┬───┘
│ │
┌──────────▼───┐ ┌──▼─────────────────────┐
│ Temporal │ │ PostgreSQL + pgvector │
│ (durable │ │ runs · ledger · │
│ engine) │ │ datasets · audit │
└──────┬───────┘ └────────────────────────┘
│
┌───────────▼───────────┐
│ Workers (Linux) │ scripts (uv / Bun) · OpenCode · Claude Agent SDK
│ fresh checkouts │ per-step isolated git and HOME
└───────────────────────┘
PartJob
ServerRuns as roles you can split: api, interpreter, gateway, scheduler (azhi server start --roles ...)
InterpreterA Temporal workflow that walks the compiled graph. Interpreter code is versioned by task queue, so old runs finish on the code they started on
GatewayEvery tool call passes here: projection, observation records, the action ledger, policy
TemporalThe only durable engine. Retries by error class, cancellation, timers, schedules
PostgreSQLAll state. PostgreSQL only: no Redis, vector DB or queue until a measured bottleneck
WorkersExecute script and harness steps. The server image never runs them
  1. Publish. A package is validated and compiled, signed with the publisher’s key, and uploaded.
  2. Plan. The server builds the run plan against your workspace. Blockers refuse the run.
  3. Interpret. The Temporal interpreter walks the graph. Independent branches run under parallel.
  4. Execute. Script and agent steps run on a worker that satisfies the plan and the trust policy.
  5. Gate. Every tool call goes through the gateway, which records each write in the ledger.
  6. Record. Each agent turn gets a context manifest and a usage record.
  7. Decide. Approval nodes wait for a person, in the CLI or Mission Control.
ADRDecision
01Temporal is the only durable engine; interpreter code is versioned
02CEL for all expressions; no JavaScript eval anywhere; the same evaluator in compiler and runtime
03PostgreSQL only
04Node for the platform; Bun only as a script runtime
05The model agent is the default executor
06Packages are signed and hashed; credentials never enter packages
08now in CEL is pinned per run
10The flagship’s Slack post passes the taint rule through a CEL guard
11Per-publisher signing keys under a workspace root