Docs: Getting Started · Tutorial · Configuration · Agents · API Reference · Pipelines · Async Jobs · Webhooks · Client Usage · Tools Proxy · Security · Process Pool · Testing · Troubleshooting
All endpoints require Authorization: Bearer <token> unless noted otherwise.
List all registered agents.
curl -s http://localhost:18010/agents \
-H "Authorization: Bearer $ACP_BRIDGE_TOKEN"Response:
{
"agents": [
{"name": "kiro", "mode": "acp", "description": "Kiro CLI agent"},
{"name": "claude", "mode": "acp", "description": "Claude Code agent"}
]
}Synchronous or streaming agent call.
Input format note: The
inputfield uses the ACP protocol message format (nestedpartsarray). If this feels verbose, useacp-client.shwhich wraps it for you:./skill/scripts/acp-client.sh -a kiro "Hello" # no JSON needed
Request body:
| Field | Type | Required | Description |
|---|---|---|---|
agent_name |
string | Yes | Agent to call |
input |
array | Yes | ACP input: [{"parts": [{"content": "...", "content_type": "text/plain"}]}] |
stream |
boolean | No | true for SSE streaming (default: false) |
session_id |
string | No | Reuse an existing session for multi-turn |
cwd |
string | No | Working directory override |
# Sync
curl -s -X POST http://localhost:18010/runs \
-H "Authorization: Bearer $ACP_BRIDGE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"agent_name":"kiro","input":[{"parts":[{"content":"Hello","content_type":"text/plain"}]}]}'
# Streaming (SSE)
curl -N -X POST http://localhost:18010/runs \
-H "Authorization: Bearer $ACP_BRIDGE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"agent_name":"kiro","input":[{"parts":[{"content":"Hello","content_type":"text/plain"}]}],"stream":true}'
⚠️ Useinputwith apartsarray — NOTprompt. Using{"prompt":"..."}returnsinvalid_input: Field required.
Submit an async background job. See Async Jobs for full details.
| Field | Type | Required | Description |
|---|---|---|---|
agent_name |
string | Yes | Agent to run |
prompt |
string | Yes | Task prompt |
target |
string | No | Webhook push target (e.g. channel:123, user:456) |
channel |
string | No | IM channel (discord, feishu) |
callback_meta |
object | No | Extra webhook metadata (e.g. {"account_id": "default"}) |
List all jobs with status stats.
Query a single job by ID.
Submit a multi-agent pipeline. See Pipelines for full details.
| Field | Type | Required | Description |
|---|---|---|---|
mode |
string | Yes | sequence, parallel, race, or conversation |
steps |
array | Yes | [{"agent": "kiro", "prompt": "..."}] |
max_turns |
integer | No | Conversation mode only (default: 6, max: 12) |
target |
string | No | Webhook push target |
channel |
string | No | IM channel |
List all pipelines.
Query a single pipeline by ID.
Per-mode aggregation stats. Optional ?hours=N query param (default: 168 = 7 days).
Create a dynamic harness agent at runtime.
curl -X POST http://localhost:18010/harness \
-H "Authorization: Bearer $ACP_BRIDGE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"profile":"reviewer","system_prompt":"Review Python code for security issues"}'| Field | Type | Required | Description |
|---|---|---|---|
profile |
string | Yes | Preset name (e.g. reviewer, developer, operator) |
system_prompt |
string | No | Custom system prompt |
model |
string | No | Model alias (default: auto) |
List dynamic harness agents. Response includes resolved_model (populated after first call).
Delete a dynamic harness agent.
Upload a file (multipart form data).
curl -X POST http://localhost:18010/files \
-H "Authorization: Bearer $ACP_BRIDGE_TOKEN" \
-F "file=@data.csv"List uploaded files.
Delete an uploaded file.
List available OpenClaw tools. See Tools Proxy.
Invoke an OpenClaw tool.
curl -X POST http://localhost:18010/tools/invoke \
-H "Authorization: Bearer $ACP_BRIDGE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"tool":"message","action":"send","args":{"channel":"discord","target":"channel:123","message":"Hello"}}'Mesh endpoints are registered only when mesh.enabled: true. See A2A Mesh for setup details.
Public A2A Agent Card. No Bearer token is required.
curl -s http://localhost:18010/.well-known/agent.jsonPeer discovery endpoint. Uses mesh.token, not the global Bridge token.
curl -s -X POST http://localhost:18010/a2a/announce \
-H "Authorization: Bearer $MESH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"agent_card":{"url":"http://peer:18010","skills":[]},"peers":[]}'Peer table for debugging. Requires the global Bridge token.
curl -s http://localhost:18010/a2a/peers \
-H "Authorization: Bearer $ACP_BRIDGE_TOKEN"Save a chat message.
Load recent chat messages. Optional ?session_id= query param.
Clear all chat messages.
Fold (collapse) a session's messages in the UI.
List available prompt templates.
Render a template with variables.
curl -X POST http://localhost:18010/templates/render \
-H "Authorization: Bearer $ACP_BRIDGE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"template":"code-review","variables":{"file":"src/agents.py"}}'Close a session and release its subprocess.
Lightweight liveness probe. Returns HTTP 200 when the Bridge HTTP process is running.
Readiness probe. Returns HTTP 200 when at least one agent is configured. A lazy ACP process pool may still be cold; agents are spawned on the first request.
Detailed three-state health check: ok, degraded, unhealthy. Includes process pool watermark, system memory, uptime, and agent_states counts. Agent state is cold before its first on-demand spawn, ready when a process is alive, and down only after an explicit health failure. A cold pool returns HTTP 200.
Per-agent status with high-level state (cold/ready/down/on_demand/remote) and per-session connection state (idle/busy/stale/dead).
Agent call statistics: total calls, durations, tool usage by category.
Web UI chat interface (requires --ui flag or server.ui: true).
Transparent pass-through to the LiteLLM instance. Forwards any GET/POST request.
curl -s http://localhost:18010/litellm/v1/chat/completions \
-H "Authorization: Bearer $ACP_BRIDGE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"model":"bedrock/deepseek.v3.2","messages":[{"role":"user","content":"hi"}],"max_tokens":10}'Query token usage, cache rates, and per-model breakdown.
| Param | Default | Description |
|---|---|---|
hours |
24 |
Time window |
model |
Filter by model name |
curl -s http://localhost:18010/usage -H "Authorization: Bearer $ACP_BRIDGE_TOKEN"Response:
{
"hours": 24.0,
"calls": 5,
"input_tokens": 120,
"output_tokens": 85,
"total_tokens": 205,
"cached_tokens": 40,
"cache_rate_pct": 33.3,
"avg_duration_s": 0.82,
"by_model": [
{"model": "bedrock/deepseek.v3.2", "calls": 3, "input_tokens": 60, ...}
]
}| Param | Default | Description |
|---|---|---|
limit |
20 |
Number of records |
Receives StandardLoggingPayload from LiteLLM generic_api callback. Requests from non-loopback clients are rejected with HTTP 403. Not intended for direct use.
Every prompt actually sent to an agent (across pipelines, jobs, and heartbeats) is recorded into data/jobs.db for post-mortem and replay. Each record stores:
template— the original user-supplied prompt (for pipeline steps:prompt_template; for jobs: raw input)rendered— after{{var}}substitution from pipeline contextfinal— what actually reached the agent (includesshared_workspace*.txthint andget_prompt_suffix())decorations— list of layers applied, e.g.["shared_workspace_zh", "prompt_suffix"]
Default response omits the large prompt fields. Pass ?include=final to retrieve them.
Privacy: With
prompt_log.redact_secrets: true(default), values matching OPERATIONS.md sensitive patterns are masked before write — see Security.
Records for every step (and every conversation turn) in a pipeline.
| Param | Default | Description |
|---|---|---|
include |
(none) | Comma-separated extras: final to also return template/rendered/final |
curl -s "http://localhost:18010/pipelines/$PID/prompts?include=final" \
-H "Authorization: Bearer $ACP_BRIDGE_TOKEN"Records for a job (one per attempt, if fallback fired).
curl -s "http://localhost:18010/jobs/$JID/prompts?include=final" \
-H "Authorization: Bearer $ACP_BRIDGE_TOKEN"Cross-cutting search across all parent types.
| Param | Default | Description |
|---|---|---|
parent_type |
(any) | job / pipeline_step / heartbeat |
agent |
(any) | Filter by agent name |
limit |
50 |
Max records (1–500) |
include |
(none) | final to include large fields |
# Latest 10 prompts sent to opengame across any path
curl -s "http://localhost:18010/admin/prompts?agent=opengame&limit=10" \
-H "Authorization: Bearer $ACP_BRIDGE_TOKEN"Direct single-record lookup; returns final by default.
curl -s "http://localhost:18010/admin/prompts/<record_id>" \
-H "Authorization: Bearer $ACP_BRIDGE_TOKEN"Set prompt_log.enabled: false in config.yaml and restart. The endpoints will return 503 prompt logging disabled.
All requests receive an X-Request-Id response header. Pass your own via the request header to stitch traces across services (e.g. OpenClaw → Bridge → agent logs).
- Client Usage — CLI client examples
- Async Jobs — background tasks and webhooks
- Pipelines — multi-agent orchestration
- Security — authentication details