> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cruq.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Connect a provider, install the CLI, and run your first agent.

## 1. Connect a model provider

In the app, go to **Model Gateway → Providers** and connect a provider
(OpenRouter, OpenAI, or an OpenAI-compatible endpoint). Agents reference models
as `provider/model`, for example `openrouter/gpt-4o-mini`.

## 2. Create an API key

Go to **API keys** and create one. Keep it safe; it is shown only once.

```bash theme={null}
export CRUQAI_API_KEY=cruq_sk_...
export CRUQAI_BASE_URL=https://app.cruq.ai
```

## 3. Install the CLI

```bash theme={null}
pip install cruqai
cruqai login   # or rely on the env vars above
```

## 4. Run an agent

Every new workspace ships an **Example assistant**. List your agents, then run one:

```bash theme={null}
cruqai runs                 # recent runs
cruqai run <agent-id> "What is 15% of 240?"
```

You will see a live tool-call trace as the agent works, and the run is persisted
for later inspection:

```bash theme={null}
cruqai trace <run-id>
```

## 5. Ground it in your own knowledge

```bash theme={null}
cruqai knowledge create "Product docs"
cruqai knowledge add-doc "Product docs" --title "Policies" --file policies.txt
cruqai knowledge search "refund policy"
```

Wire a `knowledge_search` tool into an agent and it will retrieve grounded
context at run time. See [Knowledge](/docs/concepts/knowledge).
