Control Surfaces
This page defines the user-facing control surfaces for Toolang:
- the CLI
- the known-agent registry
- the per-agent HTTP API
- the shared bus HTTP API
CLI surface
Top-level command groups:
- agent lifecycle
newcloneremovelist
- state materialization
sync
- execution
invokerunstart
- capability management
skillservicepromptpsyche
- shared bus
bus serve
Hidden helper commands:
homesourceroominit
Rules:
- all execution commands accept an agent selector
invokeis caller-driven one-shot foreground executionrunruns theserverloop in the foreground and may enable extra loopsstartlaunches the selected runtime-loop set in the background
Known-agent registry
Toolang stores global registry state in:
${TOOLANG_ROOT}/agents.db
Logical tables:
agentsrunning_agents
Known-agent fields include:
agent_uriagent_idagent_nameagent_homesource_fileupdated_at
Running-agent fields include:
agent_uripidstatussandboxstarted_atheartbeat_atendpoint
Shared event projection
Toolang stores shared bus projection state in:
${TOOLANG_ROOT}/bus/events.db
This database is:
- written directly by local agent processes
- readable even when no standalone bus server is running
- a projection, not the only execution truth
Core event families:
agent_startedagent_stoppedagent_updatedrun_startedrun_finishedrun_failed
Agent API
Each started agent exposes a local HTTP API.
Endpoints:
GET /healthzGET /api/v1/healthGET /api/v1/agentGET /api/v1/profileGET /api/v1/runtimeGET /api/v1/capsGET /api/v1/tasksPUT /api/v1/tasks/{task_id}PATCH /api/v1/tasks/{task_id}GET /api/v1/choresGET /api/v1/willPOST /api/v1/chatPOST /api/v1/chat/streamGET /api/v1/chatsGET /api/v1/chats/{thread_id}GET /api/v1/runsGET /api/v1/runs/{run_id}GET /api/v1/eventsGET /api/v1/events/streamPOST /api/v1/runs
Bus API
Toolang also exposes a root-level HTTP API over bus/events.db.
Endpoints:
GET /healthzGET /api/v1/agentsGET /api/v1/agents/{agent_id}POST /api/v1/agents/{agent_id}/chatPOST /api/v1/agents/{agent_id}/chat/streamGET /api/v1/runsGET /api/v1/eventsGET /api/v1/agents/{agent_id}/eventsGET /api/v1/events/streamGET /api/v1/agents/{agent_id}/events/stream
Responsibilities:
- list known and active agents
- list global or per-agent runs and events
- proxy chat requests to active agent endpoints
- provide one local endpoint for multi-agent UI integration
Read next
- Read Execution Model for the runtime behavior behind these surfaces.
- Read Layout and Storage for where the registry and bus projection live on disk.