# OpenSmartRoute > OpenSmartRoute routes every request to the best LLM, agent, skill, persona, tool or human under hard constraints, explains the decision and learns from outcomes. Open source, zero core dependencies. OpenSmartRoute is an open-source Python router that picks the best LLM, agent, skill, tool or human for every request on cost, quality, latency and policy, with a per-request trace and a hosted API at https://opensmartroute.ai. Install with `pip install opensmartroute` or `osr` from the install scripts on the landing page. ## Start here - [Home](https://opensmartroute.ai): product overview, install one-liners and the hosted platform. - [Model catalogue](https://opensmartroute.ai/models): routing targets and the reference LLM catalogue with list prices. - [Vendors](https://opensmartroute.ai/vendors): every LLM vendor with models, prices and releases. - [Pricing](https://opensmartroute.ai/pricing): Free, Pro and Enterprise plans for the hosted API. - [Compare](https://opensmartroute.ai/compare): OpenRouter, LiteLLM, Portkey and in-house routers side by side. - [REST API reference](https://opensmartroute.ai/docs/api): every endpoint with parameters and examples. - [OpenAPI document](https://opensmartroute.ai/openapi.json): machine-readable API description. ## Get started What OpenSmartRoute is, how to install it and how to route a first request. - [Overview](https://opensmartroute.ai/docs/readme): Installation, quick start, the shape of a decision and where each part of the project lives. - [User guide](https://opensmartroute.ai/docs/GUIDE): Targets, rules, plans, providers, execution, learning, the CLI and SKILL.md packages. ## Hosted platform The routing API behind an API key: decisions with trace, the OpenAI-compatible endpoint, plans and quotas. - [Platform guide](https://opensmartroute.ai/docs/PLATFORM): Authentication, POST /api/v1/route, the OpenAI-compatible endpoint, feedback, plans, tenants, dashboard and errors. - [Marketplace](https://opensmartroute.ai/docs/MARKETPLACE): Find, install, buy and publish agents, skills, personas, prompts and stack templates; ratings and the review lifecycle. - [Cost estimates and the MCP server](https://opensmartroute.ai/docs/MCP): Quote a request before sending it, recommended models per use case, and the MCP server that puts the router in VS Code, Cursor, Claude and any agent. - [REST API reference](https://opensmartroute.ai/docs/api): Each endpoint with parameters, request and response schemas and an example request. ## Python SDK The router as a library: targets, rules, decorators, the enterprise builder and the public API. - [SDK guide](https://opensmartroute.ai/docs/SDK): Decorators for strategies, rules, signals, middleware and telemetry; settings and plugins. - [Enterprise builder](https://opensmartroute.ai/docs/ENTERPRISE): RouterBuilder: auto-learning, health, budgets, tenants, audit, stores and rollout. - [Tracing and observability](https://opensmartroute.ai/docs/OBSERVABILITY): Spans and events for every routing stage; memory, metrics, log, file and OpenTelemetry sinks; /events, /trace and /metrics. - [Benchmarks and leaderboard recipe](https://opensmartroute.ai/docs/leaderboard): Collect the public preference suites, train the routing SLM, evaluate with baselines, robustness and held-out calibration, and publish a reproducible run. - [Published benchmark runs](https://opensmartroute.ai/docs/leaderboard-results): The 0.5.0 run on MT-Bench human, PPE human and WebDev Arena: learned router vs declarative, static task table and baselines, with robustness and held-out calibration. - [Python API reference](https://opensmartroute.ai/docs/REFERENCE): Every public module, class and function with its signature, generated from the source. ## Self-hosting Run the same router as a service on your own infrastructure. - [Deploy with Docker and Helm](https://opensmartroute.ai/docs/deploy): The `osr serve` container image, entrypoint environment, Helm chart and health checks. ## Concepts How a request becomes a decision, the mathematics behind each score and the research the modules draw on. - [Architecture](https://opensmartroute.ai/docs/ARCHITECTURE): How a request becomes a decision: signals, policy, strategies, utility, plans. - [Mathematics](https://opensmartroute.ai/docs/MATH): The utility function, calibration, IRT, Bradley-Terry, LinUCB and Markov derivations. - [Research](https://opensmartroute.ai/docs/RESEARCH): Problem statement, literature by family and which module borrows which idea. - [Open Capability Manifest](https://opensmartroute.ai/docs/ocm): The OCM specification and JSON Schema for describing routable capabilities. ## Security Threat model, hardening and how to report a vulnerability. - [Security model](https://opensmartroute.ai/docs/SECURITY): Threat model, guard middleware, PII handling, provenance and the red-team suite. - [External review pack](https://opensmartroute.ai/docs/SECURITY_REVIEW): Scope, trust boundaries, the evidence the project produces with reproduction commands, the questions for an independent reviewer and the review log. - [Reporting vulnerabilities](https://opensmartroute.ai/docs/security-policy): Supported versions and how to report a security issue privately. ## Agent skills Agent-Skills packages (SKILL.md) for coding assistants working with OpenSmartRoute. They are also valid routing targets; `osr skills` validates them. - [osr-contributing](https://opensmartroute.ai/docs/skills/osr-contributing): Work inside the OpenSmartRoute repository itself. - [osr-decorator-sdk](https://opensmartroute.ai/docs/skills/osr-decorator-sdk): Extend OpenSmartRoute in Python with the decorator SDK. - [osr-deploy-serve](https://opensmartroute.ai/docs/skills/osr-deploy-serve): Run OpenSmartRoute as a service - the `osr serve` FastAPI app and its /route, /feedback, /targets, /stats, /healthz, /whoami and OpenAI-compatible /v1 endpoints, access tokens for the self-hosted server (`serve --token` / `--generate-token` / `--require-auth`, OSR_SERVER_AUTH_TOKENS, `osr token generate`, `osr login --url ... - [osr-enterprise-builder](https://opensmartroute.ai/docs/skills/osr-enterprise-builder): Assemble a production OpenSmartRoute router with RouterBuilder - auto-learning (IRT, Bradley-Terry, LinUCB, Markov), health circuit breakers and budgets, tenant/cache/timeout/guard middleware, logging and metrics telemetry, hash-chained audit, Redis/SQL/encrypted state stores, calibration, retrieval narrowing, shadow/A-B rollout and fair share. - [osr-evaluation](https://opensmartroute.ai/docs/skills/osr-evaluation): Evaluate and benchmark an OpenSmartRoute router - author JSONL evaluation datasets, run `osr eval` with cost/quality frontiers, baselines, robustness, calibration (ECE, Brier, conformal) and ablation reports, load RouterBench-style presets, run off-policy evaluation of logged decisions, and gate CI on minimum accuracy. - [osr-integrations](https://opensmartroute.ai/docs/skills/osr-integrations): Connect OpenSmartRoute to the outside world - OpenAI-compatible LLM clients and handlers, MCP tool catalogues (stdio client, signed manifests), A2A agent cards, agent harnesses (callable, HTTP, subprocess), LangGraph nodes and conditions, Microsoft Agent Framework executors, OpenAI function-calling tool specs, persona loaders and Agent-Skills SKILL.md packages. - [osr-platform](https://opensmartroute.ai/docs/skills/osr-platform): Work on the hosted OpenSmartRoute platform under platform/ - the FastAPI platform API (osr_platform, accounts, API keys, plans, metered /api/v1/route, OpenAI-compatible /v1 proxy, admin, editions, the committed openapi.json snapshot) and the Next.js 16 web app (landing, models catalogue, rankings, playground, pricing, dashboard, route-handler proxies). - [osr-routing-catalogue](https://opensmartroute.ai/docs/skills/osr-routing-catalogue): Define and tune an OpenSmartRoute routing catalogue. - [osr-security-hardening](https://opensmartroute.ai/docs/skills/osr-security-hardening): Harden OpenSmartRoute deployments against prompt injection, gadget/steering attacks, PII leakage, runaway agents and untrusted tool arguments - InputGuard and GuardMiddleware, learned gadget detector, PII redaction, ResourceLimits for tools and agents, OriginPolicy for tool-parameter provenance, signed MCP manifests, secret loading and the safety-routing red-team suite. ## Releases What changed in each version, what is planned and how to contribute. - [Changelog](https://opensmartroute.ai/docs/changelog): Release notes for every version. - [Roadmap](https://opensmartroute.ai/docs/ROADMAP): What is complete, what is open and the exit criteria for each milestone. - [Contributing](https://opensmartroute.ai/docs/contributing): Development setup, quality gates, the public API and deprecation policy. ## Optional - [Source code](https://github.com/isathish/OpenSmartRoute): Apache-2.0 repository, issues and discussions. - [PyPI](https://pypi.org/project/opensmartroute/): package releases. - [Changelog](https://opensmartroute.ai/docs/changelog): release notes.