Niyatna Docs

Model Routing & LocalRoute

Route agent execution across models and API providers while maintaining stable intent and proof standards.


Niyatna OS decouples the reasoning engine from the operational logic. All agent execution is routed through LocalRoute—our model, provider, and API key management layer.

This architecture ensures that models are treated as temporary execution assets rather than permanent logic repositories.


LocalRoute Architecture

  • Model-Agnostic Routing: Dynamically dispatches tasks to the most efficient model (local, private VPS, or cloud API) based on goal complexity.
  • Scoped Key Management: Holds master API keys in an encrypted vault, injecting temporary, permission-restricted session variables into agent containers.
  • Privacy Guardrails: Routes sensitive business operations through local/private runtimes to prevent data leaks.

Optimization Standard

LocalRoute dynamically optimizes model routing to maintain a high token-to-performance ratio:

  1. Low Complexity: Routes simple tasks (formatting, simple lookups) to fast, lightweight models.
  2. High Complexity: Routes logical planning, refactoring, and verification checks to advanced reasoning models.
  3. Proof Verification: Collects token usage analytics and routes reasoning steps through local caching layers to maximize efficiency.