Skip to main content

Gateway API Reference

Viben Gateway is the core service of the Agent Swarm x Code Evolution platform, providing RESTful APIs for:

  • Agent Swarm - Agent cluster orchestration and collaboration management
  • FileEvo - API support for code iteration optimization
  • Task System - XState-based task state machine workflow
  • Session Management - Agent session and context management

Basic Information

  • Base URL: http://127.0.0.1:18790
  • Protocol: HTTP/HTTPS
  • Format: JSON

Authentication

The current version of Gateway runs locally and does not require authentication. Future versions may add authentication support.

API Endpoint Overview

Health Check

EndpointMethodDescription
/healthGETCheck Gateway health status

Agent Management

EndpointMethodDescription
/api/agentGETList all agents
/api/agent/:idGETGet specific agent
/api/agentPOSTCreate agent
/api/agent/:idPATCHUpdate agent
/api/agent/:idDELETEDelete agent

Executor Management

EndpointMethodDescription
/api/executorsGETList available executors
/api/executors/:type/discover-sessionsGETDiscover executor sessions
/api/executors/:type/mcp-serversGETGet executor MCP servers
/api/executors/:type/skillsGETGet executor skills

Session Management

EndpointMethodDescription
/api/sessionsGETList all sessions
/api/sessions/:idGETGet specific session
/api/sessionsPOSTCreate session
/api/sessions/:idPATCHUpdate session
/api/sessions/:idDELETEDelete session
/api/sessions/:id/messagesGETGet session messages

Provider Management

EndpointMethodDescription
/api/providersGETList all Providers
/api/providers/:idGETGet specific Provider
/api/providersPOSTCreate Provider
/api/providers/:idPATCHUpdate Provider
/api/providers/:idDELETEDelete Provider
/api/providers/:id/testPOSTTest Provider connection

Model Management

EndpointMethodDescription
/api/modelsGETList all models
/api/models/:idGETGet specific model
/api/models/defaultGETGet default model
/api/models/defaultPUTSet default model
/api/models/aliasesGETGet model aliases
/api/models/fallbacksGETGet fallback chain

Notification Channel Management

EndpointMethodDescription
/api/channelsGETList all notification channels
/api/channels/:idGETGet specific channel
/api/channelsPOSTCreate channel
/api/channels/:idPATCHUpdate channel
/api/channels/:idDELETEDelete channel
/api/channels/:id/defaultPOSTSet as default channel
/api/channels/sendPOSTSend message
/api/channels/testPOSTTest channel configuration

Cron Job Management

EndpointMethodDescription
/api/cronGETList all cron jobs
/api/cron/:idGETGet specific cron job
/api/cronPOSTCreate cron job
/api/cron/:idPATCHUpdate cron job
/api/cron/:idDELETEDelete cron job
/api/cron/:id/enablePOSTEnable cron job
/api/cron/:id/disablePOSTDisable cron job
/api/cron/:id/runPOSTExecute cron job immediately
/api/cron/:id/logsGETGet execution logs

Task Management

EndpointMethodDescription
/api/tasksGETList all tasks
/api/tasks/:idGETGet specific task
/api/tasksPOSTCreate task
/api/tasks/:idPATCHUpdate task
/api/tasks/:idDELETEDelete task
/api/agent/:agentId/tasksGETGet agent tasks
/api/agent/:agentId/sessions/:sessionId/tasksGETGet session tasks

Workspace Management

EndpointMethodDescription
/api/workspacesGETList all workspaces
/api/workspaces/detectGETDetect folder status
/api/workspaces/createPOSTCreate workspace
/api/workspaces/:idDELETEDelete workspace

MCP Server Management

EndpointMethodDescription
/api/mcp/installedGETList installed MCP servers
/api/mcp/browse/startPOSTStart Browse MCP
/api/mcp/browse/stopPOSTStop Browse MCP
/api/mcp/browse/statusGETGet Browse MCP status
/api/mcp/proxy/startPOSTStart MCP proxy
/api/mcp/proxy/stopPOSTStop MCP proxy
/api/mcp/proxy/statusGETGet MCP proxy status

Kanban Management

EndpointMethodDescription
/api/kanban/tasks/:taskId/commentsGETGet task comments
/api/kanban/tasks/:taskId/commentsPOSTAdd task comment
/api/kanban/tasks/:taskId/comments/:commentIdPATCHUpdate comment
/api/kanban/tasks/:taskId/comments/:commentIdDELETEDelete comment
/api/kanban/tasks/:taskId/comments/:commentId/reactionsPOSTToggle comment reaction
/api/kanban/tasks/:taskId/activitiesGETGet task activities
/api/kanban/tasks/:taskId/activitiesPOSTAdd task activity
/api/kanban/tasks/:taskId/dataDELETEClear task data

Common Query Parameters

Many endpoints support the following query parameters:

ParameterTypeDescription
workspace_pathstringWorkspace path, used to get workspace-specific configuration
include_globalstringWhether to include global configuration (default: "true")

Response Format

All responses use JSON format with field names in snake_case.

Success Response

{
"agents": [...],
"total": 10
}

Error Response

{
"error": "Agent not found: xxx"
}

HTTP Status Codes

Status CodeDescription
200Success
201Created successfully
400Bad request
404Resource not found
500Server error

Swagger UI

Gateway provides Swagger UI at runtime for interactive API exploration:

http://127.0.0.1:18790/docs

Next Steps