Architecture
Last updated 10 September 2026
How a message becomes a run: the control flow through Ghillie Core, where the boundaries sit, and what runs where.
Control flow
Channel
-> Conversation service
-> Orchestrator
-> Task graph
-> Runtime router
-> Claude runtime
-> Codex runtime
-> Native runtime with Ollama
-> Tool broker
-> Policy and approval engine
-> Verifier
-> Memory service
-> Channel responseRuntime boundary
Claude and Codex are agent runtimes. Ollama is a model host used by Ghillie's own native runtime. All three emit the same event vocabulary but keep their native session identifiers, which is what lets a run resume inside the runtime that started it.
Audit boundary
All mutations go through commands. Each accepted command creates:
- an immutable audit event;
- a domain state transition;
- zero or more streamed activity events.
Tool execution requires a capability lease issued to one task. A lease carries an expiry, workspace scope, allowed tools, call budget and approval policy.
Deployment
- A SwiftUI application.
- Node-based Ghillie Core bound to localhost.
- PostgreSQL with pgvector on a Unix socket or localhost.
- launchd supervision and structured health checks.
The repository splits along the same lines: apps/core is the service and HTTP API, apps/macos the native control surface, packages/protocol the shared runtime, task, tool and audit contracts, and database/migrations the PostgreSQL schema.
For the reasoning behind the boundaries, see Security model and Agents and runtimes.