An explainable decision engine for model routing.
Prism separates routing from execution, allowing applications to choose the right model through explicit capabilities, policies, and transparent decisions.
Modern AI applications rarely rely on a single model.
As providers and models grow, routing logic gradually spreads throughout the application:
- provider-specific conditionals
- capability checks
- latency heuristics
- cost thresholds
- fallback chains
What begins as a few if statements eventually becomes infrastructure that is difficult to reason about, extend, and test.
Routing is a system of its own. Prism treats it that way.
Instead of asking which provider should I call?, applications describe what they need.
Prism then:
- analyzes the request
- identifies the required capabilities
- evaluates routing policies
- selects the best execution target
- explains the decision
Execution is optional. Prism can recommend a model or execute the request through provider adapters.
| Crate | Description |
|---|---|
prism-core |
Domain types, traits, and contracts shared across all crates |
prism-engine |
13-stage deterministic routing pipeline |
prism-registry |
Model profile storage and retrieval |
prism-tui |
Terminal interface for interactive decision exploration |
Launch with cargo run to enter an interactive prompt evaluator.
Type or paste a request, press Enter, and explore the full routing pipeline:
- pipeline sidebar with stage-by-stage navigation
- structured workspace views per stage
- contextual details panel
- search, replay, and JSON export
Model selection should not be coupled to application logic.
Every routing decision should be inspectable and reproducible.
Cost, latency, privacy, governance, and organization-specific rules determine how routing decisions are made.
Applications depend on capabilities rather than vendor-specific APIs.
Prompt
↓
Normalization
↓
Intrinsic Extraction → Derived Analysis
↓
Requirement Inference → Capability Mapping → Prioritization
↓
Candidate Filtering
↓
Policy Evaluation
↓
Candidate Scoring
↓
Decision Selection
↓
Explanation Generation
↓
Decision Report
- Core routing engine
- Capability taxonomy and extraction
- Policy framework with typed rules
- Candidate scoring with evidence
- Interactive terminal UI
- Provider adapters
- HTTP API
- Configuration DSL
- Plugin system
cargo build
cargo test
cargo run -p prism-tuiWe welcome contributions from the community.
See CONTRIBUTING.md for setup instructions and contribution guidelines.