Skip to main content
Upcoming Mid April 2026
These routes are exposed by aui serve on localhost. They proxy to the backend APIs and provide a local development interface.

Routes

MethodRouteBackend CallDescription
GET/api/sessionCurrent session info
GET/api/organizationsorganizations.listMy()List organizations
GET/api/accountsaccounts.list()List accounts
GET/api/agentsnetworks.list()List active agents
POST/api/switch/organizationorganizations.get(id)Switch organization
POST/api/switch/accountaccounts.get(id)Switch account
POST/api/switch/agentnetworks.get(id)Switch agent
POST/api/chat/tasknetworkApiKeys + Apollo SDKCreate chat task
POST/api/chat/messageApollo SDK sendMessage()Send chat message

Usage

Start the local server:
aui serve
This opens a web-based playground on localhost where you can:
  • Switch between organizations, accounts, and agents
  • Chat with agents in real time
  • Test tool activations and rule matching
All requests proxy through the authenticated CLI session — no additional API keys needed.

Best Practices

  • Use for rapid prototypingaui serve is the fastest way to test agent behavior without writing client code. Use it during development to iterate on tools, rules, and knowledge bases.
  • Test context switching — Use the switch endpoints to verify your agent behaves correctly across different organizations, accounts, and configurations.
  • Do not expose to the network — The local serve API has no authentication beyond the CLI session. Never expose it on 0.0.0.0 or forward the port publicly.
  • Use alongside aui chataui serve provides a visual web interface; aui chat provides a terminal interface. Use whichever fits your workflow. Both hit the same backend APIs.
  • Check /api/session first — Before making any calls, verify the session is active and points to the correct organization/account/agent. Stale sessions cause confusing errors.