Semantic Router is an open-source library from Aurelio Labs for making superfast, meaning-based routing decisions in LLM applications. Hosted on GitHub with about 4,000 stars, it replaces slow LLM calls for routing with vector-space comparisons that answer in milliseconds.
Many AI applications need to decide what to do with a user input: answer directly, call a tool, refuse, switch models or escalate. Doing that with an LLM call is slow and expensive. Semantic Router instead embeds example utterances for each route and sends incoming text to the route whose examples it is semantically closest to. The library supports dynamic routes that generate responses, static routes that trigger actions, guardrails for jailbreak and PII detection, and a growing set of encoders from providers like OpenAI, Cohere and Hugging Face, plus local models. It also handles multimodal inputs such as images. The project is actively maintained with frequent releases through 2026.
Semantic Router is free and open source under the MIT license. There is no paid tier of the library itself; costs are limited to any third-party embedding APIs you choose to use, and local encoders avoid even those.
Semantic Router is for developers building chatbots, agents and RAG systems who need fast, cheap and controllable routing, guardrails and intent handling without spending an LLM call on every decision.