All
/v1HTTP endpoints for agent management, providers, skills, traces, and more.
GoClaw's HTTP API is served on the same port as the WebSocket gateway. All endpoints require a Bearer token in the Authorization header matching GOCLAW_GATEWAY_TOKEN.
Base URL: http://<host>:<port>
Auth header:
Authorization: Bearer YOUR_GATEWAY_TOKEN
User identity header (optional, for per-user scoping):
X-GoClaw-User-Id: user123
List all agents.
curl http://localhost:18790/v1/agents \
-H "Authorization: Bearer TOKEN"Create a new agent.
curl -X POST http://localhost:18790/v1/agents \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-d '{
"agent_key": "researcher",
"display_name": "Research Assistant",
"agent_type": "open",
"provider": "anthropic",
"model": "claude-sonnet-4-5-20250929",
"context_window": 200000,
"max_tool_iterations": 20,
"workspace": "~/.goclaw/workspace-researcher"
}'Get a single agent by ID.
Update an agent. Send only the fields to change.
Delete an agent.
Regenerate agent context files from templates.
Re-trigger LLM-based summoning for predefined agents.
| Method | Path | Description |
|---|---|---|
GET |
/v1/agents/{id}/shares |
List shares for an agent |
POST |
/v1/agents/{id}/shares |
Share agent with a user |
DELETE |
/v1/agents/{id}/shares/{userID} |
Revoke a share |
List all LLM providers.
Create an LLM provider.
curl -X POST http://localhost:18790/v1/providers \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "my-openrouter",
"display_name": "OpenRouter",
"provider_type": "openai_compat",
"api_base": "https://openrouter.ai/api/v1",
"api_key": "sk-or-...",
"enabled": true
}'Get a provider by ID.
Update a provider.
Delete a provider.
List models available from the provider (proxied to the upstream API).
Pre-flight check — verify the API key and model are reachable.
Check Claude CLI authentication status (global, not per-provider).
List all skills.
Upload a skill as a .zip file (max 20 MB).
curl -X POST http://localhost:18790/v1/skills/upload \
-H "Authorization: Bearer TOKEN" \
-F "file=@my-skill.zip"Get skill metadata.
Update skill metadata.
Delete a skill.
| Method | Path | Description |
|---|---|---|
POST |
/v1/skills/{id}/grants/agent |
Grant skill to an agent |
DELETE |
/v1/skills/{id}/grants/agent/{agentID} |
Revoke agent grant |
POST |
/v1/skills/{id}/grants/user |
Grant skill to a user |
DELETE |
/v1/skills/{id}/grants/user/{userID} |
Revoke user grant |
GET |
/v1/agents/{agentID}/skills |
List skills accessible to an agent |
List LLM traces. Supports query params: agentId, userId, status, limit, offset.
curl "http://localhost:18790/v1/traces?agentId=UUID&limit=50" \
-H "Authorization: Bearer TOKEN"Get a single trace with all its spans.
List all MCP server configurations.
Register an MCP server.
curl -X POST http://localhost:18790/v1/mcp/servers \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "filesystem",
"transport": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"],
"enabled": true
}'Transport options: "stdio", "sse", "streamable-http".
Get an MCP server.
Update an MCP server.
Delete an MCP server.
Test connectivity to an MCP server before saving.
List tools discovered from a running MCP server.
| Method | Path | Description |
|---|---|---|
GET |
/v1/mcp/servers/{id}/grants |
List grants for a server |
POST |
/v1/mcp/servers/{id}/grants/agent |
Grant server to an agent |
DELETE |
/v1/mcp/servers/{id}/grants/agent/{agentID} |
Revoke agent grant |
GET |
/v1/mcp/grants/agent/{agentID} |
List all grants for an agent |
POST |
/v1/mcp/servers/{id}/grants/user |
Grant server to a user |
DELETE |
/v1/mcp/servers/{id}/grants/user/{userID} |
Revoke user grant |
| Method | Path | Description |
|---|---|---|
POST |
/v1/mcp/requests |
Submit an access request |
GET |
/v1/mcp/requests |
List pending requests |
POST |
/v1/mcp/requests/{id}/review |
Approve or reject a request |
List custom (DB-backed) tools.
Create a custom tool.
curl -X POST http://localhost:18790/v1/tools/custom \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "run_tests",
"description": "Run the test suite",
"parameters": {},
"command": "npm test",
"working_dir": "/app",
"timeout_seconds": 120,
"enabled": true
}'Get a custom tool.
Update a custom tool.
Delete a custom tool.
List all built-in tools with their enabled/disabled status.
Get a built-in tool by name.
Enable or disable a built-in tool.
curl -X PUT http://localhost:18790/v1/tools/builtin/exec \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-d '{ "enabled": false }'List all channel instances from the database.
Create a channel instance.
curl -X POST http://localhost:18790/v1/channels/instances \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "my-telegram-bot",
"channel_type": "telegram",
"agent_id": "AGENT_UUID",
"credentials": { "token": "BOT_TOKEN" },
"enabled": true
}'Get a channel instance.
Update a channel instance.
Delete a channel instance.
| Method | Path | Description |
|---|---|---|
GET |
/v1/channels/instances/{id}/writers/groups |
List groups with write permissions |
GET |
/v1/channels/instances/{id}/writers |
List authorized writers |
POST |
/v1/channels/instances/{id}/writers |
Add a writer |
DELETE |
/v1/channels/instances/{id}/writers/{userId} |
Remove a writer |
List delegation history (agent-to-agent task handoffs).
Get a single delegation record.
| Method | Path | Description |
|---|---|---|
GET |
/v1/auth/openai/status |
Check OpenAI OAuth status |
POST |
/v1/auth/openai/start |
Initiate OAuth flow |
POST |
/v1/auth/openai/callback |
Handle OAuth callback manually |
POST |
/v1/auth/openai/logout |
Remove stored OAuth tokens |
Success:
{ "id": "uuid", "name": "...", ... }Error:
{ "error": "agent not found" }HTTP status codes follow REST conventions: 200 OK, 201 Created, 400 Bad Request, 401 Unauthorized, 404 Not Found, 500 Internal Error.
- WebSocket Protocol — real-time RPC for chat and agent events
- Config Reference — full
config.jsonschema - Database Schema — table definitions and relationships