Skip to main content
Agent Storage is a workspace-scoped JSON document store for shared agent state. Use it for multi-agent coordination, state checkpoints, deduplication, and human-in-the-loop triage.

Data Model

Documents are organized as namespace + key + JSON value, scoped to a workspace. Each document also tracks version (integer, auto-incremented), size_bytes, created_at, updated_at, and updated_by.

CLI

All commands support --workspace <slug> to target a specific workspace and --json for machine-readable output. List commands also support --fields <fields> for client-side JSON field filtering (implies --json).

REST API

Authentication

All endpoints require Authorization: Bearer <api_key> and X-Workspace-Id header (CLI sets this automatically).

Concurrency (CAS)

Reads return an ETag header containing the document’s current version. To perform a compare-and-swap write, include If-Match: <version> on your PUT request. If the document has been modified since that version, the API returns 409 CONFLICT. PATCH uses CAS internally with automatic retries.

Response Headers

Writes include storage usage headers:
  • X-Storage-Used — current total bytes used
  • X-Storage-Limit — workspace tier limit (when bounded)

updated_by Field

Tracks who last modified a document:
  • Agent key writes: org-slug/agent-name@version
  • CLI writes: cli
  • Direct API writes: api

Python SDK

API Reference

The SDK reads ORCHAGENT_SERVICE_KEY or ORCHAGENT_API_KEY from environment variables automatically. In sandbox environments these are injected by the gateway — no setup needed.

Error Codes

Quotas

Enforced per workspace tier:

Common Patterns

State Checkpoints (Scheduled Agents)

Save progress between runs so a scheduled agent can resume where it left off:

Multi-Agent Coordination

Multiple agents writing to the same document with safe concurrent updates:

Human-in-the-Loop Triage

Agents write findings to storage, humans review via CLI: