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 REST API
ThecreateAdminRouter() function returns an Express router with full CRUD endpoints for agents, teams, and workflows.
Endpoints
Agents
| Method | Path | Description |
|---|---|---|
| POST | /agents | Create agent from blueprint |
| GET | /agents | List all persisted agent configs |
| GET | /agents/:name | Get single agent config |
| PUT | /agents/:name | Update agent (destroy + recreate) |
| DELETE | /agents/:name | Remove from registry + storage |
Teams
| Method | Path | Description |
|---|---|---|
| POST | /teams | Create team from agent names |
| GET | /teams | List all persisted team configs |
| GET | /teams/:name | Get single team config |
| PUT | /teams/:name | Update team |
| DELETE | /teams/:name | Remove from registry + storage |
Workflows
| Method | Path | Description |
|---|---|---|
| POST | /workflows | Register workflow metadata |
| GET | /workflows | List persisted workflow configs |
| GET | /workflows/:name | Get single workflow config |
| DELETE | /workflows/:name | Remove from registry + storage |
Tools
| Method | Path | Description |
|---|---|---|
| GET | /tools | List all available tools (static + dynamic toolkit configs) |
| GET | /tools/:name | Get single tool detail (name, description, parameters) |
Toolkit Catalog
| Method | Path | Description |
|---|---|---|
| GET | /toolkit-catalog | List all available toolkit types with config requirements |
| GET | /toolkit-catalog/:id | Get single toolkit type detail |
Toolkit Configs (Credentials Management)
| Method | Path | Description |
|---|---|---|
| POST | /toolkit-configs | Save toolkit config (credentials + settings) |
| GET | /toolkit-configs | List all saved configs (secrets masked) |
| GET | /toolkit-configs/:name | Get single config (secrets masked) |
| PUT | /toolkit-configs/:name | Update config (secrets preserved if masked values sent) |
| DELETE | /toolkit-configs/:name | Remove config and deactivate toolkit |
Create Agent
Agent Blueprint
Unique agent name. Used as the identifier in registry and transport routes.
Model provider id:
"openai", "anthropic", "google", "ollama", "vertex".Model id:
"gpt-4o", "gpt-4o-mini", "claude-sonnet-4-20250514", etc.System prompt for the agent.
Tool names from the
toolLibrary. e.g., ["webSearch", "calculator"].Model temperature (0-2).
Provider-specific config passed to
modelRegistry.resolve() (e.g., { apiKey, baseURL }).Update Agent
Create Team
Team Blueprint
Unique team name.
Team mode:
"coordinate", "route", "broadcast", "collaborate", "handoff".Model provider for the team leader.
Model id for the team leader.
Agent names that must exist in the registry.
System prompt for the team leader.
Validation & Error Codes
| Status | Meaning |
|---|---|
201 | Created successfully |
400 | Missing required fields |
404 | Entity not found |
409 | Name already exists |
422 | Validation error (unknown provider, missing tool, missing member agent) |
500 | Internal error |