API Reference
REST API for b1e55ed.Base URL
Authentication
All endpoints exceptGET /health and GET /oracle/producers/{id}/provenance require a bearer token.
b1e55ed refuses to start if api.auth_token is empty unless B1E55ED_INSECURE_OK=1 is set.
Configure the token
Use the token
Error format
code values are stable identifiers intended for automation. Some endpoints may also return FastAPI HTTPException errors using {"detail": "..."}.
Health
GET /health
Liveness endpoint. No authentication required.
Response (200):
Brain
GET /brain/status
Current brain state derived from events.
Response (200):
401 auth.*
POST /brain/run
Runs one brain cycle synchronously. Blocked when kill switch level > 0.
Response (200):
401 auth.*, 423 kill_switch.active (includes level)
Signals
GET /signals
Lists recent signal events.
Query params:
domain(optional): filter bysignal.<domain>.*limit(default 100, max 500)offset(default 0)
200):
401 auth.*
POST /signals/submit
Submit a curator signal with contributor attribution.
Resolves contributor by node_id. Records attribution in contributor_signals.
Request:
200):
400 signal.invalid_type, 404 contributor.not_found, 401 auth.*
GET /signals/{signal_id}/attribution
Attribution data for a specific signal: contributor, source, outcome if settled.
Errors: 401 auth.*, 404 (signal not found)
Events / SSE
GET /events/stream
Server-Sent Events stream. Reconnect is safe.
Query params:
domain— filter by event domain (e.g.signal,alert,learning)since— resume from a specific event ID (inclusive)
Positions
GET /positions
Lists open positions.
Response (200):
GET /positions/{position_id}
Single position.
Errors: 404 {"detail":"Position not found"}, 401 auth.*
Producers
GET /producers/status
Health and last run metadata for known producers.
GET /producers/
Lists registered producers (database-backed).
POST /producers/register
Registers a producer record.
Request:
409 producer.duplicate
DELETE /producers/{name}
Deregisters a producer.
Errors: 404 producer.not_found
POST /producers/{id}/feedback
Submit signal outcome feedback from an agent. Feeds the learning loop.
Errors: 401 auth.*, 404 (producer not found)
Contributors
See also: contributors.md.GET /contributors/
Lists contributors.
POST /contributors/register
Registers a contributor.
Request:
409 contributor.duplicate
GET /contributors/{id}
Returns a contributor.
Errors: 404 contributor.not_found
DELETE /contributors/{id}
Removes a contributor.
Errors: 404 contributor.not_found
GET /contributors/{id}/score
Computes contributor score from attribution tables.
Errors: 404 contributor.not_found
GET /contributors/leaderboard
Top contributors.
Query params: limit (default 20)
GET /contributors/attestations
Lists contributors with an EAS UID in metadata.
GET /contributors/{id}/attestation
Returns the stored off-chain EAS attestation for a contributor.
Errors: 404 contributor.attestation_not_found|contributor.not_found
Karma / Treasury
GET /treasury
Karma state from config and DB.
Response (200):
GET /karma/intents
Lists pending karma intents.
POST /karma/settle
Records settlement for a set of intents.
Request:
GET /karma/receipts
Lists settlement receipts.
Regime
GET /regime
Current regime and last change timestamp.
Response (200):
Config
GET /config
Current in-memory configuration.
POST /config/validate
Validates a config payload (does not persist).
POST /config
Validates and writes config/user.yaml, updates the in-process config.
Agent
POST /mcp
MCP JSON-RPC 2.0 server. See: agent-interfaces.md.
Auth: Required
List tools:
get_brain_status, get_recent_signals, get_open_positions, get_signal_attribution, emit_producer_signal, b1e55ed_provenance_check
GET /capabilities
Returns supported tools, event domains, and producer list. Use for agent onboarding.
Auth: Required
POST /trace/sessions
Create a trace session for stateful agent interaction tracking.
GET /trace/sessions
List trace sessions.
GET /trace/sessions/{id}
Get session state.
DELETE /trace/sessions/{id}
Close a trace session.
Oracle
GET /oracle/producers/{producer_id}/provenance
Producer provenance data. No authentication required.
Every response includes:
200, producer with history):
200, unknown producer):