API Service
Start and stop
Local runtime notes
adaos api servestarts the local API directly, without the slot supervisor.- If
--portis passed explicitly, AdaOS persists the resulting local address aslocal_api_urlin.adaos/node.yaml. - Later
adaos api serveruns reuse that persisted local port unless you pass another explicit one. 8777and8778are the browser-discoverable local hub ports.- Use a port such as
8779if you want the browser client to stay on Root instead of auto-attaching to the local runtime. - Supervisor-managed runtime mode is separate: it owns port
8776, manages slots, and setsADAOS_SUPERVISOR_ENABLED=1. - Development runtimes with
ENV_TYPE=devdo not follow hub/root core-update signals by default; setADAOS_DEV_ALLOW_CORE_UPDATE=1only when deliberately testing the update machinery.
The API command manages a local FastAPI process and keeps a pidfile in runtime state. On restart and stop it attempts graceful shutdown first, then falls back to process termination when necessary.
Health and status
Unauthenticated endpoints:
GET /health/liveGET /health/ready
Authenticated examples:
GET /api/statusGET /api/servicesGET /api/node/statusGET /api/observe/stream
Authentication
Most operational endpoints require:
The CLI resolves this token automatically for local control operations.
Major API areas
/api/services/*: service skill supervision/api/skills/*: skill listing, install/update, runtime prepare/activate, uninstall/api/scenarios/*: scenario install, sync, push, uninstall/api/node/*: node status, reliability, control-plane projections, role, members, media, Yjs webspaces/api/observe/*: ingest, tail, and SSE stream/api/subnet/*: register, heartbeat, context, nodes, deregister/api/admin/*: drain, shutdown, lifecycle, and core-update orchestration/v1/root/*: root bootstrap, join-code flows, and Root MCP Foundation skeleton
Current control-plane projection facades under /api/node/* are intentionally narrow and aggregate-focused:
GET /api/node/control-plane/objects/selfGET /api/node/control-plane/projections/reliabilityGET /api/node/control-plane/projections/inventoryGET /api/node/control-plane/projections/neighborhood
Current Root MCP Foundation skeleton endpoints are exposed separately from /api/node/*:
GET /v1/root/mcp/foundationGET /v1/root/mcp/contractsGET /v1/root/mcp/descriptorsGET /v1/root/mcp/descriptors/{descriptor_id}GET /v1/root/mcp/targetsGET /v1/root/mcp/targets/{target_id}POST /v1/root/mcp/targetsPOST /v1/root/mcp/access-tokensGET /v1/root/mcp/access-tokensPOST /v1/root/mcp/access-tokens/{token_id}/revokePOST /v1/root/mcp/callGET /v1/root/mcp/auditPOST /v1/hub/control/reportGET /v1/hubs/control/reports
For the current Codex-in-VS-Code workflow, use the local bridge documented in Codex Test-Hub MCP. The current root surface is a Root MCP API foundation, not yet a direct remote MCP transport.
The current skeleton also applies root-side capability checks and scope hints:
- read-only bearer access is allowed only for the default development/registry/audit capabilities
- target lists and tool calls can be scoped by
X-AdaOS-Subnet-IdandX-AdaOS-Zone - root can issue bounded MCP access tokens for external clients, and those tokens carry inherited
subnet_id/zone/ target allowlists - root now also exposes token-management lifecycle endpoints for listing and revoking previously issued MCP access tokens
- target-bound
hub.*tools are now also gated by the managed target's publishedinfra_access_skillcapability surface - hub control reports may be verified with
X-AdaOS-Hub-Report-TokenwhenADAOS_ROOT_HUB_REPORT_TOKENis configured on root - hub control reports can refresh managed-target state on
root, includinginfra_access_skillmetadata such as web UI presence, observability hints, and token-management readiness, which now powers executable read-side operational tools such ashub.get_statusandhub.get_runtime_summary hub.get_operational_surfacenow exposes the publishedinfra_access_skillsurface for inspection, including web UI, observability, and token-management statehub.get_activity_logandhub.get_capability_usage_summarynow expose root-side observability projections forinfra_access_skillWebUI panels without introducing a separate observability API- target-scoped token management is available through typed
hub.issue_access_token,hub.list_access_tokens, andhub.revoke_access_tokenMCP tool calls, not only through root-direct token endpoints hub.get_logs,hub.run_healthchecks,hub.restart_service,hub.run_allowed_tests,hub.get_test_results,hub.deploy_ref, andhub.rollback_last_test_deploynow work as a local-pilot path only when the target publishesexecution_mode=local_process- local restart, test, and deploy flows are additionally bounded by target-published allowlists such as
allowed_services,allowed_test_paths, andallowed_deploy_refs - MCP tool responses and audit events now include richer trace metadata for request arguments, policy/routing context, and redaction hints
- broader remote deploy/rollback-style operations are still blocked until the target-side
infra_access_skillpath is implemented
Positioning Relative to Root MCP Foundation
The current FastAPI surface is a local runtime and node-control API. It is not the future Root MCP Foundation.
Phase 0 architectural positioning is:
- local HTTP remains useful for runtime, browser, CLI, and node operations
- broad agent-facing MCP should be introduced on
root, not by expanding every node into an open infrastructure endpoint - operational access to managed targets should prefer skill-mediated surfaces such as future
infra_access_skill - root MCP should publish root-curated descriptors and managed-target contracts, not expose a direct public SDK bridge
- external MCP clients should be able to target
rootwith scoped config such asroot_url,subnet_id,access_token, andzone - current
/api/node/control-plane/*endpoints should stay aggregate-focused and compatible with SDK-first control-plane contracts
This keeps AdaOS from conflating:
- local node API
- human-facing web control surfaces
- future root-hosted agent-facing MCP surfaces
Notes
/api/sayand/api/io/console/printstill exist, but the code marks them as deprecated in favor of bus-driven flows.- The API server also mounts additional routers for join flows, STT, NLU teacher functions, and external IO webhooks.