AgentServer hosts multiple AgentBase instances
on a single Hono HTTP server. Each agent registers at its own URL route, and the server
provides unified health monitoring, SIP-based routing, and static file serving.
Use AgentServer when you have several related agents (sales, support, billing)
that share the same deployment.
For a single agent, use AgentBase.serve()
or AgentBase.run() instead.
Optional server configuration.
Hostname the server binds to.
Port the server listens on. Also reads from the PORT environment variable.
Logging level: 'debug', 'info', 'warn', or 'error'. Lowercased and applied globally via setGlobalLogLevel.
The hostname the server binds to.
The port the server listens on.
The logging level for the server (read-only).
Retrieve a specific registered agent by its route.
Return all registered agents as a Map.
Get the fully configured Hono application.
Register an agent at a URL route on the server.
Register a routing callback across all agents for custom request routing.
Start the multi-agent HTTP server.
Serve static files from a directory alongside agent routes.
Configure SIP-based routing to direct calls to specific agents by username.
Remove an agent from the server’s registry by route.
After starting, agents are available at: