> For the complete documentation index, see [llms.txt](https://docs.bito.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bito.ai/governor/overview.md).

# Overview

Bito's Governor is a gateway that sits between your AI coding tools (Claude Code, Cursor, Codex, etc.) and the LLM providers (Anthropic, OpenAI, Groq, etc.). It reduces the tokens each task consumes and the price you pay for every token.

Governor combines [Bito's AI Architect](/ai-architect/overview.md) with a smart model router:

* **Bito's AI Architect** cuts the token count. It serves system context from a live [knowledge graph](/ai-architect/knowledge-graph.md) of your entire engineering system (code, business context, and tribal knowledge), so your tools skip the discovery work that consumes most of a task's tokens.
* **The model router** cuts the price per token. It uses the same knowledge graph to see how complex each request is, then sends it to the cheapest LLM that can handle it, because most requests do not need a frontier model.

Agent spend is tokens multiplied by price. Governor cuts both numbers, so the savings also multiply rather than add.

Nothing changes about how your team works. Point your coding tools at Governor with one base URL and one key, and everything else stays exactly as it is.

<figure><img src="/files/VsPtJHh9SNHQX0ZZVKbi" alt=""><figcaption></figcaption></figure>

## How Governor works

Governor is a drop-in endpoint. Your tools stay unchanged, your provider accounts stay yours, and you can connect Governor directly or through a gateway you already run.

Every request follows the same path:

1. **Authenticate.** Governor verifies the gateway key your tool sent.
2. **Add context.** AI Architect answers system questions inside the request, so the tool starts the task already knowing your architecture.
3. **Pick the model.** The router judges how complex the request is and selects the cheapest model that can handle it, within the policy you set.
4. **Call the provider.** Governor forwards the request to your own LLM provider account using your own credential.
5. **Record it.** Governor returns the response and logs the model used, tokens consumed, status, and cost.

## Deployment options

Governor runs either on Bito's infrastructure or inside your own network. Both use the same configuration model, so a workspace you build during an evaluation transfers to a self-hosted deployment without redesign.

1. [**Bito-hosted**](/governor/set-up-bito-governor-bito-hosted.md) is the faster path. Bito creates your workspace and issues an admin token, you configure providers and routes in the console, and Bito applies updates. Most teams start here to get a measurable result within a day.
2. [**Self-hosted**](/governor/set-up-bito-governor-self-hosted-with-docker.md) keeps everything inside your network. One command installs Governor and its database as Docker containers on a single host, and your provider credentials are encrypted with a key that never leaves that host. Choose this when data residency, network egress, or regulatory requirements prevent traffic from transiting a third-party service.

|                      | Bito-hosted                                       | Self-hosted                                        |
| -------------------- | ------------------------------------------------- | -------------------------------------------------- |
| Infrastructure       | Managed by Bito                                   | Your own host, running Docker                      |
| Setup                | Nothing to install, configure in the Bito UI      | One command installer                              |
| Provider credentials | Encrypted and stored by Bito                      | Encrypted under a key held on your host            |
| Updates              | Applied by Bito                                   | Applied by you                                     |
| Traffic path         | Your tools to Bito to your LLM provider           | Your tools to your host to your LLM provider       |
| Best for             | Fastest start, with no infrastructure to maintain | Data residency, egress, or regulatory requirements |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.bito.ai/governor/overview.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
