Installation
Express
createAgentRouter
Record<string, Agent>
Named agents to expose as endpoints.
Record<string, Team>
Named teams to expose as endpoints.
Record<string, Workflow>
Named workflows to expose as endpoints.
RequestHandler[]
Express middleware applied to all routes.
SwaggerOptions
Swagger UI configuration.
boolean | FileUploadOptions
Enable multipart file upload handling.
Generated Endpoints
Request Body
Response
SwaggerOptions
generateOpenAPISpec
FileUploadOptions
createFileUploadMiddleware
buildMultiModalInput
Middleware
errorHandler
requestLogger
Socket.IO
createAgentGateway
Record<string, Agent>
Named agents available via WebSocket.
Record<string, Team>
Named teams available via WebSocket.
SocketIOServer
required
Socket.IO server instance.
string
default:"/agentium"
Socket.IO namespace.
(socket, next) => void
Authentication middleware for connections.
Client Events (Send)
agent.run
team.run
Server Events (Receive)
API Key Headers
The transport layer extracts API keys from these HTTP headers:
Keys can also be passed in the request body as
apiKey or via Socket.IO event payload.