Control Plane
The AMOF Control Plane is a web-based management interface consisting of a FastAPI backend and a Next.js 15 frontend with real-time observability, AI agent interaction, and release control.
Starting the Control Plane
amof server start # Start backend + frontend
amof server status # Check if running
amof server restart # Restart both services
amof server stop # Shut downThis launches the Backend API at http://localhost:8000 (Swagger at /docs) and the Frontend UI at http://localhost:3000.
Backend API
| Property | Details |
|---|---|
| Framework | FastAPI with automatic OpenAPI documentation |
| Base path | /api/v1 |
| CORS | All origins allowed (development configuration) |
| Health check | GET /health returns {"status": "ok"} |
| Server | Uvicorn on 127.0.0.1:8000 with hot reload |
Ecosystem Router
| Method | Path | Description |
|---|---|---|
| GET | /ecosystems/ | List all ecosystems |
| POST | /ecosystems/ | Create a new ecosystem |
| GET | /ecosystems/{name} | Get ecosystem details |
| DELETE | /ecosystems/{name} | Delete an ecosystem |
Ecosystem Actions
All actions are POST /api/v1/ecosystems/{name}/actions/<action>:
| Action | Description |
|---|---|
| install | Bootstrap workspace |
| status | Get workspace status |
| sync | Sync all repositories |
| push | Push all branches |
| archive | Archive workspace |
| agent | Run AI agent with a prompt |
| index | Index the codebase |
| spin/deploy | Provision infrastructure |
| spin/destroy | Tear down infrastructure |
| ticket-start | Start a ticket |
| ticket-switch | Switch active ticket |
Release Router
| Method | Path | Description |
|---|---|---|
| GET | /release/status | Current version and available bumps |
| GET | /release/log | Release history from audit trail |
| POST | /release/validate | Validate release readiness |
| POST | /release/bump | Bump version (patch/minor/major) |
| POST | /release/promote | Promote pre-release stage |
SSE Streaming
# Per-run stream
GET /api/v1/runs/{run_id}/stream
Content-Type: text/event-stream
# Global log stream
GET /api/v1/logs/stream
Content-Type: text/event-streamFrontend UI
| Layer | Technology |
|---|---|
| Framework | Next.js 15 with App Router |
| Styling | Tailwind CSS + tailwindcss-animate |
| Components | Shadcn UI pattern (Radix + class-variance-authority) |
| Icons | Lucide React |
| Markdown | react-markdown for agent responses |
| Terminal | ansi-to-react for ANSI color rendering |
| Theme | Dark-first with next-themes, HSL tokens |
Dashboard (/)
- Ecosystem Grid -- Cards showing each ecosystem status, running agents, and last indexed time
- Orchestrator Log -- Real-time terminal output from all active runs via SSE
- God Agent Chat -- Persistent chat panel for system-wide queries
Ecosystem Detail (/ecosystems/[name])
| Section | Actions |
|---|---|
| Overview | Ecosystem metadata and status |
| Branches | Ticket list, start, switch, end |
| Workspace | Install, Archive, Discard |
| Git & Sync | Status, Sync, Push, Create PRs |
| Environment | Spin Deploy, Spin Destroy, Validate |
| Release | Status, Log, Bump, Promote |
| Agent Chat | Interactive chat scoped to this ecosystem |
Agent Chat Modes
| Mode | Behavior |
|---|---|
| Ask | Read-only questions; agent explores without modifying |
| Plan | Analysis mode; produces a structured execution plan |
| Execute | Full mode; can read, write, and run commands |
API Hooks
useAmofApi
| Return | Type | Purpose |
|---|---|---|
| triggerTask() | function | POST to agent endpoint, then open SSE stream |
| logLines | string[] | Reactive buffer of log lines |
| chatMessages | ChatMessage[] | Parsed chat messages from stream |
| sendMessage() | function | Send a user message |
| isStreaming | boolean | Whether an SSE stream is active |