Base Adapter¶
Abstract adapter interface for agent implementations.
AgentAdapter ABC -- the contract between the orchestrator and any AI agent.
The interface is intentionally minimal: start, wait, stop, is_alive. This keeps agent backends decoupled from orchestration logic and makes it easy to add new agent types without modifying the orchestrator.
Lifecycle
start(task)receives a TaskContext containing the workspace path, task description, acceptance criteria, and attached context.wait(on_message)blocks until the agent finishes. While running it streams progress via theon_messagecallback (a MessageCallback), which the orchestrator wires up to a Discord thread for live output.stop()forcefully terminates the agent (e.g. on cancellation).is_alive()lets the heartbeat monitor detect dead agents.
The MessageCallback type (async (str) -> None) enables real-time
streaming of agent output to Discord threads without the adapter needing
to know anything about Discord.
See specs/adapters/claude.md for the full behavioral specification.