> 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/getting-started/quick-start.md). Agents can also search and read this documentation through its [MCP server](https://docs.visdom.virtuslab.com/~gitbook/mcp).

# Quick start

Both gateways and the console on one machine with Docker Compose: demo data, a first model call, the guardrails at work. No model provider needed.

This page runs the whole Visdom AI Gateway on one machine for an evaluation: the LLM gateway, the MCP gateway, the console, PostgreSQL and Redis, from the repository's Docker Compose file. Demo models answer with canned text, so you need no provider account. Control Plane and AI Tracing are simulated inside the console in this setup.

For a cluster installation, see [Install on Kubernetes (Helm)](https://docs.visdom.virtuslab.com/visdom-ai-gateway/operations/kubernetes-helm.md). Compose is for evaluation only.

{% stepper %}
{% step %}

### Check the prerequisites

* Docker with Compose v2.
* `git`, `curl`, `openssl` and Python 3.10 or newer on the host. The setup scripts use only the Python standard library.
* Several GB of memory for Docker: the LLM gateway alone takes more than 1.5 GB while it starts. The first start also builds the console image from source.
* Ports 3000, 4000 and 4444 free on `localhost`.
  {% endstep %}

{% step %}

### Clone the repository and generate secrets

```bash
git clone https://github.com/VirtusLab/visdom-ai-gateway.git
cd visdom-ai-gateway
./scripts/init-env.sh
```

`init-env.sh` writes `deploy/compose/.env` with a random value for every secret: the database password, the LiteLLM master and salt keys, the MCP gateway's signing and encryption keys, the admin passwords, the console's session and hook secrets, and a reporting token. It refuses to overwrite an existing `.env`.

Every variable is described in `deploy/compose/.env.example` and in the [Configuration reference](https://docs.visdom.virtuslab.com/visdom-ai-gateway/operations/configuration-reference.md).
{% endstep %}

{% step %}

### Start the deployment

```bash
cd deploy/compose
docker compose --profile demo up -d --build --wait
```

The `demo` profile adds two MCP tool servers with synthetic data: an issue tracker and a read-only account service. `--wait` returns when the services are healthy. On the first start both gateways create their database schema, which takes a minute or two.

| Address                                  | What                                         |
| ---------------------------------------- | -------------------------------------------- |
| `http://localhost:3000`                  | The console                                  |
| `http://localhost:4000/v1`               | LLM gateway, OpenAI-compatible API           |
| `http://localhost:4000/v1/messages`      | LLM gateway, Anthropic Messages API          |
| `http://localhost:4444/servers/<id>/mcp` | MCP gateway, one endpoint per virtual server |
| {% endstep %}                            |                                              |

{% step %}

### Sign in to the console

Open `http://localhost:3000`. In this setup the console runs in local sign-in mode with one admin account. The e-mail is `admin@example.com`; read the password from `.env`:

```bash
grep CONSOLE_ADMIN_PASSWORD .env
```

<figure><img src="https://2020465637-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe29EtUChYm1v2qbe6hDa%2Fuploads%2Fgit-blob-bce35e97eabfeef3d74d2903bf36fcb78b4ffd9d%2Fconsole-dashboard.png?alt=media" alt="Console dashboard with the state of both gateways, spend, calls, MCP tools and budget alerts"><figcaption><p>Dashboard: both gateways, spend and calls at a glance.</p></figcaption></figure>

{% hint style="info" %}
The local admin is a break-glass account for a standalone gateway. In a Visdom deployment people sign in with their Visdom account through Keycloak; see [Sign-in and roles](https://docs.visdom.virtuslab.com/visdom-ai-gateway/visdom-platform/sign-in-and-roles.md).
{% endhint %}
{% endstep %}

{% step %}

### Load the demo data

From the repository root:

```bash
cd ../..
./scripts/demo-seed.py
```

The script applies the model catalogue (`deploy/models.json`) and the MCP catalogue (`deploy/mcp-servers.json`), sets budgets and model allow-lists for the demo projects Cards Platform, Payments Core and Mobile Banking, issues API keys, creates virtual servers with client tokens, sets notification routes, and then makes 40 model calls and about a dozen tool calls so that Activity and Costs are not empty. Risk Analytics is left without a budget, so it has no access to models.

It is idempotent: run it again to bring the demo back to the same state. Options:

| Option        | Effect                                                                                   |
| ------------- | ---------------------------------------------------------------------------------------- |
| `--clean`     | First removes what the smoke and end-to-end tests left behind                            |
| `--traffic N` | Makes `N` model calls instead of 40 (MCP calls: a third of it); `--traffic 0` makes none |

The secrets of the API keys the script issued are in `deploy/compose/.demo-keys`, a JSON file the repository ignores.
{% endstep %}

{% step %}

### Make a first call

Take the key `cards-dev-anna` (project Cards Platform) and call the alias `demo-assistant`:

```bash
KEY=$(python3 -c "import json; print(json.load(open('deploy/compose/.demo-keys'))['cards-dev-anna'])")

curl -s http://localhost:4000/v1/chat/completions \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "demo-assistant", "messages": [{"role": "user", "content": "Summarise the open 3-D Secure incidents."}]}'
```

The answer is the demo model's canned text, "Here is a short answer from the demo assistant, served through the Visdom AI Gateway.", in the OpenAI response format. The call appears in the console under **Activity** with the project, the key, the tokens and the cost.

To issue your own key instead, open **API keys → Create API key**, pick a project with a budget and copy the secret: it is shown once.

<figure><img src="https://2020465637-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe29EtUChYm1v2qbe6hDa%2Fuploads%2Fgit-blob-4ca047d2e0b81fd9de65842fc4d4e715a32b14c8%2Fconsole-create-api-key.png?alt=media" alt="Create API key dialog with project, name, owner, expiry, limits and models"><figcaption><p>Create API key: the secret is shown once, right after the key is created.</p></figcaption></figure>
{% endstep %}

{% step %}

### Try the guardrails

A prompt with personal data is masked, not refused. The call goes on and the response says what was masked:

```bash
curl -s -D - -o /dev/null http://localhost:4000/v1/chat/completions \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"model": "demo-assistant", "messages": [{"role": "user", "content": "Customer PESEL 44051401359 asks about a refund"}]}' \
  | grep -i '^x-visdom-masked'
```

```
x-visdom-masked: PESEL=1
```

The model received `<PESEL>` in place of the number.

A prompt with a secret is refused before it reaches any model:

```bash
curl -s -o /dev/null -w '%{http_code}\n' http://localhost:4000/v1/chat/completions \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"model": "demo-assistant", "messages": [{"role": "user", "content": "deploy with key AKIAIOSFODNN7EXAMPLE"}]}'
```

```
403
```

The error message names the kind of secret (`Secret in the prompt (AWS access key)`), and **Activity** lists the call as refused with that reason. More in [Guardrails](https://docs.visdom.virtuslab.com/visdom-ai-gateway/llm-gateway/guardrails.md).
{% endstep %}

{% step %}

### Connect Claude Code

The same key works for Claude Code through the Anthropic API of the gateway:

```bash
export ANTHROPIC_BASE_URL=http://localhost:4000
export ANTHROPIC_AUTH_TOKEN=$KEY
export ANTHROPIC_MODEL=demo-assistant
export ANTHROPIC_DEFAULT_HAIKU_MODEL=demo-assistant
claude
```

The demo models answer with canned text and do not call tools, so for real work point the project at a real model. The full setup, with an MCP virtual server, is in [Claude Code](https://docs.visdom.virtuslab.com/visdom-ai-gateway/clients/claude-code.md).
{% endstep %}

{% step %}

### Tear down

```bash
cd deploy/compose
docker compose --profile demo down -v
rm -f .demo-keys
```

`-v` removes the volumes: both databases and the console's data (approvals, evidence chain, notification settings). Without `-v` the next `up` starts where you left off.
{% endstep %}
{% endstepper %}

## Next steps

* Add a real provider: put its credentials in `deploy/compose/.env` and run `./scripts/sync-models.py`. See [Model catalogue and providers](https://docs.visdom.virtuslab.com/visdom-ai-gateway/llm-gateway/model-catalogue.md).
* Other Compose profiles (local model, Presidio, SIEM collector, mail relay, OPA): [Evaluate with Docker Compose](https://docs.visdom.virtuslab.com/visdom-ai-gateway/operations/docker-compose.md).
