Local Context API · /v1

Small packets. Clear boundaries.

All endpoints bind to loopback and require a per-process bearer token. The API is local-first in v1; hosted accounts and public provider calls are deferred.

Base URL: http://127.0.0.1:<ephemeral-port>/v1. The TUI starts the API automatically and falls back in-process if a loopback listener is unavailable.
MethodPathPurpose
GET/healthService status and connector count
POST/sessionsCreate a session with cap, pack size, and weights
POST/context/chunksIngest a context chunk and vector
POST/context/queryRetrieve the packet
GET/connectorsList real endpoint manifests
POST/connectors/discoverImport manifests
POST/connectors/:id/allowAllowlist an endpoint
POST/connectors/:id/reportFreeze / report / blacklist
POST/hunts/estimateEstimate calls and $0.50 default price
POST/huntsExecute a stateless pack turn
GET/proofs/:idRead the signed proof chain record

Hunt request

POST /v1/hunts
{
  "sessionId": "session-uuid",
  "prompt": "Compare approaches and return a concise recommendation.",
  "responseMode": "text",
  "packSize": 24,
  "wideHunt": false,
  "outputLimit": 500
}

Invariants

  • No connector receives the session transcript.
  • No failed gate commits a charge.
  • No secret is written to SQLite or logs.
  • No model holds the context hive.