🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

ChromaDB Agent Router

by @mars375

Local semantic message routing for multi-agent systems. Routes messages to the correct agent based on embeddings + keyword + context scoring. No external API...

Versionv1.0.0
⚑ When to Use
TriggerAction
- **Message bus routing** β€” Front-load balancer for agent mesh networks
- **Intent classification** β€” Classify support tickets, requests, commands
- **Bilingual routing** β€” French/English queries handled natively
πŸ’‘ Examples

1. Define Your Routes

Create a routes configuration file (JSON or Python dict):

ROUTES = {
    "ops": {
        "agent": "orion",
        "descriptions": [
            "Deploy and manage infrastructure and Docker containers",
            "Install, configure, and restart services",
            "DevOps operations, CI/CD, deployment pipelines",
        ],
        "keywords": ["deploy", "install", "docker", "compose", "container", "restart"],
        "action_verbs": ["dΓ©ploie", "installe", "configure", "redΓ©marre"],
    },
    "security": {
        "agent": "aegis",
        "descriptions": [
            "Security audits, vulnerability scanning, hardening",
            "Firewall rules, SSL certificates, access control",
        ],
        "keywords": ["security", "firewall", "ssl", "vulnerability"],
        "action_verbs": ["sΓ©curise", "hardened"],
    },
    # ... add more routes
}

2. Initialize and Route

from semantic_router import SemanticRouter

router = SemanticRouter(routes_config="routes.json") router.initialize() # Builds ChromaDB index (~6s cold start, then cached)

result = router.route("Deploy the new monitoring stack on the homelab")

β†’ {"route": "ops", "agent": "orion", "confidence": 0.94}

3. Use in OpenClaw

# Start the API server
python3 scripts/router-api.py --port 8321

Route a message

curl -X POST http://localhost:8321/route \ -H "Content-Type: application/json" \ -d '{"message": "Check the firewall logs for suspicious activity"}'

View on ClawHub
TERMINAL
clawhub install chromadb-agent-router

πŸ§ͺ Use this skill with your agent

Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

πŸ” Can't find the right skill?

Search 60,000+ AI agent skills β€” free, no login needed.

Search Skills β†’