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

# The repository

What is in the visdom-ai-gateway repository and how to work on it.

The gateway lives in `VirtusLab/visdom-ai-gateway` (private). It holds deployment and integration, not a fork: the two gateways are used as released upstream images, and everything Visdom adds is configuration today and integration code as the [roadmap](/visdom-ai-gateway/roadmap.md) lands.

## Layout

| Path                                 | What is there                                                                                                       |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------- |
| `deploy/compose/docker-compose.yml`  | Reference single-host deployment: LLM gateway, MCP gateway, PostgreSQL; the `smoke` profile adds a test tool server |
| `deploy/compose/litellm/config.yaml` | Model catalogue, routing and gateway policy                                                                         |
| `deploy/compose/postgres/init.sql`   | A separate database for the MCP gateway                                                                             |
| `deploy/compose/.env.example`        | Every variable the deployment reads                                                                                 |
| `scripts/init-env.sh`                | Generates `.env` with random secrets; never overwrites                                                              |
| `scripts/smoke-test.sh`              | End-to-end check of both gateways without calling a model provider                                                  |
| `scripts/echo_mcp.py`                | The one-tool MCP server the smoke test registers                                                                    |
| `docs/architecture.md`               | Today's deployment and the target with the Visdom layers                                                            |
| `docs/offline.md`                    | What calls out and how it is switched off                                                                           |

## Working on it

Every change to the deployment is checked the same way:

```bash
cd deploy/compose
docker compose --profile smoke down -v      # start from nothing
docker compose --profile smoke up -d
cd ../.. && ./scripts/smoke-test.sh
```

The test creates teams, keys and tool registrations with a per-run suffix, so it can run repeatedly against the same installation.

## Versions

| Component         | Tested  |
| ----------------- | ------- |
| LiteLLM proxy     | 1.100.1 |
| MCP Context Forge | 1.0.10  |
| PostgreSQL        | 16      |

The compose file defaults to the upstream's moving tags (`main-stable`, `latest`) so a fresh checkout gets current fixes. Pin image digests in any installation that is not an evaluation.


---

# 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.visdom.virtuslab.com/visdom-ai-gateway/the-repository.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.
