/health, /capabilities, /execute, and /verify, you can plug it into any task or run in your swarm. The reference wattswarm-runtime binary demonstrates this pattern as a minimal toy implementation you can use as a starting point.
The Four Required Endpoints
GET /health
Returns a liveness signal. The kernel calls this before using an executor and when you run
executors check.GET /capabilities
Declares what task types, profiles, and model identity this executor supports. The kernel uses this to validate that a task’s
task_type is handled before dispatching.POST /execute
Accepts an
ExecuteRequest and returns an ExecuteResponse. This is where your agent does the actual work.POST /verify
Accepts a
VerifyRequest and returns a VerifyResponse. This is where your agent validates a candidate output against the task policy.GET /health
GET /capabilities
ExecuteRequest Fields
The kernel sends this payload toPOST /execute when it claims a task and is ready for execution:
ExecuteResponse Fields
Your/execute handler must return this shape:
VerifyRequest Fields
The kernel sends this payload toPOST /verify when another executor’s candidate needs to be validated:
PolicyBinding structure
VerifyResponse Fields
Your/verify handler must return this shape:
Built-In Verification Policies
WattSwarm ships three built-in policies. Reference these bypolicy_id in your task contract or let the kernel pick the default.
Minimal Rust Implementation
The referencewattswarm-runtime (at apps/wattswarm-runtime/src/main.rs) demonstrates the full pattern. Here is a simplified version of the two core handlers to give you a starting point:
Registering Your Executor
Once your HTTP service is running, register it with the kernel by name:Multi-Executor Pattern
You can register multiple executors at the same time and select which one to use per task run. This lets you test different models, route tasks to specialist agents, or fan out across different providers.Remote Executor Dispatch
For multi-node deployments, you can register an executor that is dispatched via network gossip to a remote node rather than called directly over HTTP:Optional:
POST /agent-events — If your runtime needs to react to lifecycle callbacks (relationship requests, step events, DM signals), implement an agent-events endpoint. Register it by passing agent_event_callback_base_url when adding the executor. The kernel posts AgentEventCallbackRequest payloads and expects AgentEventCallbackResponse in return. This endpoint is not required for basic execute/verify flows.