--- language: - en license: apache-2.0 library_name: transformers tags: - text-classification - intent-classification - query-routing - agent - llm-router pipeline_tag: text-classification --- # ⚡ AgentRouter Ultra-fast intent classification for LLM query routing. Classifies user queries into 10 intent categories in **<5ms** on GPU. Built on [MiniLM](https://huggingface.co/microsoft/MiniLM-L12-H384-uncased) (33M params) — small enough for CPU inference, fast enough for real-time routing. ## 🚀 Usage ```python from transformers import pipeline router = pipeline("text-classification", model="ENTUM-AI/AgentRouter") router("Write a Python function to sort a list") # [{'label': 'code_generation', 'score': 0.98}] router("Why am I getting a TypeError?") # [{'label': 'code_debugging', 'score': 0.97}] router("Translate hello to Spanish") # [{'label': 'translation', 'score': 0.99}] router("What is quantum computing?") # [{'label': 'information_retrieval', 'score': 0.96}] ``` ## 🏷️ Intent Classes | Intent | Description | Suggested Tools | |--------|-------------|----------------| | `code_generation` | Write new code | code_interpreter, file_editor | | `code_debugging` | Fix bugs and errors | code_interpreter, debugger | | `math_reasoning` | Solve math problems | calculator, wolfram_alpha | | `creative_writing` | Write stories, poems, essays | — | | `summarization` | Summarize text | file_reader | | `translation` | Translate between languages | translator | | `information_retrieval` | Answer questions, explain topics | knowledge_base | | `data_analysis` | Analyze data, create charts | code_interpreter, data_visualizer | | `web_search` | Search the web for current info | web_browser, search_engine | | `general_chat` | Casual conversation | — | ## 🔍 Use Cases - **LLM routing** — route queries to specialized models or tools - **Agent frameworks** — decide which tool to invoke - **Cost optimization** — use cheap models for simple intents, expensive for complex - **Latency optimization** — skip heavy pipelines for general chat ## ⚠️ Limitations - English only - 10 fixed intent categories