Skip to main content
AgentOS can list and inspect past runs, replay a session’s transcript, and list which tools require approval — all over HTTP, with 503 (not an empty list) when the underlying store is missing.

Quick Start

1

Attach a ledger and serve

Attaching a SQLiteRunLedger unlocks /api/runs and /api/runs/{run_id}.
2

Read runs over HTTP


Enabling Each Endpoint

Each endpoint reads a store you attach to the AgentOS instance.
Attach a run ledger to expose /api/runs and /api/runs/{run_id}.
See Run Ledger.

Endpoint Reference

Five read-only routes, each returning 503 naming what to configure when its store is absent.

Response Shapes

Every response matches the endpoint’s contract exactly.
Each run is the record’s own as_dict() (or vars()) — ledgers with extra fields are not truncated.
The record’s dict directly — no wrapper.
The chat history as the store returns it.

Why the Errors Look Like This

A missing store returns 503 naming what to configure, not an empty list. An empty list is indistinguishable from “no runs yet” and lets an operator debugging a missing run conclude the run never happened. An unknown run or session is 404, not an empty object, for the same reason. Out-of-range limit values return 422 — SQLite treats LIMIT -1 as unlimited, so the bounds are pinned deliberately.

Choosing an Endpoint

This decision diagram maps a question to the endpoint that answers it.

How Operators Interact

An operator lists runs; the ledger either answers or the endpoint says what to attach.

Best Practices

The 503 names what to attach, but you want the endpoint to actually work. Attach a SQLiteRunLedger before deploying.
A 503 means the store is missing, not that the request was malformed. Do not retry it — fix the configuration.
Mutating a run over HTTP is a much larger design question. Use the SDK for changes; these endpoints only read.
The upper bounds (runs ≤ 500, sessions ≤ 200) exist because clients can otherwise ask for a full-table scan. Request only what you need.

AgentOS

The AgentOS platform and its routes.

Run Ledger

Attach a SQLiteRunLedger to record runs.

SQLite Transcript Store

Persist session transcripts for replay.

Approval Protocol

Require approval for sensitive tools.