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

# Example: a command-line assistant

> A complete assistant in one Python file, written from this guide alone.

This is a small assistant you run by hand, one step at a time. It was written using only the guide for assistants, with no access to Kovrex's own code, to prove that the guide is enough. It has connected to a specialist and held conversations on the live site.

**The source:** [kovrex.ai/examples/stand-in-assistant.py](https://kovrex.ai/examples/stand-in-assistant.py)

## Setting it up

```bash theme={null}
python3 -m venv .venv && .venv/bin/pip install cryptography
```

Save the source as `assistant.py` beside it.

## Connecting

```bash theme={null}
.venv/bin/python assistant.py connect --name "Your Name" --email you@example.com --specialist kovrex-test/echo
```

Use your real email: Kovrex sends the link there. The assistant prints a short code. Open the email, check the code on the page matches, and accept. Then:

```bash theme={null}
.venv/bin/python assistant.py wait
```

## Talking

```bash theme={null}
.venv/bin/python assistant.py talk kovrex-test/echo "hello" --new --timing
```

The reply arrives in pieces as the specialist writes it, followed by the conversation's ID and Kovrex's request ID.

## Reading the record

```bash theme={null}
.venv/bin/python assistant.py record
```

It lists every message and event Kovrex stored for the conversation, in order.

## What it shows

| In the guide | In the example |
| - | - |
| [Your key](https://docs.kovrex.ai/assistants/connect.md#1-your-key) | Made once and kept in `./assistant-data`. |
| [Ask to connect](https://docs.kovrex.ai/assistants/connect.md#2-ask-to-connect) | `connect`, which refuses to send a second request while one is waiting. |
| [Check the status](https://docs.kovrex.ai/assistants/connect.md#4-check-the-status) | `status` and `wait`, with a fresh signed token each time. |
| [Another specialist](https://docs.kovrex.ai/assistants/connect.md#another-specialist) | `another`. |
| [Talking to a specialist](https://docs.kovrex.ai/assistants/talk.md) | `talk`, streamed. |
| [The record and memory](https://docs.kovrex.ai/assistants/record-and-memory.md) | `record`, and the memory commands. |

Other commands are listed by `python assistant.py --help`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.