Skip to main content

Installation

Optional peer dependencies for specific features:

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

Returns a complete OpenAPI 3.0.3 specification object with auto-generated paths, schemas, and security schemes based on the registered agents/teams/workflows.

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.

A2A Server

Expose Agentium agents as A2A-compliant HTTP endpoints.

Endpoints

JSON-RPC Methods


Agent Card Generator

Generate Agent Cards from Agentium agents without starting a server.