Adadex exposes a local HTTP and WebSocket API.
The API has two different kinds of state:
- persisted project state, such as terminal records, Deck metadata, UI state, and transcripts
- in-memory runtime state, such as live PTYs, attached WebSockets, scrollback, and channel queues
Most HTTP routes either read/write persisted files or create runtime records. WebSocket routes attach clients to live PTY sessions owned by the API process.
GET /api/terminal-snapshots- returns the current terminal list and snapshot state for the UIPOST /api/terminals- creates a new terminal sessionPOST /api/terminals/prune- removes terminal records withstale,stopped, orexitedlifecycle statePATCH /api/terminals/:terminalId- updates terminal metadata such as the display nameDELETE /api/terminals/:terminalId- removes a terminal and closes its active sessionPOST /api/terminals/:terminalId/stop- stops an active session or recorded stale processPOST /api/terminals/:terminalId/kill- kills an active session or recorded stale processWS /api/terminals/:terminalId/ws- streams live terminal IO over WebSocket
Terminal snapshots include lifecycleState when known. Supported lifecycle states are registered, running, stopped, exited, and stale. Stale terminals are records that were persisted as running but could not be reattached to a live Adadex PTY session after startup.
Creating a terminal registers metadata first. A PTY starts immediately only when an initial prompt is provided, a WebSocket attaches, or an internal direct listener starts the session. Worktree terminals also create their worktree before the terminal record is exposed.
GET /api/coordinations/:coordinationId/git/status- reads git status for a worktree-backed coordinationPOST /api/coordinations/:coordinationId/git/commit- creates a commit from the coordination worktreePOST /api/coordinations/:coordinationId/git/push- pushes the coordination branchPOST /api/coordinations/:coordinationId/git/sync- syncs the coordination worktree with its base branchGET /api/coordinations/:coordinationId/git/pr- reads pull request information for the coordination branchPOST /api/coordinations/:coordinationId/git/pr/merge- merges the coordination pull request
GET /api/deck/skills- lists available Codex skills discovered from project-local.codex/skills/<skill>/SKILL.mdentriesGET /api/deck/coordinations- lists coordinations with metadata, vault files, and todo progressPOST /api/deck/coordinations- creates a new coordinationDELETE /api/deck/coordinations/:coordinationId- deletes a coordination and its stored filesPATCH /api/deck/coordinations/:coordinationId/skills- updates the coordination's suggested Codex skills and rewrites the managed block inCONTEXT.mdPOST /api/deck/coordinations/:coordinationId/todo- adds a todo item totodo.mdPATCH /api/deck/coordinations/:coordinationId/todo/toggle- marks a todo item done or undonePATCH /api/deck/coordinations/:coordinationId/todo/edit- edits the text of a todo itemPOST /api/deck/coordinations/:coordinationId/todo/delete- deletes a todo itemGET /api/deck/coordinations/:coordinationId/files/:filename- reads one markdown file from the coordination vaultPOST /api/deck/coordinations/:coordinationId/swarm- spawns worker terminals from incomplete todo items
Deck routes treat .adadex/coordinations/<coordination-id>/ as the source of truth for agent-facing context. Todo operations update todo.md by parsed item index. Swarm operations derive worker assignments from incomplete parsed todo items.
GET /api/prompts- lists available prompt templatesPOST /api/prompts- creates a user promptGET /api/prompts/:promptId- reads one promptPUT /api/prompts/:promptId- updates one promptDELETE /api/prompts/:promptId- deletes one prompt
GET /api/channels/:terminalId/messages- lists messages for one terminal channelPOST /api/channels/:terminalId/messages- sends a message to one terminal channel
Channel messages are queued in memory. The POST body provides fromTerminalId and content; delivery injects pending messages into the target terminal input when the target session is idle.
POST /api/code-intel/events- records one code-intel eventGET /api/code-intel/events- returns the stored code-intel event log
POST /api/hooks/:hookName- ingests lifecycle events coming from Codex CLI hooks
Current hook names:
session-startuser-prompt-submitpre-tool-usenotificationstop
GET /api/codex/usage- returns Codex usage data when availableGET /api/github/summary- returns GitHub summary and repo telemetry dataGET /api/analytics/usage-heatmap?scope=all|project- returns heatmap aggregates when session history is available
GET /api/ui-state- reads the persisted UI state for the current projectPATCH /api/ui-state- updates the persisted UI state
GET /api/setup- reads the verified first-run setup status for the current workspacePOST /api/setup/steps/:stepId- runs one setup step and returns the refreshed setup snapshot
GET /api/monitor/config- reads monitor configurationPATCH /api/monitor/config- updates monitor configurationGET /api/monitor/feed- returns the current monitor feed snapshotPOST /api/monitor/refresh- forces a monitor refresh
GET /api/conversations- lists stored conversationsDELETE /api/conversations- deletes all stored conversationsGET /api/conversations/search?q=...- searches conversations by textGET /api/conversations/:sessionId- reads one conversation in fullGET /api/conversations/:sessionId/export?format=json|md- exports one conversation as JSON or Markdown
- JSON request bodies are capped at
1 MiB - invalid JSON returns
400 - unsupported methods return
405 - the server binds to loopback by default