01
  • Agents
  • Runtime

Zion OS

An operating system for agents: where they run, use tools, keep memory, and share one workspace with people.

I want the workspace to adapt to the work. In Zion OS, people and agents use the same apps and read the same data: a person works through the desktop, an agent through tools, and both act on the same system. Agents answer with interfaces, not just text.

In the ecosystemWhere the work happens. os-hub manages its instances, and Getaroom gives agents from different instances controlled rooms to talk in. The feedback loop I’m building toward connects Synapsee’s monitoring and recommendations with Loom’s analysis of logs and traces at scale, so what agents do can inform how they improve.

00
  • Overview

System

Eight kernel blocks under one desktop. A turn enters through A2A, passes identity, and runs in the agent runtime, which reads shared state, acts through tools and answers in A2UI. Observability runs underneath all of it.

Kernel
8 blocks · 4 groups
Protocol
A2A · JSON-RPC · SSE
Runtime
openai-agents · deepagent
Stack
TypeScript · React · Express
userland · desktop chat › plan my week desk files notes activity kernel · eight blocks a2a json-rpc · message/send · message/stream intent stream · sse external agent a2a 1.0 · by url data helper delegate 1 policy & identity every request identity jwt → user rbac external agents budget model calls owner isolation 2 agent runtime zion executor adapter openai-agents deepagent router ≤ 3 apps context in budget model think · act 4 subagents 3 sessions shared now store · registry indexer · policy 4 memory one provider seam internal mem0 router 5 tools one catalog queriesserver data navigationparity app toolsskill-open user appsua-* 6 a2ui declarative show_job_form show_confirmation show_chart … renders in chat a window surface a2ui 7 observability otel → activity monitor extract 8
Fig. 01One turn: a request typed in chat becomes a chart on the desktop
  1. 1Protocol · A2AEvery request in and every event out. Chat, apps and external agents all speak A2A, and replies stream back over SSE.01 Turn
  2. 2Policy & identityEvery request is authenticated and runs as its user. An external agent’s tool calls are checked against policy, and model calls against a budget.05 Governance
  3. 3Agent runtimeThe executor routes the turn and gathers its context; a swappable runtime thinks and calls tools.02 Runtime
  4. 4SessionsThe shared now across apps, read into every turn’s context.04 State
  5. 5MemoryOne provider seam over interchangeable backends. Read on every turn, written after it.04 State
  6. 6ToolsEverything a person can do in an app, an agent can do as a tool, on the same server-owned data.03 Parity
  7. 7A2UIAgents answer with declarative surfaces, such as forms, charts and confirmations, that render in chat or in a window.03 Parity
  8. 8ObservabilityEvery phase is a span. Traces feed the monitors, and memory extraction runs after the reply.05 Governance
01
  • Engine

Turn

One request, carried through the kernel in a fixed order and traced end to end.

A message reaches the A2A endpoint and is authenticated before anything runs, and the turn is bound to its user. The executor routes it to the apps it needs and assembles context from sessions and memory within a token budget. The runtime then thinks and calls tools until it is done, while every effect streams back as a typed event. Each phase is a span; once the reply is out, an extractor writes what was learned into memory.

phase time → turn identity route context think tool call a2ui events extract adapter each phase is a span reply
Fig. 01.1One turn, span by span
Entry
/a2a · message/stream
Events
Typed, streamed over SSE
Phases
Identity · route · context · think
After
Memory extraction
02
  • Engine

Runtime

The executor owns the turn and the runtime only thinks. They meet at a typed contract, so the runtime can be swapped.

The executor’s router picks up to three app skills a turn. Deterministic signals win: an explicit target, the window in front, the apps that are running, the app that sent the message. A judge fills any open slots and regex is the fallback; picks are gated on availability, and the trace records which mechanism chose each app. Opening a skill gives the model that app’s typed tools. Behind the contract is a switch: the OpenAI Agents SDK by default, or a LangGraph deep agent as the kill switch. Neither knows anything of A2A, tracing, policy or sessions.

turn router up to 3 app skills a turn explicit target foreground window running apps sending app judgeopen slots regexfallback notessignal desksignal todolistjudge availability-gated runtime adapter AGENT_RUNTIME AgentTurnInput openai-agents deepagent ← kill switch AgentTurnEvent a2a, tracing, policy and sessions stay in the executor
Fig. 01.2The router, then the switch
Contract
AgentTurnInput → events
Adapters
openai-agents · deepagent
Router
Up to 3 skills a turn
Subagents
Research · data · writing · dev
03
  • Tools
  • A2UI

Parity

Anything a person can do in an app, an agent can do as a tool, on the same data.

Each capability lives in four aligned layers: the tool an agent calls, the handler the app’s UI uses, the domain tool on the server, and the routing that sends an action to its app. Navigation parity is checked by machine, and queries carry a server handler, so both sides read the same server-owned data. When text isn’t enough, an agent answers in A2UI: declarative surfaces that render in chat or in a window. Apps built in the Developer app, with a frontend, a backend and an agent, are installed per user as data and get parity by construction.

agenttool uihandler servertool actionrouting capability app add_todotodolist list_todostodolist focus_windowdesktop navigate_pathfiles user appua-* aligned by construction a2ui declarative surfaces show_chart show_job_form show_confirmation renders in chat or in a window
Fig. 01.3Four layers, and an answer as a surface
Layers
Tool · handler · server · routing
Data
Queries carry a server handler
A2UI
Forms · charts · confirmations
User apps
zion-user-app@1, per user
04
  • Memory
  • Sessions

State

Two kinds of shared state: memory that lasts, and a session layer that holds what is happening now.

Memory sits behind one provider interface. The internal backend is the default: SQLite with full-text search, vectors and reranking. mem0 is opt-in, and a router writes to a primary while reads fan out, dedupe and re-rank. Optional operations are gated on capability; isolation by owner is not optional. Memory is read into every turn’s context, and an extractor writes back after the reply. Sessions are the other half: the shared now across apps, changed only through its routes or its client.

memory owner-isolated turn context extractor every turn after the reply MemoryProvider one interface internal sqlite · fts5 vector · rerank mem0 external opt-in router write → primary reads fan out sessions the shared now store registry indexer context policy written only through /api/sessions or SmartSessionClient
Fig. 01.4One seam for memory, one layer for now
Seam
One MemoryProvider
Backends
Internal · mem0 · router
Reads
Every turn, into context
Sessions
/api/sessions · client only
05
  • Policy
  • Observability

Governance

Who is asking, what they may do, what it may cost, and a record of all of it.

Every A2A request carries a JWT and runs as its user, and data is isolated by owner. When an external agent calls a tool, policy decides: a rule for that tool first, then its category, then a default that denies. A denial is recorded as a span. Model routes have a spend guard and a per-user rate limit, and model spans are reconciled against the budget. Tracing runs in two pipelines: the executor’s spans feed the Activity Monitor, and OTLP from outside agents such as Claude Code feeds the Agents Monitor. Synapsee reviews both.

Not built yet: fixes suggested from traces, and self-healing.

tool call data helper → delete_todo first match wins 1tool ruledelete_todo → denymatch 2categorytodos → allownot reached 3defaultdenynot reached verdict deny policy.deny span tracing opentelemetry executor in-process spans activity monitor outside agents otlp · claude code agents monitor synapsee suggest fix · self-heal planned
Fig. 01.5One denied call, and where the traces go
Identity
JWT on every /a2a call
Policy
Tool · category · default
Budget
Spend guard · per-user rate
Tracing
OpenTelemetry, two pipelines