Sanctum Router
Self-hosted, OpenAI-compatible inference proxy for the agent stack.
Sanctum Router sits between agent frameworks (Letta, Sanctum) and multiple LLM backends, providing a single stable API surface with policy-enforced routing, credit-aware failover, and full local control.
What is Sanctum Router?
Sanctum Router fills the role that OpenRouter plays in the cloud world â but locally, extensibly, and wired into the agent stack. It routes agent LLM requests across multiple providers (Venice AI, Featherless, local OpenAI-compatible servers, etc.) and chooses which backend to use at request time based on deterministic policy.
The "Entorhinal Cortex" Concept
In the SanctumOS cognitive architecture, the router is modeled after the entorhinal cortex: a gateway between self (agent memory, state, operational constraints) and cognition (model providers that perform inference).
Just as the entorhinal cortex mediates traffic between hippocampal memory and neocortical cognition, Sanctum Router mediates traffic between the agent and the available model substrates â selectively and predictably. This is policy-enforced gating, not random load balancing.
API Surface
Sanctum Router exposes a standard OpenAI-compatible API:
| Endpoint | Description |
|---|---|
GET /v1/models |
List available models across all providers |
POST /v1/chat/completions |
Chat completion with automatic provider routing |
POST /v1/embeddings |
Embedding generation |
Any tool or framework that speaks the OpenAI API can use Sanctum Router as a drop-in backend.
Key Features
- Deterministic Policy Routing: Requests are routed based on model capabilities, provider health, and credit availability â not random selection
- Credit-Aware Failover: Automatically fails over to alternate providers when a backend is unavailable or out of credits
- Multi-Provider Support: Venice AI, Featherless, local inference servers, and any OpenAI-compatible endpoint
- Config API: Runtime configuration of providers, policies, and routing rules
- SMCP Plugin: Exposes router management as MCP tools for agent-driven configuration
- OpenAI Compatible: Drop-in replacement for OpenAI API endpoints
Quick Start
git clone https://github.com/sanctumos/sanctum-router.git
cd sanctum-router
# Follow the installation instructions in the repository README
git clone https://github.com/sanctumos/sanctum-router.git cd sanctum-router
Follow the installation instructions in the repository README
Configure your providers, point your Letta instance (or any OpenAI-compatible client) at the router's /v1/ endpoint, and requests are automatically routed through policy.
Integration with SanctumOS
Sanctum Router integrates with the broader stack:
- Letta: Point Letta's model endpoint at the router for transparent multi-provider inference
- SMCP: Router configuration is available as MCP tools for agent-driven management
- Venice Billing Monitor: Works alongside the Venice Billing Monitor for credit tracking
Repository
- Source: sanctumos/sanctum-router
License
- Code: AGPLv3 â GNU Affero General Public License v3.0
- Documentation: CC-BY-SA 4.0 â Creative Commons Attribution-ShareAlike 4.0
Sanctum Router â policy-enforced inference routing for self-hosted AI agents.