BroomVA

Life Services API

Endpoints for interacting with managed Life Agent OS instances — Lago, Arcan, Autonomic, and Haima.

Life Services API

When you deploy a managed Life instance through the platform, it exposes a set of HTTP APIs for interacting with the Agent OS subsystems. These endpoints are available at your deployment's base URL.

Life services APIs are available on managed deployments (Team and Enterprise plans). For local usage, run the Arcan daemon directly -- see Arcan.

Arcan -- Agent Runtime

The Arcan daemon provides the agent conversation loop with streaming responses.

Chat completion

POST /v1/chat
{
  "session_id": "my-session",
  "messages": [
    { "role": "user", "content": "Explain event sourcing." }
  ],
  "provider": "anthropic",
  "model": "claude-sonnet-4-20250514"
}
FieldTypeRequiredDescription
session_idstringYesSession identifier for event persistence
messagesarrayYesArray of message objects with role and content
providerstringNoLLM provider: anthropic, openai, mock (default: configured provider)
modelstringNoModel identifier (default: configured model)

The response is an SSE stream in one of four supported formats. Set the format query parameter or Accept header to select:

FormatQuery / HeaderUse case
Lagoformat=lagoNative event format for Lago clients
OpenAIformat=openaiCompatible with OpenAI client libraries
Anthropicformat=anthropicCompatible with Anthropic client libraries
Vercelformat=vercelCompatible with Vercel AI SDK useChat / streamText

The Vercel format emits UiPart objects compatible with AI SDK v6, including text-delta, tool-call, tool-result, and finish events.

List sessions

GET /v1/sessions

Returns all active sessions with their metadata and message counts.

{
  "sessions": [
    {
      "id": "my-session",
      "branch": "main",
      "event_count": 42,
      "created_at": "2026-03-22T10:00:00Z",
      "last_event_at": "2026-03-22T11:30:00Z"
    }
  ]
}

Get session events

GET /v1/sessions/{session_id}/events

Returns the raw event stream for a session -- every event that occurred during the agent's execution, in chronological order. Each event is an EventEnvelope with a ULID, stream ID, event kind, payload, checksum, and metadata.

Query parameterTypeDescription
afterstringCursor (ULID) to start after
limitnumberMaximum events to return
{
  "events": [
    {
      "id": "01J...",
      "stream_id": "my-session",
      "kind": "UserMessage",
      "timestamp": 1711234567000,
      "payload": { "content": "Hello" }
    }
  ]
}

Lago -- Persistence Substrate

Lago provides the event journal, blob storage, and knowledge index.

Append events

POST /v1/journal/append

Append one or more events to the journal. Events are immutable and content-addressed (SHA-256 checksum of payload).

{
  "stream_id": "my-session",
  "events": [
    {
      "kind": "UserMessage",
      "payload": { "content": "Hello from the API" }
    }
  ]
}

Query events

GET /v1/journal/events?stream_id={id}&after={cursor}

Read events from a stream, optionally starting after a cursor position. Events are returned in append order (ULID-sorted).

Query parameterTypeDescription
stream_idstringLogical stream identifier
afterstringULID cursor -- return events after this ID
limitnumberMaximum events to return

Blob storage

POST /v1/blobs

Upload a blob (file, image, document). The blob is content-addressed (SHA-256) and compressed with zstd. Returns the hash for future retrieval.

{
  "hash": "sha256:a1b2c3d4...",
  "size": 12345,
  "compressed_size": 8901
}
GET /v1/blobs/{hash}

Retrieve a blob by its content hash. The blob is decompressed before delivery.

GET /v1/knowledge/search?q={query}&limit={n}

Search the knowledge index using scored text matching. The knowledge index is built from document frontmatter, wikilinks, and extracted facts. Results are ranked by a TF-IDF-inspired scoring function.

{
  "results": [
    {
      "id": "doc_abc",
      "title": "Event Sourcing Patterns",
      "score": 0.87,
      "excerpt": "...event sourcing stores state changes as an immutable sequence..."
    }
  ]
}

Knowledge graph traversal

GET /v1/knowledge/graph?node={id}&depth={n}

Traverse the knowledge graph from a starting node, following wikilink edges to a specified depth.

{
  "root": "doc_abc",
  "depth": 2,
  "nodes": [
    { "id": "doc_abc", "title": "Event Sourcing", "depth": 0 },
    { "id": "doc_def", "title": "CQRS Pattern", "depth": 1, "edge": "related_to" },
    { "id": "doc_ghi", "title": "Domain Events", "depth": 2, "edge": "references" }
  ]
}

Memory API

GET /v1/memory?session_id={id}

Retrieve the memory projection for a session -- a computed view of all memory events (facts, preferences, decisions) stored during the session.

POST /v1/memory

Store a new memory event (typically called by Arcan's governed memory tools).

{
  "session_id": "my-session",
  "fact": "User prefers Rust for systems programming",
  "source": "conversation",
  "relevance": 0.92
}

Autonomic -- Homeostasis Controller

Autonomic provides advisory regulation across three pillars: operational, cognitive, and economic.

Get homeostatic state

GET /v1/autonomic/state

Returns the current homeostatic state projection -- a deterministic fold over all events in the system:

{
  "operational": {
    "health": 0.92,
    "uptime_seconds": 86400,
    "error_rate": 0.003,
    "latency_p95_ms": 450
  },
  "cognitive": {
    "context_utilization": 0.67,
    "memory_pressure": "normal",
    "task_completion_rate": 0.94
  },
  "economic": {
    "mode": "sovereign",
    "budget_remaining": 4200,
    "burn_rate_per_hour": 12,
    "runway_hours": 350
  }
}

Get gating profile

GET /v1/autonomic/gating

Returns the current gating profile -- a set of rules that determine which operations are allowed, warned, or blocked based on the homeostatic state:

{
  "profile": "conserving",
  "gates": {
    "expensive_model": "warn",
    "cheap_model": "allow",
    "tool_execution": "allow",
    "web_search": "allow",
    "file_write": "allow",
    "speculative_research": "block",
    "long_context": "warn"
  }
}

Gate decisions:

DecisionMeaning
allowOperation proceeds normally
warnOperation proceeds but is logged as potentially wasteful
blockOperation is denied with an explanation

The economic modes (Sovereign, Conserving, Hustle, Hibernate) use hysteresis gates to prevent flapping between states. See Autonomic for threshold details.

Health check

GET /v1/autonomic/health
{
  "status": "healthy",
  "uptime_seconds": 86400
}

Haima -- Finance Engine

Haima provides the x402 payment layer for machine-to-machine transactions.

Get wallet balance

GET /v1/haima/balance

Returns the agent's wallet balance and recent financial events:

{
  "wallet": {
    "address": "0x...",
    "chain": "eip155:8453",
    "balance_usdc": "42.50"
  },
  "credits": {
    "available": 4250,
    "pending": 0
  }
}

Submit payment

POST /v1/haima/pay

Submit an x402 payment for a task or service. The payment is verified on-chain and recorded as an immutable Lago event (finance.payment_sent).

{
  "recipient": "0x...",
  "amount_usdc": "0.05",
  "task_id": "task_abc123",
  "memo": "Deep research query"
}

Transaction history

GET /v1/haima/history

Returns the transaction history with cost and revenue events:

{
  "events": [
    {
      "type": "finance.task_billed",
      "task_id": "task_abc123",
      "cost": 15,
      "category": "inference",
      "provider": "anthropic",
      "timestamp": "2026-03-22T10:30:00Z"
    },
    {
      "type": "finance.revenue_received",
      "task_id": "task_abc123",
      "amount": 50,
      "source": "marketplace",
      "timestamp": "2026-03-22T10:31:00Z"
    }
  ]
}

Health check

GET /v1/haima/health
{
  "status": "healthy",
  "wallet_connected": true,
  "chain": "eip155:8453"
}

Authentication

Agent identity (Anima)

Agent identity in the Life Agent OS is provided by Anima. Each agent has an AgentSelf composed of an immutable soul, a dual keypair (Ed25519 for auth + secp256k1 for economics), and mutable beliefs. The Ed25519 key is the canonical signing key for the Agent Auth Protocol.

Service-to-service auth (current)

Life service APIs currently use HS256 JWT tokens with a shared AUTH_SECRET for service-to-service authentication. For managed deployments, use the deployment API key provided during provisioning:

curl -H "Authorization: Bearer $DEPLOYMENT_KEY" \
  https://your-instance.broomva.tech/v1/autonomic/state

Migration planned (BRO-58): The current HS256 shared secret auth is temporary. The target architecture uses per-agent Ed25519 JWTs signed by the agent's Anima keypair. This will unify agent identity with API authentication.

Public endpoints

Not all endpoints require authentication. Autonomic's trust score endpoint is public:

GET /v1/autonomic/trust-score/{agent_id}   # No auth required

This is an observability endpoint, not an auth endpoint -- do not confuse Autonomic's trust scores with agent authentication.

Error format

Life services return errors in the same format as the platform API:

{
  "error": {
    "code": "session_not_found",
    "message": "No session with ID 'xyz' exists."
  }
}

On this page