<p>Most AI tools make you choose: either you run a local model with limited capability, or you pay for cloud inference and accept the latency and cost. Dirgha’s agent OS is built on the premise that this is a false choice.</p>
<h2>The three layers</h2>
<p>Dirgha works across three layers that talk to each other seamlessly:</p>
<p><strong>Layer 1: The CLI.</strong> The Dirgha CLI (<code>dirgha</code>) is your local command center. It runs on any machine, talks to local models via Ollama, and can execute multi-step agent tasks without a network connection. Think of it as a local brain with long-term memory.</p>
<p><strong>Layer 2: The Gateway.</strong> When a task requires more compute than local hardware can handle — or when you want to route to a specialized model — the CLI hands off to the Dirgha gateway. The gateway routes to the cheapest capable endpoint: NVIDIA NIM, open-source inference, or your own self-hosted instance.</p>
<p><strong>Layer 3: The Agent Cloud.</strong> For long-running tasks, Dirgha spins up ephemeral agent VMs that work in parallel. Code generation, research synthesis, data pipelines — these run asynchronously and push results back to your local session when done.</p>
<h2>One command, all three layers</h2>
<p>From the user’s perspective, this complexity disappears into a single command. Type <code>dirgha ask "analyze this codebase and write a migration plan"</code> and the system figures out whether to run locally, route to cloud, or spin up agents — based on task complexity, your plan, and current load.</p>
<p>That’s the Dirgha promise: the power of a distributed AI infrastructure, with the simplicity of a CLI command.</p>