Architecture
A high-level look at how a request flows through O2AGENT.
Request flow
┌────────────┐ ┌────────┐
│ o2agentctl │ login │ O2ID │ Identity: humans, agents, roles,
│ CLI/TUI │◀──────▶│ │ scopes, and delegation
└──────┬─────┘ └────────┘
│ invoke (Bearer token)
▼
┌──────────┐
│ Gateway │ Verifies the token, enforces rate limits, logs the
│ │ request, and routes it to the Runtime.
└────┬─────┘
▼
┌──────────┐
│ Runtime │ Loads the agent's active version, runs the tool-calling
│ Worker │ loop, and executes any tool calls (including sandboxed
│ │ code execution) the model requests.
└────┬─────┘
▼
┌──────────┐
│ Model │ A pluggable interface over your LLM backend of choice.
│ Provider │
└────┬─────┘
▼
Response, traced end to end back through every hop above.
Components
- CLI/TUI — the human-facing surface. Command mode for scripting and CI, an interactive TUI for exploration, both built on the same client.
- Gateway — the platform's single entry point: authentication, authorization, rate limiting, and request routing.
- Registry — stores agents, their versions, and their deployments.
- Runtime Worker — executes the tool-calling loop against a pluggable model provider, calling tools (including sandboxed code execution) as the model requests them.
- Identity (O2ID) — the identity provider backing every human and agent identity, role, and delegation across the platform.
- Observability — every request is traced with OpenTelemetry, from the Gateway through the Runtime to the model call itself.
Design principles
- A stable API is the product's actual surface. The CLI, TUI, and any future console all consume the same documented Gateway API — nothing is reachable only through one interface.
- Identity is never bolted on. Every agent has a real, first-class identity from the moment it's registered, not an API key hiding in a config file.
- Protocols are adapters, not the core. The Runtime's tool-calling loop works against a provider-agnostic shape internally, so it isn't locked to any one model vendor's or tool protocol's wire format.