API Reference
All endpoints are served from the Abbado backend at http://localhost:7777. All REST endpoints use JSON request and response bodies. Prefix every path with /api.
Agents
GET /api/agents
List all agents.
# Response
[
{
"id": "uuid",
"name": "Claude Sonnet",
"provider": "claude-code",
"model": "sonnet",
"instructions": "You are a senior Go developer.",
"created_at": "2026-03-29T10:00:00.000"
}
] POST /api/agents
Create a new agent.
# Request
{
"name": "Claude Sonnet",
"provider": "claude-code",
"model": "sonnet",
"instructions": "You are a senior Go developer."
}
# Response: the created agent object PUT /api/agents/:id
Update an existing agent.
DELETE /api/agents/:id
Delete an agent. Fails if the agent is in use by any session.
Projects
GET /api/projects
List all projects.
# Response
[
{
"id": "uuid",
"name": "my-app",
"path": "/home/user/code/my-app",
"mode": "worktree",
"commands": [
{ "label": "Test", "icon": "test-tube", "command": "npm test" }
],
"created_at": "2026-03-29T10:00:00.000"
}
] POST /api/projects
Create a new project.
# Request
{
"name": "my-app",
"path": "/home/user/code/my-app",
"mode": "worktree"
} PUT /api/projects/:id
Update a project.
DELETE /api/projects/:id
Delete a project. Fails if the project has active sessions.
GET /api/projects/:id/branches
List git branches for the project's repository.
# Response
["main", "feature/auth", "fix/typo"] Sessions
GET /api/sessions
List all sessions. Includes agent, project, and status information.
POST /api/sessions
Create a new session. This launches the agent PTY and shell.
# Request
{
"project_id": "project-uuid",
"agent_id": "agent-uuid",
"branch": "feature/new-auth",
"reviewer_agent_id": "reviewer-uuid"
}
# Response: the created session object DELETE /api/sessions/:id
Delete a session. Terminates all PTYs and cleans up the worktree if applicable.
PUT /api/sessions/:id/reviewer
Set or remove the reviewer agent for a session.
# Request
{ "reviewer_agent_id": "agent-uuid" }
# Set to null to remove the reviewer
{ "reviewer_agent_id": null } PUT /api/sessions/:id/commands
Override the project's commands for this session.
# Request
{
"commands": [
{ "label": "Test", "icon": "test-tube", "command": "go test ./..." },
{ "label": "Lint", "icon": "search", "command": "golangci-lint run" }
]
} Terminal WebSockets
Connect via WebSocket to interact with session terminals. Messages are raw terminal I/O (binary frames). Reconnecting replays the scrollback buffer.
WS /api/sessions/:id/terminal/shell
Interactive shell terminal in the session's working directory.
WS /api/sessions/:id/terminal/agent
The main AI agent terminal.
WS /api/sessions/:id/terminal/reviewer
The reviewer agent terminal. Only available if a reviewer agent is configured.
WS /api/sessions/:id/terminal/runner
The command runner terminal. Used by run commands.
Runner
POST /api/sessions/:id/terminal/runner/exec
Execute a command in the runner terminal.
# Request
{ "command": "npm test" } POST /api/sessions/:id/terminal/runner/stop
Send SIGINT to the running process group in the runner terminal.
Changes
GET /api/sessions/:id/changes
List changed files in the session's working directory.
# Response
["src/main.go", "internal/handler/session.go", "README.md"] GET /api/sessions/:id/changes/diff
Get a unified diff of all changes.
GET /api/sessions/:id/changes/file?path=src/main.go
Get old and new content for a specific file (used by the Monaco diff editor).
# Response
{
"old_content": "package main\n...",
"new_content": "package main\n..."
} PUT /api/sessions/:id/changes/file
Save edited file content back to disk.
# Request
{
"path": "src/main.go",
"content": "package main\n..."
} Git Operations
POST /api/sessions/:id/commit
Commit changes. Optionally specify which files to include.
# Request
{
"message": "feat: add user authentication",
"files": ["src/auth.go", "src/middleware.go"]
}
# Omit "files" to commit all changes POST /api/sessions/:id/push
Push the current branch to origin.
POST /api/sessions/:id/pr
Create a GitHub pull request via the gh CLI.
# Request
{
"title": "Add user authentication",
"body": "## Summary\n- JWT-based auth middleware\n- Login and signup endpoints"
}
# Response
{ "url": "https://github.com/user/repo/pull/42" } AI Features
POST /api/sessions/:id/generate
Generate a commit message and PR title/body from the current diff. Uses claude -p with the Haiku model.
# Response
{
"commit_message": "feat: add JWT authentication middleware",
"pr_title": "Add user authentication",
"pr_body": "## Summary\n- JWT middleware for protected routes\n- Login and signup handlers"
} POST /api/sessions/:id/review
One-shot AI code review of the current diff. Returns markdown feedback.
# Response
{
"review": "## Review\n\n### Issues\n- Missing error handling in auth.go:42\n\n### Suggestions\n- Consider rate limiting on login endpoint"
} Hooks and Events
POST /api/sessions/:id/hook
Hook callback endpoint. Called by the AI agent's hook system (e.g., Claude Code hooks) to report status changes.
GET /api/sessions/:id/events
Server-Sent Events (SSE) stream for real-time session updates. Events include status changes, tool usage, and notifications.
# Example SSE event
data: {"type":"status","status":"working","tool":"Edit","timestamp":"..."} GET /api/sessions/:id/prompts
Get prompt history for the session (newest first).
Other
GET /api/health
Health check endpoint. Returns 200 OK.
GET /api/filesystem/dirs?path=/home/user
List directories at the given path. Used by the frontend for path autocomplete when creating projects.
# Response
["/home/user/code", "/home/user/projects", "/home/user/.config"]