API Overview
Agent HQ exposes a REST API for programmatic access to tasks, conversations, projects, and workspaces. All endpoints are under the /api prefix.
Authentication
Section titled “Authentication”All API requests require authentication via session cookies. When you’re logged in to Agent HQ, your browser session automatically authenticates API requests.
For programmatic access, use the authentication endpoints to obtain a session. See Authentication for details.
Base URL
Section titled “Base URL”https://your-instance.workers.dev/apiReplace your-instance.workers.dev with your Agent HQ deployment URL.
Request format
Section titled “Request format”- Content-Type:
application/jsonfor request bodies - Method: Standard HTTP methods (GET, POST, PUT, DELETE)
- Response: JSON with appropriate HTTP status codes
Common response patterns
Section titled “Common response patterns”Success
Section titled “Success”{ "id": "abc123", "title": "Fix login bug", "status": "done"}{ "error": "Task not found"}[ { "id": "abc123", "title": "Task 1" }, { "id": "def456", "title": "Task 2" }]Rate limiting
Section titled “Rate limiting”API requests are subject to Cloudflare Workers’ built-in limits. For most deployments, this is 1,000 requests per minute.
Endpoints at a glance
Section titled “Endpoints at a glance”| Resource | Endpoints |
|---|---|
| Authentication | Login, logout, OAuth flows |
| Tasks | CRUD, execute, interrupt, logs, files, annotations |
| Conversations | CRUD, messages, suggestions |
| Projects | CRUD, files, merge |
| Workspaces | Settings, members, invitations |