Documentation Index
Fetch the complete documentation index at: https://docs.xhipai.com/llms.txt
Use this file to discover all available pages before exploring further.
Admin Socket.IO Gateway
ThecreateAdminGateway() function attaches admin CRUD event handlers to a Socket.IO server. All operations use acknowledgement callbacks for request-response, and mutations are broadcast to all connected clients in real time.
Setup
AdminGatewayOptions
Socket.IO server instance.
Storage backend for persisting blueprints.
Named tools available for agent creation. Explicit entries override toolkit tools.
Toolkit instances whose tools are automatically collected into the tool library.
Socket.IO namespace for admin events.
Socket.IO middleware for authentication.
Events
Agent Events
| Event | Payload | Response |
|---|---|---|
admin.agent.create | { name, provider, model, instructions?, tools?, temperature? } | { ok, data } |
admin.agent.list | {} | { ok, data: AgentBlueprint[] } |
admin.agent.get | { name } | { ok, data } |
admin.agent.update | { name, ...fields } | { ok, data } |
admin.agent.delete | { name } | { ok, data: { deleted } } |
Team Events
| Event | Payload | Response |
|---|---|---|
admin.team.create | { name, mode, provider, model, members, instructions? } | { ok, data } |
admin.team.list | {} | { ok, data: TeamBlueprint[] } |
admin.team.get | { name } | { ok, data } |
admin.team.update | { name, ...fields } | { ok, data } |
admin.team.delete | { name } | { ok, data: { deleted } } |
Workflow Events
| Event | Payload | Response |
|---|---|---|
admin.workflow.create | { name, description? } | { ok, data } |
admin.workflow.list | {} | { ok, data: WorkflowBlueprint[] } |
admin.workflow.delete | { name } | { ok, data: { deleted } } |
Tools
| Event | Payload | Response |
|---|---|---|
admin.tools.list | {} | { ok, data: [{ name, description, parameters }] } |
admin.tools.get | { name } | { ok, data: { name, description, parameters } } |
Toolkit Catalog
| Event | Payload | Response |
|---|---|---|
admin.toolkit-catalog.list | {} | { ok, data: ToolkitMeta[] } |
admin.toolkit-catalog.get | { id } | { ok, data: ToolkitMeta } |
Toolkit Configs (Credentials)
| Event | Payload | Response |
|---|---|---|
admin.toolkit-config.create | { toolkitId, instanceName, config, enabled? } | { ok, data: MaskedConfig } |
admin.toolkit-config.list | {} | { ok, data: MaskedConfig[] } |
admin.toolkit-config.get | { instanceName } | { ok, data: MaskedConfig } |
admin.toolkit-config.update | { instanceName, config?, enabled? } | { ok, data: MaskedConfig } |
admin.toolkit-config.delete | { instanceName } | { ok, data: { deleted } } |
Registry
| Event | Payload | Response |
|---|---|---|
admin.registry.list | {} | { ok, data: { agents, teams, workflows } } |
Broadcast Events
When entities are created, updated, or deleted, the gateway broadcasts to all connected clients on the admin namespace:| Broadcast Event | Payload |
|---|---|
admin.agent.created | AgentBlueprint |
admin.agent.updated | AgentBlueprint |
admin.agent.deleted | { name } |
admin.team.created | TeamBlueprint |
admin.team.updated | TeamBlueprint |
admin.team.deleted | { name } |
admin.workflow.created | WorkflowBlueprint |
admin.workflow.deleted | { name } |
admin.toolkit-config.created | MaskedToolkitConfig |
admin.toolkit-config.updated | MaskedToolkitConfig |
admin.toolkit-config.deleted | { instanceName } |