A simulated user talks to your agent through its API.
A judge checks the dialogue against the claims in your scenario.
Quick start · Docs · Changelog
See a real report → See the historical comparison →
A scenario gives the simulated user a task and lists the claims a judge should check. Run each scenario several times to see which attempts pass, how long the agent takes to answer, and how many tokens and tool calls it reports. Open a failed attempt to read the dialogue alongside the judge's decisions.
Install uv, then create a project.
uvx convy init my-bench # a project with examples
cd my-bench
uv run convy run echo --smoke # check convy itself: free, no models called
cp .env.example .envThe commands above install the published release. To try the features described on main,
run uv add --editable /path/to/convy in my-bench, using the path to your local checkout.
Set GW_BASE_URL and GW_API_KEY in .env for your OpenAI-compatible gateway.
Check the model names in models.py, then run uv run convy run echo to play the scenarios.
Open results/index.html in a browser to see the runs. Each one links to its own
results/<agent>/<run>/report.html with the judge’s decisions and the dialogues.
A new project looks like this:
my-bench/
├── gateway.py # the model gateway, shared by models.py and the agents
├── models.py # the models that play the user and the judge
├── agents/ # one file per agent
├── scenarios/ # one YAML file per scenario, in folders if you like
└── results/ # a folder per run with its report, and the index
A scenario says who the user is, what they want, and what the judge should check:
id: clarify-backup
max_turns: 6
user: |
You need a backup script. Start short: "Make me a backup script".
Give details only when the assistant asks for them:
back up ~/photos to /mnt/backup, once a day.
judge:
- Before giving a finished script, the agent asked what to back up and where to
- The final script copies ~/photos to /mnt/backup and runs once a dayThe judge marks each claim as passed or failed and can give a reason. The report shows which claim failed, in which attempt, next to the dialogue. More in Scenarios.
An agent with a JSON API needs only settings. Put this in agents/support_bot.py:
from convy import JsonAgent, JsonEndpoint, TokenPaths
agent = JsonAgent(
JsonEndpoint("https://bot.example.com/api/chat"),
body={"session_id": "{session}", "message": "{text}"},
reply="data.answer",
tokens=TokenPaths(input="data.usage.input_tokens", output="data.usage.output_tokens"),
)Then check the connection and run it:
uv run convy run support_bot --smoke # the agent answers for real, nothing else is called
uv run convy run support_bot -k 3 # every scenario, three attempts eachKeys, streaming, logins, blocking clients and certificates are in Connect an agent.
Open results/index.html after running both builds. Compare their pass counts, answer times,
token use and tool calls. Choose a reference to see pass-rate differences for comparable runs,
or open a scenario from the matrix to read the dialogue that explains a failure.
In CI, identify the baseline and candidate by run ID or unique suffix.
uv run convy compare 7ad8 5e85 --fail-on-regression # before, then afterWith both runs loaded, exit code 3 means the check found evidence of a regression or could not compare the runs. See The report and CI exit codes.
convy uses YAML scenarios and writes offline reports. For scenarios written in code, see LangWatch Scenario. If you already use an evaluation framework, see promptfoo’s simulated user or DeepEval’s conversation simulator.
convy is in alpha. The Python API and the format of runs may change before 1.0. See the changelog.
convy run executes project Python files, including the selected agent. Run projects you trust. See the security policy.
| page | what is in it |
|---|---|
| Connect an agent | JSON agents, your own classes, tokens, certificates |
| Scenarios | how to write them, verdicts, convy run options |
| The simulated user | the built-in user, scripted users, replay, failures |
| The judge | how sure it is, --trust, your own judge |
| Runs | the run folder, stop and resume, exit codes |
| The report | runs workspace, scenario details, two-run CLI comparison |
| Results as data | a run as tables, convy export, pandas |
| Run from Python | the library behind the command |
| The shop demo | the bot behind the recorded demo |
| Architecture | for people who change convy's code |
Issues and pull requests are welcome. Read CONTRIBUTING.md first, and follow the Code of Conduct. Report vulnerabilities privately, as the security policy says.
