Logo Intelligent Routing

Intelligent Routing

Cộng đồngPhổ biến
vudovn
intelligent-routing

Tự động chọn tác nhân AI và định tuyến tác vụ thông minh. Phân tích yêu cầu của người dùng rồi tự động chọn (các) tác nhân AI chuyên biệt phù hợp nhất mà không cần người dùng chỉ định rõ.

Add to TypingMind

Tổng quan

Nhà phát hànhvudovn
Kho mãag-kit
Tên kỹ năngintelligent-routing
Sao
8.2K
Bản fork
1.5K
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được vudovn công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Intelligent Routing trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/vudovn/ag-kit/tree/main/.agents/skills/intelligent-routing
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

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
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Intelligent Routing trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Intelligent Routing ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Intelligent Routing với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

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).

Câu hỏi thường gặp

Kỹ năng AI Intelligent Routing làm được gì?

Tự động chọn tác nhân AI và định tuyến tác vụ thông minh. Phân tích yêu cầu của người dùng rồi tự động chọn (các) tác nhân AI chuyên biệt phù hợp nhất mà không cần người dùng chỉ định rõ.

Vì sao nên dùng Intelligent Routing trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Intelligent Routing là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Intelligent Routing trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/vudovn/ag-kit/tree/main/.agents/skills/intelligent-routing. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Intelligent Routing?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Intelligent Routing với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Intelligent Routing với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Intelligent Routing có miễn phí không?

Có. Kỹ năng này được vudovn phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇