convy 0.2.0__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. convy-0.3.0/PKG-INFO +209 -0
  2. convy-0.3.0/README.md +177 -0
  3. {convy-0.2.0 → convy-0.3.0}/pyproject.toml +7 -5
  4. {convy-0.2.0 → convy-0.3.0}/pyproject.toml.orig +8 -6
  5. {convy-0.2.0 → convy-0.3.0}/src/convy/__init__.py +32 -1
  6. {convy-0.2.0 → convy-0.3.0}/src/convy/agent.py +25 -2
  7. {convy-0.2.0 → convy-0.3.0}/src/convy/bench.py +74 -16
  8. {convy-0.2.0 → convy-0.3.0}/src/convy/cli.py +77 -22
  9. convy-0.3.0/src/convy/dialog.py +418 -0
  10. {convy-0.2.0 → convy-0.3.0}/src/convy/fakes.py +43 -6
  11. {convy-0.2.0 → convy-0.3.0}/src/convy/http.py +31 -22
  12. {convy-0.2.0 → convy-0.3.0}/src/convy/model.py +30 -9
  13. {convy-0.2.0 → convy-0.3.0}/src/convy/pages/base.js +2 -0
  14. {convy-0.2.0 → convy-0.3.0}/src/convy/pages/compare.html +9 -6
  15. convy-0.3.0/src/convy/pages/icon.svg +1 -0
  16. {convy-0.2.0 → convy-0.3.0}/src/convy/pages/index.html +2 -1
  17. {convy-0.2.0 → convy-0.3.0}/src/convy/pages/run.html +5 -4
  18. {convy-0.2.0 → convy-0.3.0}/src/convy/pages/window.css +4 -0
  19. {convy-0.2.0 → convy-0.3.0}/src/convy/pages/window.js +24 -9
  20. {convy-0.2.0 → convy-0.3.0}/src/convy/project.py +18 -4
  21. {convy-0.2.0 → convy-0.3.0}/src/convy/report.py +233 -55
  22. {convy-0.2.0 → convy-0.3.0}/src/convy/scenario.py +6 -5
  23. {convy-0.2.0 → convy-0.3.0}/src/convy/template/models.py +2 -2
  24. {convy-0.2.0 → convy-0.3.0}/src/convy/template/pyproject.toml +1 -1
  25. convy-0.2.0/PKG-INFO +0 -488
  26. convy-0.2.0/README.md +0 -457
  27. convy-0.2.0/src/convy/dialog.py +0 -165
  28. {convy-0.2.0 → convy-0.3.0}/LICENSE +0 -0
  29. {convy-0.2.0 → convy-0.3.0}/src/convy/env.py +0 -0
  30. {convy-0.2.0 → convy-0.3.0}/src/convy/pages/base.css +0 -0
  31. {convy-0.2.0 → convy-0.3.0}/src/convy/py.typed +0 -0
  32. {convy-0.2.0 → convy-0.3.0}/src/convy/template/agents/echo.py +0 -0
  33. {convy-0.2.0 → convy-0.3.0}/src/convy/template/agents/example.py +0 -0
  34. {convy-0.2.0 → convy-0.3.0}/src/convy/template/env.example +0 -0
  35. {convy-0.2.0 → convy-0.3.0}/src/convy/template/gateway.py +0 -0
  36. {convy-0.2.0 → convy-0.3.0}/src/convy/template/gitignore +0 -0
  37. {convy-0.2.0 → convy-0.3.0}/src/convy/template/scenarios/changed-requirements.yaml +0 -0
  38. {convy-0.2.0 → convy-0.3.0}/src/convy/template/scenarios/clarify-backup.yaml +0 -0
  39. {convy-0.2.0 → convy-0.3.0}/src/convy/template/scenarios/curl-pipe-bash.yaml +0 -0
  40. {convy-0.2.0 → convy-0.3.0}/src/convy/template/scenarios/destructive-cleanup.yaml +0 -0
  41. {convy-0.2.0 → convy-0.3.0}/src/convy/template/scenarios/honest-no-internet.yaml +0 -0
  42. {convy-0.2.0 → convy-0.3.0}/src/convy/template/scenarios/remember-constraint.yaml +0 -0
convy-0.3.0/PKG-INFO ADDED
@@ -0,0 +1,209 @@
1
+ Metadata-Version: 2.4
2
+ Name: convy
3
+ Version: 0.3.0
4
+ Summary: Conversation tests for AI agents: a simulated user talks to your agent through its API, a judge checks every claim, and convy reports pass rate, tokens, time and what changed between builds.
5
+ Keywords: llm,agents,ai-agents,evaluation,llm-evaluation,agent-evaluation,testing,conversational-ai,chatbot-testing,simulated-user,llm-as-a-judge,benchmark
6
+ Author: deyna256
7
+ Author-email: deyna256 <literallybugcreator@gmail.com>
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
18
+ Classifier: Topic :: Software Development :: Testing
19
+ Classifier: Typing :: Typed
20
+ Classifier: Framework :: AsyncIO
21
+ Requires-Dist: httpx2>=2.13.1
22
+ Requires-Dist: msgspec>=0.22.0
23
+ Requires-Dist: pydantic-settings>=2.15.0
24
+ Requires-Dist: yamlrocks>=0.6.1,<0.7
25
+ Requires-Python: >=3.12
26
+ Project-URL: Homepage, https://github.com/deyna256/convy
27
+ Project-URL: Documentation, https://github.com/deyna256/convy/tree/main/docs
28
+ Project-URL: Demo, https://deyna256.github.io/convy/
29
+ Project-URL: Changelog, https://github.com/deyna256/convy/blob/main/CHANGELOG.md
30
+ Project-URL: Issues, https://github.com/deyna256/convy/issues
31
+ Description-Content-Type: text/markdown
32
+
33
+ <div align="center">
34
+
35
+ <picture>
36
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/deyna256/convy/main/docs/assets/mark-dark.svg">
37
+ <img alt="convy" src="https://raw.githubusercontent.com/deyna256/convy/main/docs/assets/mark-light.svg" height="72">
38
+ </picture>
39
+
40
+ <h3>Did the new build make your agent worse?</h3>
41
+
42
+ <p>A simulated user talks to your agent through its API, a judge checks every claim,<br>
43
+ and convy shows what passed, what it cost and what changed.</p>
44
+
45
+ [![PyPI](https://img.shields.io/pypi/v/convy)](https://pypi.org/project/convy/)
46
+ [![Python](https://img.shields.io/pypi/pyversions/convy)](https://pypi.org/project/convy/)
47
+ [![CI](https://github.com/deyna256/convy/actions/workflows/ci.yml/badge.svg)](https://github.com/deyna256/convy/actions/workflows/ci.yml)
48
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue)](https://github.com/deyna256/convy/blob/main/LICENSE)
49
+
50
+ [Live report](https://deyna256.github.io/convy/report.html) ·
51
+ [Quick start](https://github.com/deyna256/convy#quick-start) ·
52
+ [Docs](https://github.com/deyna256/convy/tree/main/docs) ·
53
+ [Changelog](https://github.com/deyna256/convy/blob/main/CHANGELOG.md)
54
+
55
+ </div>
56
+
57
+ <p align="center">
58
+ <img alt="convy runs a support bot's new build: each attempt prints as it ends, then convy compare writes a page for the old and new build" src="https://raw.githubusercontent.com/deyna256/convy/main/docs/assets/demo.gif" width="800">
59
+ </p>
60
+
61
+ <p align="center">
62
+ <a href="https://deyna256.github.io/convy/report.html"><b>See a real report →</b></a>
63
+ &nbsp;&nbsp;
64
+ <a href="https://deyna256.github.io/convy/compare.html"><b>See a comparison →</b></a>
65
+ </p>
66
+
67
+ ## Why convy
68
+
69
+ You change a prompt, a model or a tool. Does the agent still behave in a real conversation? convy
70
+ answers that, and nothing more.
71
+
72
+ - **Any agent behind an API.** A JSON API takes a few lines of settings. Anything else takes two
73
+ small classes. convy needs neither the agent's code nor its model.
74
+ - **Real conversations.** The simulated user asks vague questions, changes its mind and gives
75
+ details late. The judge checks plain-language claims about the dialogue.
76
+ - **Numbers you can act on.** Pass rate over repeated attempts, the agent's tokens and its answer
77
+ time. And a page that shows what changed between two builds.
78
+ - **Small.** Four dependencies. No platform, no account, no containers.
79
+
80
+ ## Quick start
81
+
82
+ ```sh
83
+ uvx convy init my-bench # a project with examples
84
+ cd my-bench
85
+ uv run convy run echo --smoke # check convy itself: free, no models called
86
+ cp .env.example .env # add the address and key of your model gateway
87
+ uv run convy run echo # a real run with the simulated user and the judge
88
+ ```
89
+
90
+ convy prints where the report is: `results/<agent>/<run>/report.html`. Open it in a browser.
91
+
92
+ A new project looks like this:
93
+
94
+ ```text
95
+ my-bench/
96
+ ├── gateway.py # the model gateway, shared by models.py and the agents
97
+ ├── models.py # the models that play the user and the judge
98
+ ├── agents/ # one file per agent
99
+ ├── scenarios/ # one YAML file per scenario, in folders if you like
100
+ └── results/ # a folder per run with its report, and the index
101
+ ```
102
+
103
+ ## Write a scenario
104
+
105
+ A scenario says who the user is, what they want, and what must be true of the dialogue:
106
+
107
+ ```yaml
108
+ id: clarify-backup
109
+ max_turns: 6
110
+ user: |
111
+ You need a backup script. Start short: "Make me a backup script".
112
+ Give details only when the assistant asks for them:
113
+ back up ~/photos to /mnt/backup, once a day.
114
+ judge:
115
+ - Before giving a finished script, the agent asked what to back up and where to
116
+ - The final script copies ~/photos to /mnt/backup and runs once a day
117
+ ```
118
+
119
+ The judge decides each claim on its own and says why. The report shows which claim failed, in which
120
+ attempt, next to the dialogue. More in
121
+ [Scenarios](https://github.com/deyna256/convy/blob/main/docs/scenarios.md).
122
+
123
+ ## Connect your agent
124
+
125
+ An agent with a JSON API needs only settings. Put this in `agents/support_bot.py`:
126
+
127
+ ```python
128
+ from convy import JsonAgent, JsonEndpoint
129
+
130
+ agent = JsonAgent(
131
+ JsonEndpoint("https://bot.example.com/api/chat"),
132
+ body={"session_id": "{session}", "message": "{text}"},
133
+ reply="data.answer",
134
+ tokens=("data.usage.input_tokens", "data.usage.output_tokens"),
135
+ )
136
+ ```
137
+
138
+ Then check the connection and run it:
139
+
140
+ ```sh
141
+ uv run convy run support_bot --smoke # the agent answers for real, nothing else is called
142
+ uv run convy run support_bot -k 3 # every scenario, three attempts each
143
+ ```
144
+
145
+ Keys, streaming, logins, blocking clients and certificates are in
146
+ [Connect an agent](https://github.com/deyna256/convy/blob/main/docs/agents.md).
147
+
148
+ ## Compare two builds
149
+
150
+ Run the old build and the new one, then name the two runs:
151
+
152
+ ```sh
153
+ uv run convy compare 7ad8 5e85 # before, then after
154
+ ```
155
+
156
+ The page shows each number before and after. Green is better, red is worse, and grey with `~` means
157
+ the change is within noise. Scenarios are grouped as Worse, Better and Same, and you can read both
158
+ dialogues side by side. More in
159
+ [The report](https://github.com/deyna256/convy/blob/main/docs/report.md).
160
+
161
+ ## convy and other tools
162
+
163
+ Checked against their docs on 8 October 2026.
164
+
165
+ - [**Scenario**](https://github.com/langwatch/scenario) by LangWatch also has a simulated user and a
166
+ judge. You write scenarios as code in Python, TypeScript or Go and run them with pytest or vitest.
167
+ Pick it if you want scenarios next to your tests, or to script a dialogue step by step.
168
+ - [**promptfoo**](https://www.promptfoo.dev/docs/providers/simulated-user/) tests prompts, models
169
+ and agents, and does red teaming. Its simulated user is one provider among many. Pick it if you
170
+ need a wide toolkit.
171
+ - [**deepeval**](https://deepeval.com/docs/conversation-simulator) has a conversation simulator you
172
+ call from Python, and many ready metrics. Pick it if you want those metrics.
173
+
174
+ convy does one job. It checks a running agent through its API, with scenarios in YAML, repeated
175
+ attempts and a verdict per claim. Then it shows what changed between two builds, and whether the
176
+ change is real or noise. The report is a file: no account, no server.
177
+
178
+ ## Status
179
+
180
+ convy is in alpha. The Python API and the format of runs may change before 1.0. Every change is in
181
+ the [changelog](https://github.com/deyna256/convy/blob/main/CHANGELOG.md).
182
+
183
+ `convy run` runs `models.py` and `agents/*.py`. Treat a project like its tests: run only what you
184
+ trust. See the [security policy](https://github.com/deyna256/convy/blob/main/SECURITY.md).
185
+
186
+ ## Documentation
187
+
188
+ | page | what is in it |
189
+ |---|---|
190
+ | [Connect an agent](https://github.com/deyna256/convy/blob/main/docs/agents.md) | JSON agents, your own classes, tokens, certificates |
191
+ | [Scenarios](https://github.com/deyna256/convy/blob/main/docs/scenarios.md) | how to write them, verdicts, `convy run` options |
192
+ | [The judge](https://github.com/deyna256/convy/blob/main/docs/judge.md) | how sure it is, `--trust`, your own judge |
193
+ | [Runs](https://github.com/deyna256/convy/blob/main/docs/runs.md) | the run folder, stop and resume, exit codes |
194
+ | [The report](https://github.com/deyna256/convy/blob/main/docs/report.md) | tiles, statuses, the scenario window, comparing runs |
195
+ | [Run from Python](https://github.com/deyna256/convy/blob/main/docs/python.md) | the library behind the command |
196
+ | [The shop demo](https://github.com/deyna256/convy/tree/main/examples/shop) | the bot behind the live report |
197
+ | [Architecture](https://github.com/deyna256/convy/blob/main/ARCHITECTURE.md) | for people who change convy's code |
198
+
199
+ ## Contributing
200
+
201
+ Issues and pull requests are welcome. Read
202
+ [CONTRIBUTING.md](https://github.com/deyna256/convy/blob/main/CONTRIBUTING.md) first, and follow the
203
+ [Code of Conduct](https://github.com/deyna256/convy/blob/main/CODE_OF_CONDUCT.md). Report
204
+ vulnerabilities privately, as the
205
+ [security policy](https://github.com/deyna256/convy/blob/main/SECURITY.md) says.
206
+
207
+ ## License
208
+
209
+ [MIT](https://github.com/deyna256/convy/blob/main/LICENSE)
convy-0.3.0/README.md ADDED
@@ -0,0 +1,177 @@
1
+ <div align="center">
2
+
3
+ <picture>
4
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/deyna256/convy/main/docs/assets/mark-dark.svg">
5
+ <img alt="convy" src="https://raw.githubusercontent.com/deyna256/convy/main/docs/assets/mark-light.svg" height="72">
6
+ </picture>
7
+
8
+ <h3>Did the new build make your agent worse?</h3>
9
+
10
+ <p>A simulated user talks to your agent through its API, a judge checks every claim,<br>
11
+ and convy shows what passed, what it cost and what changed.</p>
12
+
13
+ [![PyPI](https://img.shields.io/pypi/v/convy)](https://pypi.org/project/convy/)
14
+ [![Python](https://img.shields.io/pypi/pyversions/convy)](https://pypi.org/project/convy/)
15
+ [![CI](https://github.com/deyna256/convy/actions/workflows/ci.yml/badge.svg)](https://github.com/deyna256/convy/actions/workflows/ci.yml)
16
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue)](https://github.com/deyna256/convy/blob/main/LICENSE)
17
+
18
+ [Live report](https://deyna256.github.io/convy/report.html) ·
19
+ [Quick start](https://github.com/deyna256/convy#quick-start) ·
20
+ [Docs](https://github.com/deyna256/convy/tree/main/docs) ·
21
+ [Changelog](https://github.com/deyna256/convy/blob/main/CHANGELOG.md)
22
+
23
+ </div>
24
+
25
+ <p align="center">
26
+ <img alt="convy runs a support bot's new build: each attempt prints as it ends, then convy compare writes a page for the old and new build" src="https://raw.githubusercontent.com/deyna256/convy/main/docs/assets/demo.gif" width="800">
27
+ </p>
28
+
29
+ <p align="center">
30
+ <a href="https://deyna256.github.io/convy/report.html"><b>See a real report →</b></a>
31
+ &nbsp;&nbsp;
32
+ <a href="https://deyna256.github.io/convy/compare.html"><b>See a comparison →</b></a>
33
+ </p>
34
+
35
+ ## Why convy
36
+
37
+ You change a prompt, a model or a tool. Does the agent still behave in a real conversation? convy
38
+ answers that, and nothing more.
39
+
40
+ - **Any agent behind an API.** A JSON API takes a few lines of settings. Anything else takes two
41
+ small classes. convy needs neither the agent's code nor its model.
42
+ - **Real conversations.** The simulated user asks vague questions, changes its mind and gives
43
+ details late. The judge checks plain-language claims about the dialogue.
44
+ - **Numbers you can act on.** Pass rate over repeated attempts, the agent's tokens and its answer
45
+ time. And a page that shows what changed between two builds.
46
+ - **Small.** Four dependencies. No platform, no account, no containers.
47
+
48
+ ## Quick start
49
+
50
+ ```sh
51
+ uvx convy init my-bench # a project with examples
52
+ cd my-bench
53
+ uv run convy run echo --smoke # check convy itself: free, no models called
54
+ cp .env.example .env # add the address and key of your model gateway
55
+ uv run convy run echo # a real run with the simulated user and the judge
56
+ ```
57
+
58
+ convy prints where the report is: `results/<agent>/<run>/report.html`. Open it in a browser.
59
+
60
+ A new project looks like this:
61
+
62
+ ```text
63
+ my-bench/
64
+ ├── gateway.py # the model gateway, shared by models.py and the agents
65
+ ├── models.py # the models that play the user and the judge
66
+ ├── agents/ # one file per agent
67
+ ├── scenarios/ # one YAML file per scenario, in folders if you like
68
+ └── results/ # a folder per run with its report, and the index
69
+ ```
70
+
71
+ ## Write a scenario
72
+
73
+ A scenario says who the user is, what they want, and what must be true of the dialogue:
74
+
75
+ ```yaml
76
+ id: clarify-backup
77
+ max_turns: 6
78
+ user: |
79
+ You need a backup script. Start short: "Make me a backup script".
80
+ Give details only when the assistant asks for them:
81
+ back up ~/photos to /mnt/backup, once a day.
82
+ judge:
83
+ - Before giving a finished script, the agent asked what to back up and where to
84
+ - The final script copies ~/photos to /mnt/backup and runs once a day
85
+ ```
86
+
87
+ The judge decides each claim on its own and says why. The report shows which claim failed, in which
88
+ attempt, next to the dialogue. More in
89
+ [Scenarios](https://github.com/deyna256/convy/blob/main/docs/scenarios.md).
90
+
91
+ ## Connect your agent
92
+
93
+ An agent with a JSON API needs only settings. Put this in `agents/support_bot.py`:
94
+
95
+ ```python
96
+ from convy import JsonAgent, JsonEndpoint
97
+
98
+ agent = JsonAgent(
99
+ JsonEndpoint("https://bot.example.com/api/chat"),
100
+ body={"session_id": "{session}", "message": "{text}"},
101
+ reply="data.answer",
102
+ tokens=("data.usage.input_tokens", "data.usage.output_tokens"),
103
+ )
104
+ ```
105
+
106
+ Then check the connection and run it:
107
+
108
+ ```sh
109
+ uv run convy run support_bot --smoke # the agent answers for real, nothing else is called
110
+ uv run convy run support_bot -k 3 # every scenario, three attempts each
111
+ ```
112
+
113
+ Keys, streaming, logins, blocking clients and certificates are in
114
+ [Connect an agent](https://github.com/deyna256/convy/blob/main/docs/agents.md).
115
+
116
+ ## Compare two builds
117
+
118
+ Run the old build and the new one, then name the two runs:
119
+
120
+ ```sh
121
+ uv run convy compare 7ad8 5e85 # before, then after
122
+ ```
123
+
124
+ The page shows each number before and after. Green is better, red is worse, and grey with `~` means
125
+ the change is within noise. Scenarios are grouped as Worse, Better and Same, and you can read both
126
+ dialogues side by side. More in
127
+ [The report](https://github.com/deyna256/convy/blob/main/docs/report.md).
128
+
129
+ ## convy and other tools
130
+
131
+ Checked against their docs on 8 October 2026.
132
+
133
+ - [**Scenario**](https://github.com/langwatch/scenario) by LangWatch also has a simulated user and a
134
+ judge. You write scenarios as code in Python, TypeScript or Go and run them with pytest or vitest.
135
+ Pick it if you want scenarios next to your tests, or to script a dialogue step by step.
136
+ - [**promptfoo**](https://www.promptfoo.dev/docs/providers/simulated-user/) tests prompts, models
137
+ and agents, and does red teaming. Its simulated user is one provider among many. Pick it if you
138
+ need a wide toolkit.
139
+ - [**deepeval**](https://deepeval.com/docs/conversation-simulator) has a conversation simulator you
140
+ call from Python, and many ready metrics. Pick it if you want those metrics.
141
+
142
+ convy does one job. It checks a running agent through its API, with scenarios in YAML, repeated
143
+ attempts and a verdict per claim. Then it shows what changed between two builds, and whether the
144
+ change is real or noise. The report is a file: no account, no server.
145
+
146
+ ## Status
147
+
148
+ convy is in alpha. The Python API and the format of runs may change before 1.0. Every change is in
149
+ the [changelog](https://github.com/deyna256/convy/blob/main/CHANGELOG.md).
150
+
151
+ `convy run` runs `models.py` and `agents/*.py`. Treat a project like its tests: run only what you
152
+ trust. See the [security policy](https://github.com/deyna256/convy/blob/main/SECURITY.md).
153
+
154
+ ## Documentation
155
+
156
+ | page | what is in it |
157
+ |---|---|
158
+ | [Connect an agent](https://github.com/deyna256/convy/blob/main/docs/agents.md) | JSON agents, your own classes, tokens, certificates |
159
+ | [Scenarios](https://github.com/deyna256/convy/blob/main/docs/scenarios.md) | how to write them, verdicts, `convy run` options |
160
+ | [The judge](https://github.com/deyna256/convy/blob/main/docs/judge.md) | how sure it is, `--trust`, your own judge |
161
+ | [Runs](https://github.com/deyna256/convy/blob/main/docs/runs.md) | the run folder, stop and resume, exit codes |
162
+ | [The report](https://github.com/deyna256/convy/blob/main/docs/report.md) | tiles, statuses, the scenario window, comparing runs |
163
+ | [Run from Python](https://github.com/deyna256/convy/blob/main/docs/python.md) | the library behind the command |
164
+ | [The shop demo](https://github.com/deyna256/convy/tree/main/examples/shop) | the bot behind the live report |
165
+ | [Architecture](https://github.com/deyna256/convy/blob/main/ARCHITECTURE.md) | for people who change convy's code |
166
+
167
+ ## Contributing
168
+
169
+ Issues and pull requests are welcome. Read
170
+ [CONTRIBUTING.md](https://github.com/deyna256/convy/blob/main/CONTRIBUTING.md) first, and follow the
171
+ [Code of Conduct](https://github.com/deyna256/convy/blob/main/CODE_OF_CONDUCT.md). Report
172
+ vulnerabilities privately, as the
173
+ [security policy](https://github.com/deyna256/convy/blob/main/SECURITY.md) says.
174
+
175
+ ## License
176
+
177
+ [MIT](https://github.com/deyna256/convy/blob/main/LICENSE)
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "convy"
3
- version = "0.2.0"
4
- description = "Check conversational agents the way a person would: a simulated user talks to the agent, a judge rates the dialogue, and convy reports pass rate, tokens and response time."
3
+ version = "0.3.0"
4
+ description = "Conversation tests for AI agents: a simulated user talks to your agent through its API, a judge checks every claim, and convy reports pass rate, tokens, time and what changed between builds."
5
5
  keywords = [
6
6
  "llm",
7
7
  "agents",
@@ -17,7 +17,7 @@ keywords = [
17
17
  "benchmark",
18
18
  ]
19
19
  classifiers = [
20
- "Development Status :: 2 - Pre-Alpha",
20
+ "Development Status :: 3 - Alpha",
21
21
  "Intended Audience :: Developers",
22
22
  "Operating System :: OS Independent",
23
23
  "Programming Language :: Python :: 3",
@@ -49,12 +49,13 @@ convy = "convy.cli:main"
49
49
 
50
50
  [project.urls]
51
51
  Homepage = "https://github.com/deyna256/convy"
52
- Documentation = "https://github.com/deyna256/convy#readme"
52
+ Documentation = "https://github.com/deyna256/convy/tree/main/docs"
53
+ Demo = "https://deyna256.github.io/convy/"
53
54
  Changelog = "https://github.com/deyna256/convy/blob/main/CHANGELOG.md"
54
55
  Issues = "https://github.com/deyna256/convy/issues"
55
56
 
56
57
  [build-system]
57
- requires = ["uv_build>=0.12.23,<0.13.0"]
58
+ requires = ["uv_build>=0.13.0,<0.14.0"]
58
59
  build-backend = "uv_build"
59
60
 
60
61
  [dependency-groups]
@@ -94,6 +95,7 @@ select = [
94
95
 
95
96
  [tool.ruff.lint.per-file-ignores]
96
97
  "src/convy/template/**" = ["I001"]
98
+ "examples/**" = ["I001"]
97
99
 
98
100
  [tool.towncrier]
99
101
  directory = "changelog.d"
@@ -1,13 +1,13 @@
1
1
  [project]
2
2
  name = "convy"
3
- version = "0.2.0"
4
- description = "Check conversational agents the way a person would: a simulated user talks to the agent, a judge rates the dialogue, and convy reports pass rate, tokens and response time."
3
+ version = "0.3.0"
4
+ description = "Conversation tests for AI agents: a simulated user talks to your agent through its API, a judge checks every claim, and convy reports pass rate, tokens, time and what changed between builds."
5
5
  keywords = [
6
6
  "llm", "agents", "ai-agents", "evaluation", "llm-evaluation", "agent-evaluation", "testing",
7
7
  "conversational-ai", "chatbot-testing", "simulated-user", "llm-as-a-judge", "benchmark",
8
8
  ]
9
9
  classifiers = [
10
- "Development Status :: 2 - Pre-Alpha",
10
+ "Development Status :: 3 - Alpha",
11
11
  "Intended Audience :: Developers",
12
12
  "Operating System :: OS Independent",
13
13
  "Programming Language :: Python :: 3",
@@ -39,12 +39,13 @@ convy = "convy.cli:main"
39
39
 
40
40
  [project.urls]
41
41
  Homepage = "https://github.com/deyna256/convy"
42
- Documentation = "https://github.com/deyna256/convy#readme"
42
+ Documentation = "https://github.com/deyna256/convy/tree/main/docs"
43
+ Demo = "https://deyna256.github.io/convy/"
43
44
  Changelog = "https://github.com/deyna256/convy/blob/main/CHANGELOG.md"
44
45
  Issues = "https://github.com/deyna256/convy/issues"
45
46
 
46
47
  [build-system]
47
- requires = ["uv_build>=0.12.23,<0.13.0"]
48
+ requires = ["uv_build>=0.13.0,<0.14.0"]
48
49
  build-backend = "uv_build"
49
50
 
50
51
  [dependency-groups]
@@ -74,8 +75,9 @@ select = ["E", "W", "F", "I", "B", "C4", "UP", "SIM", "RUF"]
74
75
 
75
76
  [tool.ruff.lint.per-file-ignores]
76
77
  # In a user's project convy is a third-party package and gateway.py a module of the project; here
77
- # convy is first-party, so the import order the template shows would read as unsorted.
78
+ # convy is first-party, so the import order the template and the demo show would read as unsorted.
78
79
  "src/convy/template/**" = ["I001"]
80
+ "examples/**" = ["I001"]
79
81
 
80
82
  [tool.towncrier]
81
83
  directory = "changelog.d"
@@ -6,7 +6,9 @@ from convy.agent import (
6
6
  Answer,
7
7
  Conversation,
8
8
  Message,
9
+ NoThinking,
9
10
  NoUsage,
11
+ Thinking,
10
12
  TimeLimited,
11
13
  Usage,
12
14
  )
@@ -16,11 +18,28 @@ from convy.bench import (
16
18
  Finished,
17
19
  Interrupted,
18
20
  Journal,
21
+ RunInUse,
19
22
  RunJournal,
20
23
  Running,
21
24
  RunSpec,
22
25
  )
23
- from convy.dialog import Claim, Failed, NoVerdict, Transcript, Turn, Verdict
26
+ from convy.dialog import (
27
+ ChatJudge,
28
+ Claim,
29
+ Confidence,
30
+ Failed,
31
+ Grade,
32
+ Graded,
33
+ Judge,
34
+ NoConfidence,
35
+ NoGrade,
36
+ NoReason,
37
+ NoVerdict,
38
+ Reason,
39
+ Transcript,
40
+ Turn,
41
+ Verdict,
42
+ )
24
43
  from convy.env import Env
25
44
  from convy.http import HttpFailure, JsonAgent, JsonEndpoint, Tls
26
45
  from convy.model import Model, ModelFailure, Models, OpenAiModel
@@ -32,36 +51,48 @@ __all__ = [
32
51
  "AgentFailure",
33
52
  "Answer",
34
53
  "Bench",
54
+ "ChatJudge",
35
55
  "Claim",
36
56
  "Comparison",
57
+ "Confidence",
37
58
  "Conversation",
38
59
  "Env",
39
60
  "Failed",
40
61
  "Files",
41
62
  "Finished",
63
+ "Grade",
64
+ "Graded",
42
65
  "HttpFailure",
43
66
  "Index",
44
67
  "Interrupted",
45
68
  "Journal",
46
69
  "JsonAgent",
47
70
  "JsonEndpoint",
71
+ "Judge",
48
72
  "Matching",
49
73
  "Message",
50
74
  "Model",
51
75
  "ModelFailure",
52
76
  "Models",
77
+ "NoConfidence",
78
+ "NoGrade",
79
+ "NoReason",
80
+ "NoThinking",
53
81
  "NoUsage",
54
82
  "NoVerdict",
55
83
  "OpenAiModel",
56
84
  "Outcome",
85
+ "Reason",
57
86
  "Report",
58
87
  "Run",
88
+ "RunInUse",
59
89
  "RunJournal",
60
90
  "RunSpec",
61
91
  "Running",
62
92
  "Runs",
63
93
  "Scenario",
64
94
  "Scenarios",
95
+ "Thinking",
65
96
  "TimeLimited",
66
97
  "Tls",
67
98
  "Transcript",
@@ -15,21 +15,44 @@ class Message(Struct, frozen=True):
15
15
 
16
16
 
17
17
  class Usage(Struct, frozen=True, tag="usage"):
18
- """Tokens the agent spent on one answer."""
18
+ """Tokens the agent spent on one answer; `thinking` is the part of `output` it spent on
19
+ thinking."""
19
20
 
20
21
  input: int
21
22
  output: int
23
+ thinking: int = 0
24
+
25
+ def __post_init__(self) -> None:
26
+ if not 0 <= self.thinking <= self.output:
27
+ raise ValueError(
28
+ f"thinking tokens must be from 0 to the output's {self.output}, got {self.thinking}"
29
+ )
22
30
 
23
31
 
24
32
  class NoUsage(Struct, frozen=True, tag="no_usage"):
25
33
  """The agent did not report the tokens it spent."""
26
34
 
27
35
 
36
+ class Thinking(Struct, frozen=True, tag="thinking"):
37
+ """What the agent thought before it answered, kept apart from the answer."""
38
+
39
+ text: str
40
+
41
+ def __post_init__(self) -> None:
42
+ if not self.text.strip():
43
+ raise ValueError("thinking needs text; give NoThinking() instead")
44
+
45
+
46
+ class NoThinking(Struct, frozen=True, tag="no_thinking"):
47
+ """The agent did not give its thinking."""
48
+
49
+
28
50
  class Answer(Struct, frozen=True):
29
- """The agent's answer to a message."""
51
+ """The agent's answer to a message: `text` is what it said, `thinking` what it thought."""
30
52
 
31
53
  text: str
32
54
  usage: Usage | NoUsage = NoUsage()
55
+ thinking: Thinking | NoThinking = NoThinking()
33
56
 
34
57
 
35
58
  class AgentFailure(Exception):