Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Guide for managing the Agent Registry - database-backed agent configuration system. Use when asked to "configure agents", "manage skills", "set tool permissions", "create context rules", or when working with agent assignments per platform/chat. Covers dashboard UI, API endpoints, CLI commands, and MCP tools.
.claude/skills/majiayu000-agent-registry/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 39% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 56% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 21% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 30% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 25% | 0% |
The Agent Registry is a database-backed system for managing AI agent configurations. It replaces file-based configuration with a centralized, dynamic approach that supports:
Access the Agents tab in the dashboard at http://localhost/ → Management → Agents
Features:
bash# Sync database config to filesystem (for OpenCode) npm run agents:sync # Sync with verbose output npm run agents:sync -- --verbose # Dry run (show what would change) npm run agents:sync -- --dry-run # Sync for specific environment npm run agents:sync -- --env prod # Seed default agents npm run agents:seed # Force re-seed (overwrites existing) npm run agents:seed:force # Run database migration npm run db:migrate
Two MCP tools are available for agents to self-discover their capabilities:
ai_first_get_agent_context
json{ "platform": "whatsapp", "chatId": "123456789", "environment": "local" }
Returns: Agent role, enabled skills, allowed tools, base prompt
ai_first_list_agents
json{ "includeDetails": true }
Returns: All registered agents with optional skill/tool details
| Table | Purpose | | --------------- | --------------------------------------------------------- | | agents | Core agent definitions (id, name, model, prompt, enabled) | | agent_skills | Skills assigned to each agent | | agent_tools | Tool allow/deny patterns per agent | | context_rules | Rules for agent selection by context |
| Type | Context ID | Purpose | | ------------- | ------------------------------ | ---------------------------------------- | | default | null | Fallback agent when no other rules match | | platform | whatsapp/slack/opencode/cursor | Platform-specific agent | | chat | Chat/Channel ID | Chat-specific agent assignment | | channel | Slack channel name | Channel-specific agent | | environment | local/prod | Environment-specific skill overrides |
| Agent | Mode | Skills | Description | | ------------ | ----------- | ---------------------------------------------------------------------------------------------- | ----------------------------------------------- | | pm-assistant | primary | jira-management, workflow-management, presentation-updates, message-scheduling, tool-discovery | JIRA, meetings, workflows, project management | | communicator | specialized | slack-formatting, whatsapp-messages | Slack/WhatsApp messaging with proper formatting | | scheduler | specialized | message-scheduling, tool-discovery | Calendar management, reminders | | explorer | specialized | project-architecture, tool-discovery | Fast codebase exploration |
All endpoints require authentication via JWT token.
| Method | Endpoint | Description | | ------ | ------------------------ | ----------------------- | | GET | /api/agents | List all agents | | GET | /api/agents/stats | Get registry statistics | | GET | /api/agents/:id | Get agent with details | | POST | /api/agents | Create new agent | | PATCH | /api/agents/:id | Update agent | | DELETE | /api/agents/:id | Delete agent | | POST | /api/agents/:id/toggle | Toggle enabled status |
| Method | Endpoint | Description | | ------ | ------------------------------ | ------------------------- | | GET | /api/agents/:id/skills | Get agent's skills | | PUT | /api/agents/:id/skills | Replace agent's skills | | GET | /api/agents/available-skills | List all available skills |
| Method | Endpoint | Description | | ------ | ----------------------- | ---------------------------- | | GET | /api/agents/:id/tools | Get agent's tool patterns | | PUT | /api/agents/:id/tools | Set tool allow/deny patterns |
| Method | Endpoint | Description | | ------ | ------------------------------- | ---------------------- | | GET | /api/agents/context-rules | List all context rules | | POST | /api/agents/context-rules | Create context rule | | DELETE | /api/agents/context-rules/:id | Delete context rule |
| Method | Endpoint | Description | | ------ | ----------------------------- | ------------------------- | | POST | /api/agents/sync | Trigger filesystem sync | | POST | /api/agents/resolve-context | Resolve agent for context |
When resolving an agent for a request:
Priority order: chat-specific > channel-specific > platform-specific > environment > default
For OpenCode/Cursor compatibility, agent configurations are synced to:
.claude/skills/ - Skill directories for enabled skillsopencode.json - Model configuration (future)The sync runs:
npm run agents:sync/api/agents with agent definitiondata/seeds/agents.ts/api/agents/:id/skills with skill names arrayFor chat-specific agent:
json{ "contextType": "chat", "contextId": "120363406740668957", "agentId": "specialized-agent", "priority": 100 }
For platform-wide agent:
json{ "contextType": "platform", "contextId": "whatsapp", "agentId": "communicator", "priority": 50 }
GET /api/agents/:idnpm run agents:sync -- --verbose --dry-runGET /api/agents/context-rulesPOST /api/agents/resolve-contextOther measured skills in the registry, with their headline benchmark lift.