Domain Agents
KULVEX uses a modular agent architecture. Each agent owns a specific domain (weather, home, security, etc.) with its own pattern matching, tools, and response templates.
How It Works
User Message
│
▼
AgentRouter.detect_intent(message)
│
├── Match found → Agent.handle() → ExecutionResult
│ ├── Template response (zero LLM, instant)
│ └── Tool execution + synthesis (minimal LLM)
│
└── No match → Agentic Chat (multi-round tool_use via LLM)Agent Routing
The AgentRouter checks each agent in priority order. Each agent has:
- Priority — Lower number = checked first (10-90)
- Patterns — Regex patterns that match user messages
- Tools — Available tools for that domain
- Templates — Zero-LLM responses for simple queries
When a message matches an agent’s patterns, that agent handles the request. If no agent matches, the message goes to agentic chat for general-purpose reasoning.
API
# List all agents
curl http://localhost:9100/api/ai/agents
# Test intent detection
curl "http://localhost:9100/api/ai/agents/detect?message=what's the weather"