Logo di Intelligent Routing

Intelligent Routing

CommunityPopolare
vudovn
intelligent-routing

Selezione automatica degli agenti e instradamento intelligente delle attività. Analizza le richieste degli utenti e seleziona automaticamente i migliori agenti specializzati, senza che l’utente debba indicarli esplicitamente.

Add to TypingMind

Panoramica

Pubblicato davudovn
Repositoryag-kit
Nome della skillintelligent-routing
Stelle
8.2K
Fork
1.5K
File inclusi
Solo istruzioni
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da vudovn su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Intelligent Routing in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/vudovn/ag-kit/tree/main/.agents/skills/intelligent-routing
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/vudovn/ag-kit.git /tmp/ag-kit
mkdir -p .claude/skills
cp -r /tmp/ag-kit/.agents/skills/intelligent-routing .claude/skills/intelligent-routing
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Intelligent Routing in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Intelligent Routing non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Intelligent Routing non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Intelligent Agent Routing

Purpose: Automatically analyze user requests and route them to the most appropriate specialist agent(s) without requiring explicit user mentions.

Core Principle

The AI should act as an intelligent Project Manager, analyzing each request and automatically selecting the best specialist(s) for the job.

How It Works

1. Request Analysis

Before responding to ANY user request, perform automatic analysis:

2. Agent Selection Matrix

Use this matrix to automatically select agents:

User IntentKeywordsSelected Agent(s)Auto-invoke?
Authentication"login", "auth", "signup", "password"security-auditor + backend-specialist✅ YES
UI Component"button", "card", "layout", "style"frontend-specialist✅ YES
Mobile UI"screen", "navigation", "touch", "gesture"mobile-developer✅ YES
API Endpoint"endpoint", "route", "API", "POST", "GET"backend-specialist✅ YES
Database"schema", "migration", "query", "table"database-architect + backend-specialist✅ YES
Bug Fix"error", "bug", "not working", "broken"debugger✅ YES
Test"test", "coverage", "unit", "e2e"test-engineer✅ YES
Deployment"deploy", "production", "CI/CD", "docker"devops-engineer✅ YES
Security Review"security", "vulnerability", "exploit"security-auditor + penetration-tester✅ YES
Performance"slow", "optimize", "performance", "speed"performance-optimizer✅ YES
Product Def"requirements", "user story", "backlog", "MVP"product-owner✅ YES
New Feature"build", "create", "implement", "new app"orchestrator → multi-agent⚠️ ASK FIRST
Complex TaskMultiple domains detectedorchestrator → multi-agent⚠️ ASK FIRST

3. Automatic Routing Protocol

TIER 0 - Automatic Analysis (ALWAYS ACTIVE)

Before responding to ANY request:

javascript
// 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
    }
}

4. Response Format

When auto-selecting an agent, inform the user concisely:

markdown
🤖 **Applying knowledge of `@security-auditor` + `@backend-specialist`...**

[Proceed with specialized response]

Benefits:

  • ✅ User sees which expertise is being applied
  • ✅ Transparent decision-making
  • ✅ Still automatic (no /commands needed)

Domain Detection Rules

Single-Domain Tasks (Auto-invoke Single Agent)

DomainPatternsAgent
Securityauth, login, jwt, password, hash, tokensecurity-auditor
Frontendcomponent, react, vue, css, html, tailwindfrontend-specialist
Backendapi, server, express, fastapi, nodebackend-specialist
Mobilereact native, flutter, ios, android, expomobile-developer
Databaseprisma, sql, mongodb, schema, migrationdatabase-architect
Testingtest, jest, vitest, playwright, cypresstest-engineer
DevOpsdocker, kubernetes, ci/cd, pm2, nginxdevops-engineer
Debugerror, bug, crash, not working, issuedebugger
Performanceslow, lag, optimize, cache, performanceperformance-optimizer
SEOseo, meta, analytics, sitemap, robotsseo-specialist
Gameunity, godot, phaser, game, multiplayergame-developer

Multi-Domain Tasks (Auto-invoke Orchestrator)

If request matches 2+ domains from different categories, automatically use orchestrator:

text
Example: "Create a secure login system with dark mode UI"
→ Detected: Security + Frontend
→ Auto-invoke: orchestrator
→ Orchestrator will handle: security-auditor, frontend-specialist, test-engineer

Complexity Assessment

SIMPLE (Direct agent invocation)

  • Single file edit
  • Clear, specific task
  • One domain only
  • Example: "Fix the login button style"

Action: Auto-invoke respective agent

MODERATE (2-3 agents)

  • 2-3 files affected
  • Clear requirements
  • 2 domains max
  • Example: "Add API endpoint for user profile"

Action: Auto-invoke relevant agents sequentially

COMPLEX (Orchestrator required)

  • Multiple files/domains
  • Architectural decisions needed
  • Unclear requirements
  • Example: "Build a social media app"

Action: Auto-invoke orchestrator → will ask Socratic questions

Implementation Rules

Rule 1: Silent Analysis

DO NOT announce "I'm analyzing your request..."
  • ✅ Analyze silently
  • ✅ Inform which agent is being applied
  • ❌ Avoid verbose meta-commentary

Rule 2: Inform Agent Selection

DO inform which expertise is being applied:

markdown
🤖 **Applying knowledge of `@frontend-specialist`...**

I will create the component with the following characteristics:
[Continue with specialized response]

Rule 3: Seamless Experience

The user should not notice a difference from talking to the right specialist directly.

Rule 4: Override Capability

User can still explicitly mention agents:

text
User: "Use @backend-specialist to review this"
→ Override auto-selection
→ Use explicitly mentioned agent

Edge Cases

Case 1: Generic Question

text
User: "How does React work?"
→ Type: QUESTION
→ No agent needed
→ Respond directly with explanation

Case 2: Extremely Vague Request

text
User: "Make it better"
→ Complexity: UNCLEAR
→ Action: Ask clarifying questions first
→ Then route to appropriate agent

Case 3: Contradictory Patterns

text
User: "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

Integration with Existing Workflows

With /orchestrate Command

  • User types /orchestrate: Explicit orchestration mode
  • AI detects complex task: Auto-invoke orchestrator (same result)

Difference: User doesn't need to know the command exists.

With Socratic Gate

  • Auto-routing does NOT bypass Socratic Gate
  • If task is unclear, still ask questions first
  • Then route to appropriate agent

With Workspace Rules

  • Priority: Workspace rules (.agents/rules/) > intelligent-routing
  • If a workspace rule specifies explicit routing, follow it
  • Intelligent routing is the DEFAULT when no explicit rule exists

Testing the System

Test Cases

Test 1: Simple Frontend Task
text
User: "Create a dark mode toggle button"
Expected: Auto-invoke frontend-specialist
Verify: Response shows "Using @frontend-specialist"
Test 2: Security Task
text
User: "Review the authentication flow for vulnerabilities"
Expected: Auto-invoke security-auditor
Verify: Security-focused analysis
Test 3: Complex Multi-Domain
text
User: "Build a chat application with real-time notifications"
Expected: Auto-invoke orchestrator
Verify: Multiple agents coordinated (backend, frontend, test)
Test 4: Bug Fix
text
User: "Login is not working, getting 401 error"
Expected: Auto-invoke debugger
Verify: Systematic debugging approach

Performance Considerations

Token Usage

  • Analysis adds ~50-100 tokens per request
  • Tradeoff: Better accuracy vs slight overhead
  • Overall SAVES tokens by reducing back-and-forth

Response Time

  • Analysis is instant (pattern matching)
  • No additional API calls required
  • Agent selection happens before first response

User Education

Optional: First-Time Explanation

If this is the first interaction in a project:

markdown
💡 **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.

Debugging Agent Selection

Enable Debug Mode (for development)

Add to a workspace rule file (.agents/rules/) temporarily:

markdown
## DEBUG: Intelligent Routing

Show selection reasoning:

- Detected domains: [list]
- Selected agent: [name]
- Reasoning: [why]

Summary

intelligent-routing skill enables:

✅ Zero-command operation (no need for /orchestrate)
✅ Automatic specialist selection based on request analysis
✅ Transparent communication of which expertise is being applied
✅ Seamless integration with existing workflows
✅ Override capability for explicit agent mentions
✅ Fallback to orchestrator for complex tasks

Result: User gets specialist-level responses without needing to know the system architecture.


Next Steps: Integrate this skill into the workspace rules (.agents/rules/request-routing.md).

Domande frequenti

Cosa fa la skill IA Intelligent Routing?

Selezione automatica degli agenti e instradamento intelligente delle attività. Analizza le richieste degli utenti e seleziona automaticamente i migliori agenti specializzati, senza che l’utente debba indicarli esplicitamente.

Perché usare Intelligent Routing su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Intelligent Routing è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Intelligent Routing in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/vudovn/ag-kit/tree/main/.agents/skills/intelligent-routing. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Intelligent Routing?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Intelligent Routing?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Intelligent Routing: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Intelligent Routing è gratuita?

Sì. È pubblicata su GitHub da vudovn con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇