Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.mycelium-ai.co/llms.txt

Use this file to discover all available pages before exploring further.

The runtime is a FastAPI service. Every route outside /healthz requires a tenant-scoped JWT bearer token. The full OpenAPI document is published with the runtime; this page summarizes the surface.

Health

MethodPathAuthDescription
GET/healthznoneBuild status + tenant count.
GET/tenants/{tenant_id}/healthzJWTPer-tenant health (vault present, etc.).

Tenants

MethodPathAuthDescription
GET/tenantsJWTList tenants visible to the calling token.
GET/tenants/meJWTTenant identity decoded from the calling JWT.

Memory

The typed-memory surface. See /architecture/typed-memory for category definitions.
MethodPathAuthDescription
GET/memory/decisionsJWTList decisions for the calling tenant.
POST/memory/decisionsJWTCreate a decision entry.
GET/memory/decisions/{sha8}JWTRead a decision by SHA-8 id.
GET/memory/exceptionsJWTList exception entries.
POST/memory/exceptionsJWTCreate an exception entry.
GET/memory/exceptions/{sha8}JWTRead an exception by SHA-8 id.
GET/memory/factsJWTList fact entries.
POST/memory/factsJWTCreate a fact entry.
GET/memory/facts/{sha8}JWTRead a fact by SHA-8 id.
GET/memory/workflowsJWTList workflow entries.
POST/memory/workflowsJWTCreate a workflow entry.
GET/memory/workflows/{sha8}JWTRead a workflow by SHA-8 id.
GET/memory/relationshipsJWTList relationship entries.
POST/memory/relationshipsJWTCreate a relationship entry.
GET/memory/relationships/{sha8}JWTRead a relationship by SHA-8 id.
GET/memory/outcomesJWTList outcomes for resolved decisions.
POST/memory/outcomesJWTCreate an outcome entry.
GET/memory/outcomes/{sha8}JWTRead an outcome by SHA-8 id.
POST/memory/searchJWTBi-temporal + tag + embedding query.

Webhooks

Per-tenant inbound URLs. Each source signs with its own scheme. See /connectors/index for the source list and memory-runtime-pro README for signature details.
POST /webhooks/{source}/{tenant_id}
Sources covered: slack, github, notion, linear, gmail, salesforce, microsoft365, confluence, google_workspace, servicenow, workday, sap, box, snowflake, databricks, oracle, jira, hubspot, gitlab, dropbox, zoom, adp. WhatsApp arrives via an in-process bridge (not HTTP).

Admin

Operator-only routes. JWT must carry the admin claim (the reserved all-zeros tenant).

Tenant provisioning

MethodPathAuthDescription
POST/admin/tenantsadminCreate a tenant and return an initial tenant_admin JWT.
GET/admin/tenantsadminList all tenants with status and role count.
curl -X POST https://<runtime>/admin/tenants \
  -H "Authorization: Bearer $ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "Acme Corp"}'
# → {tenant_id, tenant_name, roles, token, ttl_seconds}

JWT minting

MethodPathAuthDescription
POST/admin/jwt/{tenant_id}adminMint a role-scoped JWT for an existing tenant.

RBAC roles

MethodPathAuthDescription
GET/admin/roles/{tenant_id}adminList the role library for a tenant.
POST/admin/roles/{tenant_id}adminCreate or replace a role.
DELETE/admin/roles/{tenant_id}/{role_name}adminDelete a role.

Webhooks & audit

MethodPathAuthDescription
GET/admin/webhooks/dead-letters/{tenant_id}adminList dead-lettered webhook events.
POST/admin/webhooks/replay/{tenant_id}/{event_id}adminReplay a specific dead-lettered event.
GET/admin/audit/denials/{tenant_id}adminTail recent RBAC denials for a tenant.
GET/admin/metrics/revenue-per-agent/{tenant_id}adminRevenue-per-agent pricing metric.
GET/admin/dashboardadminOperator HTML dashboard.

Authentication

All authenticated calls use bearer tokens:
Authorization: Bearer <jwt>
JWTs are minted via POST /admin/tenants (returns an initial token on creation), POST /admin/jwt/{tenant_id} (re-mint with specific roles), or the operator-side scripts/mint-jwt.py. Tokens are signed with MEMORY_RUNTIME_PRO_JWT_SECRET and scoped to one tenant_id.

Status codes

CodeMeaning
200OK
201Created
401Bad signature or missing JWT
403Cross-tenant write attempted
404Tenant or entry not found
422Schema validation failed
503Per-tenant secret missing in env