agora.mcp.handlers
MCP tool handlers.
Each handler is a plain async callable that takes a dict of validated arguments and returns a JSON-serializable dict. Handlers live separate from transport (stdio / HTTP / SSE) so they can be unit-tested directly without running a real MCP session.
The AgoraHandlers class holds a running orchestrator plus a small
in-memory registry of spawned agents, projects, flows, and tasks for lookup by
id. State is intentionally ephemeral — the canonical source is the Matrix room
graph; this registry is a cache so the MCP caller can reference objects by id
without rehydrating on every call.
Classes
Thin bridge between MCP tool calls and the |
- class agora.mcp.handlers.AgoraHandlers[source]
Bases:
objectThin bridge between MCP tool calls and the
Orchestrator.- async spawn_agent(args)[source]
Create an identity room for a new agent. Returns
{agent_id, room_id}.
- async list_flows(_args=None)[source]
List known flows — both the ones created this session and YAML files on disk.
- async validate_flow(args)[source]
Parse + validate a flow YAML snippet. Returns
{valid, errors, summary}.
- async get_kanban(args)[source]
Return a kanban snapshot derived from the handler registry.
The pure observe.kanban.build_kanban function operates on Matrix events; for the in-memory registry we emit synthetic task events so the same fold applies and the two paths cannot diverge.