Skip to main content

API Reference

The WASP dashboard exposes a REST API for programmatic access. All endpoints require an authenticated session (cookie-based) except /health.

Authentication

# Login and capture session cookie
curl -c cookies.txt -X POST https://agentwasp.com/auth/login \
-d "password=your_dashboard_secret"

# Use cookie for subsequent requests
curl -b cookies.txt https://agentwasp.com/api/goals

Health

GET /health

No authentication required.

curl https://agentwasp.com/health
# → 200 OK (or 503 if unhealthy)

Chat

POST /chat/stream

Stream a chat response via SSE.

Request:

{"message": "What is the current BTC price?"}

Response: Server-Sent Events stream

data: {"type": "token", "content": "Let me"}
data: {"type": "token", "content": " check"}
data: {"type": "skill_call", "skill": "web_search", "args": {"query": "BTC price"}}
data: {"type": "skill_result", "skill": "web_search", "output": "BTC: $67,663"}
data: {"type": "token", "content": " Bitcoin is currently at $67,663."}
data: {"type": "done"}

Goals

GET /api/goals

List all goals.

Response:

[
{
"id": "goal-uuid",
"objective": "Monitor BTC price",
"status": "active",
"priority": 8,
"source": "user",
"created_at": "2026-03-09T18:00:00Z",
"tasks_total": 5,
"tasks_completed": 2
}
]

POST /api/goals

Create a new goal.

Request:

{
"objective": "Search for Python 3.13 release notes and summarize",
"priority": 8,
"source": "user"
}

DELETE /api/goals/{goal_id}

Cancel and delete a goal.

POST /api/goals/{goal_id}/replan

Force a replan for an active goal.

Agents

GET /api/agents

List all agents.

Response:

[
{
"id": "agent-uuid",
"name": "crypto_watcher",
"objective": "Monitor BTC and ETH prices",
"status": "running",
"priority": 6,
"created_at": "2026-03-09T12:00:00Z"
}
]

POST /api/agents

Create a new agent.

Request:

{
"name": "research_agent",
"objective": "Monitor Hacker News for AI news daily",
"priority": 6
}

PATCH /api/agents/{agent_id}

Update agent status (pause/resume/archive).

Request:

{"status": "paused"}

Memory

GET /api/memory/search

Search memories.

Query parameters:

  • q — Search query (required)
  • type — Memory type filter: episodic, semantic, procedural
  • limit — Max results (default: 20)

Response:

[
{
"id": "memory-uuid",
"type": "episodic",
"content": "User mentioned they prefer Python over JavaScript",
"created_at": "2026-03-08T10:00:00Z",
"relevance_score": 0.92
}
]

DELETE /api/memory/{memory_id}

Delete a specific memory.

Scheduler

GET /api/scheduler/jobs

List all scheduler jobs with timing info.

Response:

[
{
"name": "health_check",
"interval_seconds": 300,
"last_run": "2026-03-09T18:55:00Z",
"next_run": "2026-03-09T19:00:00Z",
"last_duration_ms": 45,
"last_success": true
}
]

POST /api/scheduler/run/{job_name}

Manually trigger a scheduler job.

curl -b cookies.txt -X POST https://agentwasp.com/api/scheduler/run/health_check

Skills

GET /api/skills

List all registered skills.

Response:

[
{
"name": "web_search",
"description": "Search the web using DuckDuckGo",
"enabled": true,
"capability_level": "monitored",
"parameters": [
{"name": "query", "type": "string", "required": true},
{"name": "max_results", "type": "integer", "required": false}
]
}
]

POST /api/skills/{skill_name}/toggle

Enable or disable a skill.

Integrations

GET /api/integrations

List all integration connectors.

POST /api/integrations/{integration_id}/configure

Configure an integration connector.

Request:

{
"credentials": {
"api_key": "your-api-key",
"workspace_id": "W123"
},
"autonomy_mode": "semi"
}

GET /api/integrations/{integration_id}/status

Get circuit breaker status for an integration.

Error Responses

All error responses follow this format:

{
"error": "Goal not found",
"code": 404
}

Error messages are capped at 120 characters and show only the first line of any exception for security.

Rate Limiting

  • Dashboard login: 5 attempts/minute per IP
  • All other endpoints: 10 requests/second per IP (nginx limit_req)