Complete API specifications for Agenstra's backend services. All specifications are available in OpenAPI 3.1.0 (for HTTP REST APIs) and AsyncAPI 3.0.0 (for WebSocket gateways) formats.
The Agent Controller provides a centralized control plane for managing multiple distributed agent-manager instances.
OpenAPI Specification: openapi.yaml
- View in Swagger Editor: Open in Swagger Editor
- Download: openapi.yaml
The Agent Controller HTTP API provides:
- Client management (CRUD operations) and client user management (Keycloak/users modes)
- Users authentication endpoints (
/auth/*,/users/*) whenAUTHENTICATION_METHOD=users - Tickets, comments, activity, migration, automation, and assisted body-generation flows (
/tickets/*) - Usage statistics (
/clients/:id/statistics/*,/statistics/*) - Global message filter rules for administrators (
/filter-rules) - Atlassian site connections and import configurations for administrators (
/imports/atlassian/*) - Agent autonomy configuration per workspace and per agent
- Proxied agent operations (CRUD, models, start/stop/restart, environment variables, deployments)
- Proxied file operations (read, write, create, delete, move)
- Proxied version control operations (including workspace prepare-clean and automation verify-commands)
- Server provisioning (Hetzner Cloud, DigitalOcean)
AsyncAPI Specification: asyncapi.yaml
- View in AsyncAPI Studio: Open in AsyncAPI Studio
- Download: asyncapi.yaml
The Agent Controller WebSocket gateway provides:
clientsnamespace – Client context (setClient),forwardto remote agent-managers, proxied events by name, reconnection notifications, controller-originated ticket hints for chatticketsnamespace – Ticket board and automation realtime (setClient, upserts, comments, activity, run events)
The Agent Manager provides agent lifecycle management and container execution.
OpenAPI Specification: openapi.yaml
- View in Swagger Editor: Open in Swagger Editor
- Download: openapi.yaml
The Agent Manager HTTP API provides:
- Agent management (CRUD, models, start/stop/restart)
- Per-agent regex filter rules (
/agents-filters) - Environment variable CRUD with container restart semantics
- File system operations (read, write, create, delete, move; optional
contextquery) - Version control operations (git status, branches, commit, push, pull, rebase, workspace prepare-clean, automation verify-commands)
- Deployment configuration and CI/CD run APIs (
/agents/:agentId/deployments/...) - Configuration endpoint (
/config)
AsyncAPI Specification: asyncapi.yaml
- View in AsyncAPI Studio: Open in AsyncAPI Studio
- Download: asyncapi.yaml
The Agent Manager WebSocket gateway provides:
- Agent authentication (
loginevent) - Real-time chat communication (
chatevent,chatMessagebroadcast) - File update notifications (
fileUpdate,fileUpdateNotification) - Terminal session management (
createTerminal,terminalInput,terminalOutput,closeTerminal) - Container statistics broadcasting (
containerStats; default every 15s on the manager, configurable viaCONTAINER_STATS_SCHEDULER_INTERVAL)
Swagger Editor is an online tool for viewing and editing OpenAPI specifications. Use it to:
- Explore API endpoints interactively
- Generate client SDKs
- Validate API contracts
- Test API operations
AsyncAPI Studio is an online tool for viewing and editing AsyncAPI specifications. Use it to:
- Visualize WebSocket event flows
- Understand message schemas
- Generate documentation
- Validate AsyncAPI contracts
Pre-built client SDKs are automatically generated from the OpenAPI specifications and published to GitHub Packages. These clients provide type-safe, language-specific interfaces for interacting with the Agenstra APIs.
JavaScript and TypeScript client packages are published to GitHub Packages npm registry and can be installed using npm or yarn.
Agent Manager Client: @forepath/agenstra-agent-manager-client
Agent Controller Client: @forepath/agenstra-agent-controller-client
The TypeScript clients are built with Axios and include full type definitions and interfaces. All clients support configurable base URLs for flexible endpoint configuration.
To install the published clients, configure your package manager to use GitHub Packages:
- npm/yarn: Configure
@forepathscope to use GitHub Packages registry in your.npmrc
All clients are automatically generated and published with each release, ensuring they stay in sync with the latest API specifications.
- Architecture Overview - System architecture and component relationships
- WebSocket Communication - Real-time communication patterns
- Backend Agent Controller Application - Application details
- Backend Agent Manager Application - Application details