Architecture
The components of Argus, where they run, what they depend on, and a map of the architecture pages that follow.
On this page
Argus is deliberately small: one Go service on PostgreSQL, a web app with a thin server in front of it, a command line, and a static website. This section is written for engineers and investors who want to know how it holds together, why it was built that way, and what is and is not in place. It describes what runs today. Anything that is not built is marked planned.
The system at a glance
<figure class="diagram" data-diagram="components"> <div class="diagram-scroll" role="region" aria-label="Figure 1, scrolls sideways" tabindex="0"> <svg class="d-w780" viewBox="0 0 780 540" role="img" aria-labelledby="dg-components-t dg-components-d" focusable="false"> <title id="dg-components-t">Argus components and what they talk to</title> <desc id="dg-components-d">Clients on the left reach the landing server, the app server or the API. The API with its runner is the centre: it talks to the identity service, the model providers directly, Laya, the feature-flag service and the telemetry store, calls the web tools server, and reads and writes PostgreSQL. A migrate job prepares the database before a deploy.</desc> <defs><marker id="dg-components-head" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="d-headfill" d="M0 0L10 5L0 10z"/></marker></defs> <rect class="d-box d-client" x="16" y="30" width="128" height="56" rx="6"/> <text class="d-t" x="80" y="53" text-anchor="middle">Visitor</text> <text class="d-s" x="80" y="69" text-anchor="middle">anonymous</text> <rect class="d-box d-client" x="16" y="120" width="128" height="64" rx="6"/> <text class="d-t" x="80" y="147" text-anchor="middle">Browser</text> <text class="d-s" x="80" y="163" text-anchor="middle">signed-in person</text> <rect class="d-box d-client" x="16" y="214" width="128" height="44" rx="6"/> <text class="d-t" x="80" y="231" text-anchor="middle">CLI and SDKs</text> <text class="d-s" x="80" y="247" text-anchor="middle">Go, TypeScript</text> <rect class="d-box d-client" x="16" y="266" width="128" height="44" rx="6"/> <text class="d-t" x="80" y="283" text-anchor="middle">Apps</text> <text class="d-s" x="80" y="299" text-anchor="middle">client credentials</text> <rect class="d-box d-argus" x="200" y="30" width="150" height="56" rx="6"/> <text class="d-t" x="275" y="53" text-anchor="middle">Landing</text> <text class="d-s" x="275" y="69" text-anchor="middle">site and invite form</text> <rect class="d-box d-argus" x="200" y="120" width="150" height="64" rx="6"/> <text class="d-t" x="275" y="139" text-anchor="middle">App server (BFF)</text> <text class="d-s" x="275" y="155" text-anchor="middle">sign-in and relay</text> <text class="d-s" x="275" y="171" text-anchor="middle">serves the web app</text> <rect class="d-box d-argus" x="200" y="330" width="150" height="56" rx="6"/> <text class="d-t" x="275" y="353" text-anchor="middle">Web tools</text> <text class="d-s" x="275" y="369" text-anchor="middle">search and fetch (MCP)</text> <rect class="d-box d-argus" x="200" y="436" width="150" height="56" rx="6"/> <text class="d-t" x="275" y="459" text-anchor="middle">Migrate</text> <text class="d-s" x="275" y="475" text-anchor="middle">schema and roles (job)</text> <rect class="d-box d-argus" x="410" y="30" width="150" height="370" rx="8"/> <text class="d-t" x="485" y="50" text-anchor="middle">API and runner</text> <rect class="d-box d-inner" x="420" y="64" width="130" height="52" rx="6"/> <text class="d-t" x="485" y="85" text-anchor="middle">HTTP API</text> <text class="d-s" x="485" y="101" text-anchor="middle">/v1, auth, quotas</text> <rect class="d-box d-inner" x="420" y="130" width="130" height="52" rx="6"/> <text class="d-t" x="485" y="151" text-anchor="middle">Stream hub</text> <text class="d-s" x="485" y="167" text-anchor="middle">SSE, resume, deltas</text> <rect class="d-box d-inner" x="420" y="196" width="130" height="52" rx="6"/> <text class="d-t" x="485" y="217" text-anchor="middle">Runner</text> <text class="d-s" x="485" y="233" text-anchor="middle">claims runs, steps</text> <rect class="d-box d-inner" x="420" y="262" width="130" height="52" rx="6"/> <text class="d-t" x="485" y="283" text-anchor="middle">Tool policy</text> <text class="d-s" x="485" y="299" text-anchor="middle">grants, broker, guard</text> <rect class="d-box d-inner" x="420" y="328" width="130" height="52" rx="6"/> <text class="d-t" x="485" y="349" text-anchor="middle">Budgets, ledger</text> <text class="d-s" x="485" y="365" text-anchor="middle">caps, usage</text> <rect class="d-box d-plat" x="620" y="30" width="144" height="52" rx="6"/> <text class="d-t" x="692" y="51" text-anchor="middle">Tessera</text> <text class="d-s" x="692" y="67" text-anchor="middle">identity, tokens</text> <line class="d-line" x1="560" y1="56" x2="620" y2="56" marker-end="url(#dg-components-head)"/> <rect class="d-box d-plat" x="620" y="96" width="144" height="52" rx="6"/> <text class="d-t" x="692" y="117" text-anchor="middle">Model providers</text> <text class="d-s" x="692" y="133" text-anchor="middle">called directly</text> <line class="d-line" x1="560" y1="122" x2="620" y2="122" marker-end="url(#dg-components-head)"/> <rect class="d-box d-plat" x="620" y="162" width="144" height="52" rx="6"/> <text class="d-t" x="692" y="183" text-anchor="middle">Laya</text> <text class="d-s" x="692" y="199" text-anchor="middle">typed judgements</text> <line class="d-line" x1="560" y1="188" x2="620" y2="188" marker-end="url(#dg-components-head)"/> <rect class="d-box d-plat" x="620" y="228" width="144" height="52" rx="6"/> <text class="d-t" x="692" y="249" text-anchor="middle">Flipt</text> <text class="d-s" x="692" y="265" text-anchor="middle">feature flags</text> <line class="d-line" x1="560" y1="254" x2="620" y2="254" marker-end="url(#dg-components-head)"/> <rect class="d-box d-plat" x="620" y="294" width="144" height="52" rx="6"/> <text class="d-t" x="692" y="315" text-anchor="middle">OpenObserve</text> <text class="d-s" x="692" y="331" text-anchor="middle">traces, metrics, logs</text> <line class="d-line" x1="560" y1="320" x2="620" y2="320" marker-end="url(#dg-components-head)"/> <rect class="d-box d-store" x="410" y="440" width="354" height="64" rx="6"/> <text class="d-t" x="587" y="459" text-anchor="middle">PostgreSQL (shared)</text> <text class="d-s" x="587" y="475" text-anchor="middle">schema argus: every project's data, forced RLS</text> <text class="d-s" x="587" y="491" text-anchor="middle">schema argus_control: app server sessions</text> <line class="d-line" x1="485" y1="400" x2="485" y2="440" marker-end="url(#dg-components-head)"/> <line class="d-line" x1="350" y1="464" x2="410" y2="464" marker-end="url(#dg-components-head)"/> <line class="d-line" x1="144" y1="58" x2="200" y2="58" marker-end="url(#dg-components-head)"/> <line class="d-line" x1="350" y1="58" x2="410" y2="58" marker-end="url(#dg-components-head)"/> <line class="d-line" x1="144" y1="152" x2="200" y2="152" marker-end="url(#dg-components-head)"/> <line class="d-line" x1="350" y1="152" x2="410" y2="152" marker-end="url(#dg-components-head)"/> <line class="d-line" x1="144" y1="236" x2="410" y2="236" marker-end="url(#dg-components-head)"/> <line class="d-line" x1="144" y1="288" x2="410" y2="288" marker-end="url(#dg-components-head)"/> <line class="d-line" x1="410" y1="358" x2="350" y2="358" marker-end="url(#dg-components-head)"/> <rect class="d-box d-client" x="16" y="515" width="14" height="12" rx="3"/> <text class="d-s" x="36" y="526" text-anchor="start">Outside clients</text> <rect class="d-box d-argus" x="150" y="515" width="14" height="12" rx="3"/> <text class="d-s" x="170" y="526" text-anchor="start">Argus component</text> <rect class="d-box d-plat" x="300" y="515" width="14" height="12" rx="3"/> <text class="d-s" x="320" y="526" text-anchor="start">Shared platform service</text> </svg> </div> <figcaption>Figure 1. The components of Argus and the platform services they use. Arrows point from the caller to the callee. The app server also uses the identity service for sign-in and the database for its sessions. Dashed boxes are outside Argus (people and their tools).</figcaption> </figure>In words: visitors reach the landing server; signed-in people reach the app server, which relays their calls to the API; the CLI, the SDKs and apps call the API directly. The API process also runs the agents. It uses PostgreSQL for everything it remembers, and calls the identity service, the model providers directly, the feature-flag service and the telemetry store. Web search and page fetching are a separate small server that only the API calls.
| Part | What it is |
|---|---|
| API and runner | One Go binary, argus serve, with roles. It serves the /v1 HTTP API and works runs. In both environments one process has both roles, so any process can claim any run. |
| App server and web app | The app. A Bun server (the "backend for frontend") signs people in through Tessera, keeps tokens on the server and relays /api calls with the person's token. It serves the React single-page app, built on the Kurth Labs Design design system: the Studio, the run map, Evals, Usage and, for staff, the Admin area. |
| Landing | These pages and the invite form: static files and a small Bun server. The server is the only caller of the API's public invite endpoints, and the API trusts a visitor's address only from it. |
| Web tools | An MCP server, from the same binary (argus webtools), that offers search and fetch. It holds no database and no model credential, and is optional per environment. |
| Migrate | A one-shot job from the same binary, shipped before the API. It creates the database and the two runtime roles if they are missing and applies the migrations. |
| Command line and SDKs | argus (the same binary as the server), plus TypeScript and Go clients generated from the API contract. |
The platform services Argus uses
Argus does not run its own identity system, model access, flag service or telemetry store. It uses the platform it is deployed on, and it is written so that each dependency fails in a known way.
| Dependency | What Argus uses it for | If it is unavailable |
|---|---|---|
| PostgreSQL | The queue, the event log, every project's data, the app server's sessions, and change notifications for live streams. | Nothing works. The API reports itself not ready and the app server follows. This is the one hard dependency. |
| Tessera (the identity service) | Sign-in for people, the tokens the API verifies, client credentials for apps, invite emails, and service tokens for tool servers. | New sign-ins and invites fail. The API keeps verifying tokens with the last good signing keys for up to a day. |
| The model providers | Every model call goes straight to the provider (Anthropic for the platform's models, or the provider that owns a project's own key). Argus holds no long-lived Anthropic key; it obtains a short-lived token through the identity service. | Runs that need a model fail with a clear model error; runs waiting on a person or a budget are unaffected. |
| Flipt | Feature flags, read through OpenFeature. | A read never fails: the flag's default from the repository applies. With no flag service configured, flags run on their defaults. |
| OpenObserve | Traces, metrics and logs, sent over OTLP. | Telemetry is exported in the background. Runs are unaffected; there is less to look at. |
Where it runs
There is no local runtime stage. The code is built and tested on a developer machine and run in two environments, both on private infrastructure:
- Dev runs on a private build machine on the platform's network. Changes land here first.
- Prod runs on a private node. It is the environment invitees use.
Both are reachable over a private mesh network only, apart from this website. Each component ships as a reproducible bundle, with a version made from the commit time and hash, and a deploy goes in a fixed order: migrate, then the API, then the app server, then the landing, with the web tools last and only where they are wanted. Secrets live in a per-environment secrets store and reach a process only if its bundle lists them, and a deploy is refused when a listed setting has no value. See Observability and operations.
What is decided, and why
Argus records significant choices as architecture decision records. The pages in this section go through them in context. The short version:
- One service on PostgreSQL, with an event-sourced session log. The promise is durable, resumable, multi-device sessions. The queue, the log and the notification fan-out all live in PostgreSQL, so there is nothing else to run, and the log doubles as the audit trail. The cost is that Argus owns its runner, and exactly-once effects depend on tools honouring idempotency keys. This holds comfortably to hundreds of concurrent streams, which is the right scale for now. See Event-sourced sessions.
- Agents are data. Markdown definitions with immutable versions and movable labels make releases reviewable, diffable and reversible, and make evals a gate on a label move. See Agents as data.
- Tools are default-deny, and tenant-chosen servers are untrusted. See Tools, tokens and the egress guard.
- Identity through Tessera, tenancy by project with forced row-level security, and a Control Center that lives inside the app behind realm roles. See Tenancy, identity and security.
- No local runtime. There is no third copy of the platform to drift from dev and prod.
Contracts
Three contracts are versioned data files, and the code is generated from or checked against them: the HTTP API (openapi.yaml, see the API reference), the agent definition format argus.agent/v1, and the session event schemas. CI fails when generated code is stale and when a change breaks a client of the base branch.
In this section
- Architecture (this page): components, dependencies and where it runs.
- Event-sourced sessions: the log, resumable streams, the hub and replay.
- The runner: the life of a run, claiming, steps, approvals, sub-agents, budgets, compaction and summarising long conversations.
- Agents as data: versions, labels, canary, rollback and the eval gate.
- Tools, tokens and the egress guard: MCP sources, the platform sources, service tokens and outbound safety.
- Tenancy, identity and security: projects, row-level security, membership, secrets, bring-your-own keys and the app.
- Observability and operations: telemetry, objectives, the status page and how it is shipped.
For the threat model by area, read Security.