Loading...
Loading...
Automatic agent selection and intelligent task routing. Analyzes user requests and automatically selects the best specialist agent(s) without requiring explicit user mentions.
npx skill4agent add vudovn/antigravity-kit intelligent-routingThe AI should act as an intelligent Project Manager, analyzing each request and automatically selecting the best specialist(s) for the job.
graph TD
A[User Request: Add login] --> B[ANALYZE]
B --> C[Keywords]
B --> D[Domains]
B --> E[Complexity]
C --> F[SELECT AGENT]
D --> F
E --> F
F --> G[security-auditor + backend-specialist]
G --> H[AUTO-INVOKE with context]| User Intent | Keywords | Selected Agent(s) | Auto-invoke? |
|---|---|---|---|
| Authentication | "login", "auth", "signup", "password" | | ✅ YES |
| UI Component | "button", "card", "layout", "style" | | ✅ YES |
| Mobile UI | "screen", "navigation", "touch", "gesture" | | ✅ YES |
| API Endpoint | "endpoint", "route", "API", "POST", "GET" | | ✅ YES |
| Database | "schema", "migration", "query", "table" | | ✅ YES |
| Bug Fix | "error", "bug", "not working", "broken" | | ✅ YES |
| Test | "test", "coverage", "unit", "e2e" | | ✅ YES |
| Deployment | "deploy", "production", "CI/CD", "docker" | | ✅ YES |
| Security Review | "security", "vulnerability", "exploit" | | ✅ YES |
| Performance | "slow", "optimize", "performance", "speed" | | ✅ YES |
| Product Def | "requirements", "user story", "backlog", "MVP" | | ✅ YES |
| New Feature | "build", "create", "implement", "new app" | | ⚠️ ASK FIRST |
| Complex Task | Multiple domains detected | | ⚠️ ASK FIRST |
// Pseudo-code for decision tree
function analyzeRequest(userMessage) {
// 1. Classify request type
const requestType = classifyRequest(userMessage);
// 2. Detect domains
const domains = detectDomains(userMessage);
// 3. Determine complexity
const complexity = assessComplexity(domains);
// 4. Select agent(s)
if (complexity === "SIMPLE" && domains.length === 1) {
return selectSingleAgent(domains[0]);
} else if (complexity === "MODERATE" && domains.length <= 2) {
return selectMultipleAgents(domains);
} else {
return "orchestrator"; // Complex task
}
}🤖 **Applying knowledge of `@security-auditor` + `@backend-specialist`...**
[Proceed with specialized response]| Domain | Patterns | Agent |
|---|---|---|
| Security | auth, login, jwt, password, hash, token | |
| Frontend | component, react, vue, css, html, tailwind | |
| Backend | api, server, express, fastapi, node | |
| Mobile | react native, flutter, ios, android, expo | |
| Database | prisma, sql, mongodb, schema, migration | |
| Testing | test, jest, vitest, playwright, cypress | |
| DevOps | docker, kubernetes, ci/cd, pm2, nginx | |
| Debug | error, bug, crash, not working, issue | |
| Performance | slow, lag, optimize, cache, performance | |
| SEO | seo, meta, analytics, sitemap, robots | |
| Game | unity, godot, phaser, game, multiplayer | |
orchestratorExample: "Create a secure login system with dark mode UI"
→ Detected: Security + Frontend
→ Auto-invoke: orchestrator
→ Orchestrator will handle: security-auditor, frontend-specialist, test-engineerorchestrator🤖 **Applying knowledge of `@frontend-specialist`...**
I will create the component with the following characteristics:
[Continue with specialized response]User: "Use @backend-specialist to review this"
→ Override auto-selection
→ Use explicitly mentioned agentUser: "How does React work?"
→ Type: QUESTION
→ No agent needed
→ Respond directly with explanationUser: "Make it better"
→ Complexity: UNCLEAR
→ Action: Ask clarifying questions first
→ Then route to appropriate agentUser: "Add mobile support to the web app"
→ Conflict: mobile vs web
→ Action: Ask: "Do you want responsive web or native mobile app?"
→ Then route accordingly/orchestrateUser: "Create a dark mode toggle button"
Expected: Auto-invoke frontend-specialist
Verify: Response shows "Using @frontend-specialist"User: "Review the authentication flow for vulnerabilities"
Expected: Auto-invoke security-auditor
Verify: Security-focused analysisUser: "Build a chat application with real-time notifications"
Expected: Auto-invoke orchestrator
Verify: Multiple agents coordinated (backend, frontend, test)User: "Login is not working, getting 401 error"
Expected: Auto-invoke debugger
Verify: Systematic debugging approach💡 **Tip**: I am configured with automatic specialist agent selection.
I will always choose the most suitable specialist for your task. You can
still mention agents explicitly with `@agent-name` if you prefer.## DEBUG: Intelligent Routing
Show selection reasoning:
- Detected domains: [list]
- Selected agent: [name]
- Reasoning: [why]/orchestrate