Public REST API
Agent House API
Public chat, agents, models, and sandbox endpoints under /api/public/v1/agent-house.
Agent House API
Base: https://<APP_HOST>/api/public/v1/agent-house
Requires Authorization: Bearer wn_… and X-Workspace-Id.
Chat
| Method | Path | Scopes |
|---|---|---|
POST | /chat | ai_chat:write |
GET | /chat/history | ai_chat:read |
POST | /chat/sessions | ai_chat:write |
GET / PATCH / DELETE | /chat/sessions/:sessionId | ai_chat:read / write / delete |
Send a message
curl -X POST "https://<APP_HOST>/api/public/v1/agent-house/chat" \
-H "Authorization: Bearer wn_live_..." \
-H "X-Workspace-Id: <WORKSPACE_ID>" \
-H "Content-Type: application/json" \
-d '{
"message": "Summarize open tasks in the relaunch project.",
"model": {
"name": "claude-sonnet-4-5",
"version": "latest",
"reasoningLevel": "medium"
},
"allowEdit": true,
"allowWebSearch": false,
"noteIds": [],
"projectIds": ["proj_01..."],
"sessionId": null,
"agentId": null
}'| Field | Type | Required | Notes |
|---|---|---|---|
message | string | yes | User prompt |
model | object | yes | { name, version?, reasoningLevel? } |
allowEdit | boolean | no | Default true |
allowWebSearch | boolean | no | |
noteIds | string[] | no | Context notes |
projectIds | string[] | no | Context projects |
agentId | string | no | Optional agent |
sessionId | string | no | Continue a session |
streamTransport | socket | sse | no | Streaming transport |
Multipart: field name files for uploads (images/docs per product limits).
List history
curl "https://<APP_HOST>/api/public/v1/agent-house/chat/history?sessionId=ses_01...&limit=50" \
-H "Authorization: Bearer wn_live_..." \
-H "X-Workspace-Id: <WORKSPACE_ID>"Models & tools
curl "https://<APP_HOST>/api/public/v1/agent-house/models" \
-H "Authorization: Bearer wn_live_..." \
-H "X-Workspace-Id: <WORKSPACE_ID>"
curl "https://<APP_HOST>/api/public/v1/agent-house/tools" \
-H "Authorization: Bearer wn_live_..." \
-H "X-Workspace-Id: <WORKSPACE_ID>"Agents
| Method | Path | Scopes |
|---|---|---|
GET | /agents | ai_agents:read |
POST | /agents | ai_agents:write |
GET / PUT / PATCH / DELETE | /agents/:id | read / write / delete |
POST | /agents/:id/publish | ai_agents:write |
POST | /agents/delegate | ai_agents:execute |
Create agent
curl -X POST "https://<APP_HOST>/api/public/v1/agent-house/agents" \
-H "Authorization: Bearer wn_live_..." \
-H "X-Workspace-Id: <WORKSPACE_ID>" \
-H "Content-Type: application/json" \
-d '{
"name": "Docs assistant",
"instructions": "Help with Weave API and MCP setup. Prefer curl examples.",
"model_name": "claude-sonnet-4-5",
"model_provider": "anthropic",
"reasoning_level": "medium",
"mcp_allowed_tools": ["list_notes", "get_note", "list_projects"],
"language": "en"
}'Sandbox (execute)
Requires sandbox:execute.
curl -X POST "https://<APP_HOST>/api/public/v1/agent-house/sandbox/code" \
-H "Authorization: Bearer wn_live_..." \
-H "X-Workspace-Id: <WORKSPACE_ID>" \
-H "Content-Type: application/json" \
-d '{
"code": "print(2 + 2)",
"language": "python",
"timeoutMs": 15000
}'Also available: POST /sandbox/bash, /sandbox/files/write|read|list, /sandbox/server/start|url|stop.
LLM connections (BYOK)
curl -X POST "https://<APP_HOST>/api/public/v1/agent-house/connections" \
-H "Authorization: Bearer wn_live_..." \
-H "X-Workspace-Id: <WORKSPACE_ID>" \
-H "Content-Type: application/json" \
-d '{
"provider": "anthropic",
"title": "Personal Anthropic",
"secrets": { "apiKey": "sk-ant-..." },
"models": ["claude-sonnet-4-5"]
}'List providers: GET /agent-house/providers.