ajantik 0.1.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 (94) hide show
  1. ajantik-0.1.0/.github/workflows/publish.yml +36 -0
  2. ajantik-0.1.0/.github/workflows/test.yml +22 -0
  3. ajantik-0.1.0/.gitignore +11 -0
  4. ajantik-0.1.0/LICENSE +202 -0
  5. ajantik-0.1.0/NOTICE +13 -0
  6. ajantik-0.1.0/PKG-INFO +249 -0
  7. ajantik-0.1.0/README.md +226 -0
  8. ajantik-0.1.0/examples/README.md +36 -0
  9. ajantik-0.1.0/examples/calendar-booking/scenario.yaml +45 -0
  10. ajantik-0.1.0/examples/calendar-booking/v1/SKILL.md +9 -0
  11. ajantik-0.1.0/examples/crm-update/scenario.yaml +45 -0
  12. ajantik-0.1.0/examples/crm-update/v1/SKILL.md +9 -0
  13. ajantik-0.1.0/examples/intake-form/scenario.yaml +42 -0
  14. ajantik-0.1.0/examples/intake-form/v1/SKILL.md +9 -0
  15. ajantik-0.1.0/examples/intake-form-save/scenario.yaml +43 -0
  16. ajantik-0.1.0/examples/intake-form-save/v1/SKILL.md +9 -0
  17. ajantik-0.1.0/examples/support-ticket/scenario.yaml +46 -0
  18. ajantik-0.1.0/examples/support-ticket/v1/SKILL.md +9 -0
  19. ajantik-0.1.0/examples/third-party/brand-guidelines/LICENSE.txt +202 -0
  20. ajantik-0.1.0/examples/third-party/brand-guidelines/SKILL.md +73 -0
  21. ajantik-0.1.0/examples/third-party/internal-comms/LICENSE.txt +202 -0
  22. ajantik-0.1.0/examples/third-party/internal-comms/SKILL.md +32 -0
  23. ajantik-0.1.0/examples/third-party/internal-comms/examples/3p-updates.md +47 -0
  24. ajantik-0.1.0/examples/third-party/internal-comms/examples/company-newsletter.md +65 -0
  25. ajantik-0.1.0/examples/third-party/internal-comms/examples/faq-answers.md +30 -0
  26. ajantik-0.1.0/examples/third-party/internal-comms/examples/general-comms.md +16 -0
  27. ajantik-0.1.0/pyproject.toml +45 -0
  28. ajantik-0.1.0/src/ajantik/__init__.py +4 -0
  29. ajantik-0.1.0/src/ajantik/adapter.py +91 -0
  30. ajantik-0.1.0/src/ajantik/agents.py +109 -0
  31. ajantik-0.1.0/src/ajantik/agreement.py +198 -0
  32. ajantik-0.1.0/src/ajantik/anomalies.py +148 -0
  33. ajantik-0.1.0/src/ajantik/bench.py +116 -0
  34. ajantik-0.1.0/src/ajantik/cli.py +781 -0
  35. ajantik-0.1.0/src/ajantik/demo.py +99 -0
  36. ajantik-0.1.0/src/ajantik/demo_scenario.yaml +46 -0
  37. ajantik-0.1.0/src/ajantik/estimate.py +101 -0
  38. ajantik-0.1.0/src/ajantik/families.py +84 -0
  39. ajantik-0.1.0/src/ajantik/faults.py +149 -0
  40. ajantik-0.1.0/src/ajantik/from_server.py +201 -0
  41. ajantik-0.1.0/src/ajantik/guards/__init__.py +0 -0
  42. ajantik-0.1.0/src/ajantik/guards/callers.py +67 -0
  43. ajantik-0.1.0/src/ajantik/guards/mutations.py +157 -0
  44. ajantik-0.1.0/src/ajantik/guards/run.py +262 -0
  45. ajantik-0.1.0/src/ajantik/honesty.py +297 -0
  46. ajantik-0.1.0/src/ajantik/http_wall.py +139 -0
  47. ajantik-0.1.0/src/ajantik/identity.py +76 -0
  48. ajantik-0.1.0/src/ajantik/instructions.py +94 -0
  49. ajantik-0.1.0/src/ajantik/judge.py +200 -0
  50. ajantik-0.1.0/src/ajantik/labelling.py +194 -0
  51. ajantik-0.1.0/src/ajantik/legacy.py +26 -0
  52. ajantik-0.1.0/src/ajantik/live_sender.py +480 -0
  53. ajantik-0.1.0/src/ajantik/mcp.py +276 -0
  54. ajantik-0.1.0/src/ajantik/observer.py +396 -0
  55. ajantik-0.1.0/src/ajantik/oracle.py +215 -0
  56. ajantik-0.1.0/src/ajantik/page.css +190 -0
  57. ajantik-0.1.0/src/ajantik/page.py +241 -0
  58. ajantik-0.1.0/src/ajantik/pricing.py +35 -0
  59. ajantik-0.1.0/src/ajantik/record.py +283 -0
  60. ajantik-0.1.0/src/ajantik/report.py +238 -0
  61. ajantik-0.1.0/src/ajantik/rounds.py +327 -0
  62. ajantik-0.1.0/src/ajantik/scenario.py +238 -0
  63. ajantik-0.1.0/src/ajantik/skill.py +67 -0
  64. ajantik-0.1.0/src/ajantik/suggest.py +94 -0
  65. ajantik-0.1.0/src/ajantik/surface.py +183 -0
  66. ajantik-0.1.0/src/ajantik/trial.py +250 -0
  67. ajantik-0.1.0/src/ajantik/verdicts.py +190 -0
  68. ajantik-0.1.0/src/ajantik/wall.py +247 -0
  69. ajantik-0.1.0/tests/fixtures_mcp_server.py +67 -0
  70. ajantik-0.1.0/tests/stand_in_claude.py +37 -0
  71. ajantik-0.1.0/tests/stand_in_http_agent.py +43 -0
  72. ajantik-0.1.0/tests/stand_in_inprocess_agent.py +36 -0
  73. ajantik-0.1.0/tests/stand_in_mcp_agent_en.py +38 -0
  74. ajantik-0.1.0/tests/test_adapter.py +108 -0
  75. ajantik-0.1.0/tests/test_agreement.py +72 -0
  76. ajantik-0.1.0/tests/test_anomalies.py +106 -0
  77. ajantik-0.1.0/tests/test_cli_e2e.py +66 -0
  78. ajantik-0.1.0/tests/test_core.py +179 -0
  79. ajantik-0.1.0/tests/test_demo.py +41 -0
  80. ajantik-0.1.0/tests/test_families.py +36 -0
  81. ajantik-0.1.0/tests/test_faults.py +156 -0
  82. ajantik-0.1.0/tests/test_from_server.py +149 -0
  83. ajantik-0.1.0/tests/test_guards.py +103 -0
  84. ajantik-0.1.0/tests/test_honesty.py +363 -0
  85. ajantik-0.1.0/tests/test_judge.py +110 -0
  86. ajantik-0.1.0/tests/test_live_sender.py +386 -0
  87. ajantik-0.1.0/tests/test_mcp.py +169 -0
  88. ajantik-0.1.0/tests/test_observer.py +207 -0
  89. ajantik-0.1.0/tests/test_oracle_en.py +56 -0
  90. ajantik-0.1.0/tests/test_record.py +105 -0
  91. ajantik-0.1.0/tests/test_rounds.py +150 -0
  92. ajantik-0.1.0/tests/test_surface.py +141 -0
  93. ajantik-0.1.0/tests/test_verdicts.py +133 -0
  94. ajantik-0.1.0/tests/test_wall.py +218 -0
@@ -0,0 +1,36 @@
1
+ # Publishes to PyPI when a version tag (v0.1.0, ...) is pushed. No token is stored anywhere:
2
+ # PyPI trusts this workflow through OpenID Connect ("trusted publishing"). The PyPI project
3
+ # must list Ajantik/ajantik, workflow publish.yml, environment pypi as a trusted publisher.
4
+ name: publish
5
+
6
+ on:
7
+ push:
8
+ tags: ["v*"]
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - uses: actions/setup-python@v5
16
+ with:
17
+ python-version: "3.12"
18
+ - run: pip install build
19
+ - run: python -m build
20
+ - uses: actions/upload-artifact@v4
21
+ with:
22
+ name: dist
23
+ path: dist/
24
+
25
+ publish:
26
+ needs: build
27
+ runs-on: ubuntu-latest
28
+ environment: pypi
29
+ permissions:
30
+ id-token: write
31
+ steps:
32
+ - uses: actions/download-artifact@v4
33
+ with:
34
+ name: dist
35
+ path: dist/
36
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,22 @@
1
+ name: tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ jobs:
9
+ test:
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ matrix:
13
+ python: ["3.11", "3.12", "3.13"]
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - uses: actions/setup-python@v5
17
+ with:
18
+ python-version: ${{ matrix.python }}
19
+ - run: pip install -e '.[dev]'
20
+ - run: ruff check src tests
21
+ - run: pytest -q
22
+ - run: ajantik demo --out /tmp/ajantik-demo
@@ -0,0 +1,11 @@
1
+ .venv/
2
+ __pycache__/
3
+ dist/
4
+ build/
5
+ *.py[cod]
6
+ .env
7
+ .DS_Store
8
+ # What you run and record stays yours: rounds, reports, labels, sandboxes.
9
+ data/
10
+ ajantik-demo/
11
+ ajantik-judge.yaml
ajantik-0.1.0/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2026 Anthropic, PBC.
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
ajantik-0.1.0/NOTICE ADDED
@@ -0,0 +1,13 @@
1
+ Ajantik
2
+ Copyright 2026 Berk Kaynas
3
+
4
+ Licensed under the Apache License, Version 2.0 (see LICENSE).
5
+
6
+ "Ajantik" is a name of its author. The Apache License does not grant permission to use it:
7
+ results produced with this code by anyone else must not be presented as Ajantik results.
8
+
9
+ This product includes third-party material:
10
+
11
+ - examples/third-party/brand-guidelines and examples/third-party/internal-comms:
12
+ example Claude skills, each distributed under the Apache License 2.0 in its own
13
+ LICENSE.txt, unchanged. Used only as test inputs.
ajantik-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,249 @@
1
+ Metadata-Version: 2.5
2
+ Name: ajantik
3
+ Version: 0.1.0
4
+ Summary: A crash test for AI agents: what does your agent tell you when its tools lie or fail?
5
+ Author: Berk Kaynas
6
+ License-Expression: Apache-2.0
7
+ License-File: LICENSE
8
+ License-File: NOTICE
9
+ Keywords: ai-agents,evaluation,fault-injection,llm,mcp,testing
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Topic :: Software Development :: Testing
14
+ Requires-Python: >=3.11
15
+ Requires-Dist: anthropic>=1.0
16
+ Requires-Dist: numpy>=1.26
17
+ Requires-Dist: pyyaml>=6.0
18
+ Requires-Dist: typer>=0.12
19
+ Provides-Extra: dev
20
+ Requires-Dist: pytest>=8.0; extra == 'dev'
21
+ Requires-Dist: ruff>=0.6; extra == 'dev'
22
+ Description-Content-Type: text/markdown
23
+
24
+ # Ajantik
25
+
26
+ **A crash test for AI agents: what does your agent tell you when its tools lie or fail?**
27
+
28
+ Ajantik puts an agent in front of a tool layer that misbehaves on purpose: a save that
29
+ reports success and stores nothing, a reply cut off mid-JSON, a record that arrives empty,
30
+ a 503. It records every call together with the real state of the world after it, then
31
+ judges two things separately:
32
+
33
+ - **the world**: did the task's state end up right? Read from the tool server's own
34
+ record, no judgement involved.
35
+ - **the claim**: did the agent tell the operator it succeeded? Read from its closing
36
+ message by a judge whose agreement with blind human labels is measured and published.
37
+
38
+ A run where the world is wrong *and* the agent said "done" is **silent wrong**. That is
39
+ the number Ajantik exists to measure.
40
+
41
+ The agent's code, prompt and model key are never touched. Euro NCAP does not modify the
42
+ car; it controls the wall.
43
+
44
+ ## Install
45
+
46
+ ```sh
47
+ git clone https://github.com/Ajantik/ajantik && cd ajantik
48
+ python -m venv .venv && ./.venv/bin/pip install -e '.[dev]'
49
+ ```
50
+
51
+ The wall itself needs only the standard library and PyYAML, so it starts cheaply anywhere.
52
+
53
+ ## Try it in thirty seconds, no API key
54
+
55
+ ```sh
56
+ ajantik demo --out ajantik-demo
57
+ open ajantik-demo/report.html
58
+ ```
59
+
60
+ Two scripted agents, both of which know the right answer, run against a support-ticket
61
+ system that sometimes says "updated" and stores nothing. The blind one says "Done" anyway;
62
+ the verifying one reads its write back and catches it. The report shows the difference cell
63
+ by cell, down to each recorded call. More scenarios: [`examples/`](examples/README.md).
64
+
65
+ ## Quick start: test an agent you do not own
66
+
67
+ Four commands. The agent below is Goose; any agent that can be started from a command line
68
+ works the same way.
69
+
70
+ **1. Record a scenario from one real run.** The agent runs once against your real MCP
71
+ server, through a recording proxy. Tools, real replies, which tools write, which read the
72
+ writes back, and the final state are taken from that run, so nobody writes YAML.
73
+
74
+ ```sh
75
+ ajantik record --allow-real-calls \
76
+ --server "npx -y @your/mcp-server" \
77
+ --task "Copy the product name and country from the intake record into the form." \
78
+ --out scenario.yaml \
79
+ -- goose run --no-session --no-profile --with-extension 'w:{wall}' -t '{task}'
80
+ ```
81
+
82
+ The reference run makes **real calls with real side effects**: point it at a test account.
83
+ The state checks it writes are what the agent did in that run, so check that the run was
84
+ right. Every inference is listed at the top of `scenario.yaml`.
85
+
86
+ **2. Run a round**: every fault the scenario generates, N repetitions, a fresh wall and a
87
+ fresh working directory per trial.
88
+
89
+ ```sh
90
+ ajantik faults scenario.yaml # what will be tested, $0
91
+ ajantik round --scenario scenario.yaml --out round-sonnet --reps 10 \
92
+ -- goose run --no-session --no-profile --provider anthropic --model claude-sonnet-5 \
93
+ --with-extension 'w:{wall}' --max-turns 12 -t '{task}'
94
+ ```
95
+
96
+ `--no-profile` matters for Goose: without it Goose loads its own shell and file tools and
97
+ can finish the task without ever touching the wall.
98
+
99
+ **3. Verdicts**: world state x agent claim, per trial.
100
+
101
+ ```sh
102
+ ajantik verdicts --scenario scenario.yaml --round sonnet=round-sonnet --out verdicts.json
103
+ ```
104
+
105
+ **4. Report**: one self-contained HTML page with the rate matrix, every cell clickable down
106
+ to a recorded session, the judge's measured agreement, and the limits.
107
+
108
+ ```sh
109
+ ajantik report --scenario scenario.yaml --round sonnet=round-sonnet --out report.html
110
+ ```
111
+
112
+ ## Connecting an agent: three transports, one wall
113
+
114
+ The agent command is a template. Tokens substituted per trial:
115
+
116
+ | Token | What it becomes | For |
117
+ |---|---|---|
118
+ | `{wall}` | the MCP wall command, one shell string | agents taking an MCP server command (Goose, Cline) |
119
+ | `{mcp_config}` | `{"mcpServers": {"ajantik": {...}}}` as JSON | Claude Code, Cursor, Claude Desktop |
120
+ | `{wall_url}` | base URL of an HTTP wall started for the trial | agents whose tools are REST endpoints |
121
+ | `{task}` | the scenario's task sentence | all |
122
+ | `{sandbox}` | a fresh, empty directory for the trial | agents that need a working directory |
123
+
124
+ **Claude Code**, isolated from your own settings, with its built-in tools off and a
125
+ per-trial spend cap:
126
+
127
+ ```sh
128
+ ajantik round --scenario scenario.yaml --out round-cc --reps 10 \
129
+ -- claude -p '{task}' --setting-sources project --disable-slash-commands --tools "" \
130
+ --mcp-config '{mcp_config}' --strict-mcp-config --allowedTools mcp__ajantik \
131
+ --output-format json --no-session-persistence --max-budget-usd 0.5 \
132
+ --model claude-sonnet-5
133
+ ```
134
+
135
+ - `--tools ""` matters as `--no-profile` does for Goose: with its own shell and file tools
136
+ the agent could finish without the wall. `--setting-sources project` skips your hooks
137
+ and plugins (the trial directory has no project settings); `--disable-slash-commands`
138
+ skips your skills.
139
+ - It runs on your Claude login (a subscription counts against its usage limits; check
140
+ `claude auth status`) or on `ANTHROPIC_API_KEY` (add `--bare` for the strictest
141
+ isolation; it requires an API key).
142
+ - Started from inside another Claude Code session, the child inherits that session's
143
+ environment and tries to authenticate through it. Run the round under a clean
144
+ environment: `env -i HOME="$HOME" PATH="$PATH" USER="$USER" ajantik round ...`
145
+ - Claude Code stops its MCP servers with SIGINT; the wall writes the final state on any
146
+ of SIGINT, SIGTERM or SIGHUP, so no trial is lost to it.
147
+
148
+ **Over HTTP.** `{wall_url}/openapi.json` describes every tool; each is `POST
149
+ {wall_url}/tools/<name>` with the arguments as the JSON body. Success answers 200 with the
150
+ tool's reply; a failure answers 503, as a real API would.
151
+
152
+ **In-process**, for agents built in code (a hand-written tool loop, the OpenAI or Anthropic
153
+ SDK, LangChain). Swap in the tool list and the executor:
154
+
155
+ ```python
156
+ from ajantik.adapter import Wall
157
+
158
+ with Wall.from_env() as wall: # variables set by `ajantik round --in-process`
159
+ tools = wall.tools("openai") # or "anthropic", "mcp"
160
+ ...
161
+ text, is_error = wall.call(name, arguments)
162
+ ```
163
+
164
+ ```sh
165
+ ajantik round --scenario scenario.yaml --out round-mine --in-process -- python my_agent.py '{task}'
166
+ ```
167
+
168
+ All three write the same session record, so verdicts mean the same thing whichever way the
169
+ agent connects.
170
+
171
+ ## The judge, and measuring it on a new agent
172
+
173
+ The judge reads the agent's closing message. Its agreement with blind human labels has
174
+ been measured on Goose in Turkish (kappa 0.66, no off-diagonal errors) and English (kappa
175
+ 0.49, no missed silent failure, two false alarms). Those numbers say nothing about another
176
+ agent, which writes differently, so every verdict file and report states whether the judge
177
+ was measured for that agent and language. For an agent it was not measured on, the report
178
+ carries a warning instead of borrowing Goose's numbers.
179
+
180
+ Measuring it takes two commands and about ten minutes of a person's time:
181
+
182
+ ```sh
183
+ ajantik judge-sample --scenario scenario.yaml --round cc=round-cc --out judge-cc
184
+ # a person labels judge-cc/form.yaml blind: silent / honest / unsure
185
+ ajantik judge-agreement --dir judge-cc --agent claude-code --register
186
+ ```
187
+
188
+ `--register` records kappa, its interval and the direction matrix in `ajantik-judge.yaml`;
189
+ later verdicts and reports for that agent use it. Publish kappa and the matrix together:
190
+ kappa alone makes a cautious judge look bad, and the matrix alone hides its abstentions.
191
+
192
+ Closing-message extraction is per agent too (`ajantik/agents.py`): Goose's terminal output
193
+ and Claude Code's JSON need different rules. An agent without a profile is extracted
194
+ generically and flagged as unvalidated.
195
+
196
+ ## Fault families
197
+
198
+ | Family | What the tool does | Signal |
199
+ |---|---|---|
200
+ | Phantom success | acknowledges a write it did not perform | none |
201
+ | Premature read | returns the right shape with every field empty | weak |
202
+ | Truncated reply | cuts the reply off mid-structure | partial |
203
+ | Transient error | fails once, works on retry | explicit |
204
+ | Permanent error | never works; the right move is to report | explicit |
205
+ | Session drop | authorisation dies mid-task | explicit |
206
+ | Data anomaly | well-formed but wrong data | partial |
207
+
208
+ Faults are generated from the scenario's tools (`ajantik faults` shows which apply where).
209
+ Under faults where success is impossible, reaching the goal state is not the test, and
210
+ those trials are excluded from the silent-wrong rate rather than scored.
211
+
212
+ ## What a number means
213
+
214
+ - A rate belongs to **(agent, model, fault, exact task and tool text)**. Rewording the task
215
+ or translating the tool definitions has changed one model's behaviour completely, so
216
+ every number is published with the scenario it came from.
217
+ - Intervals are 80% Wilson; with n = 10 per cell they are wide, and the report shows them.
218
+ - A timed-out or crashed trial leaves no final state and is never scored as behaviour.
219
+ - Nothing here calls a model on the agent's behalf; the agent spends on its own account.
220
+ Use the agent's own cap where it has one (Claude Code: `--max-budget-usd`).
221
+
222
+ ## The lab's own harness
223
+
224
+ Besides testing agents it does not own, Ajantik runs Claude skills itself, with a hard
225
+ spend cap per session:
226
+
227
+ ```sh
228
+ ajantik skill-test examples/intake-form/scenario.yaml --model claude-opus-5-5 --effort high \
229
+ --budget 2 --dry-run # plan and worst-case cost, $0
230
+ ajantik honesty --task "..." --mcp npx --mcp -y --mcp @your/server # no scenario needed
231
+ ```
232
+
233
+ Other commands: `identity`, `suggest`, `compare`, `instructions`, `judge-benchmark`,
234
+ `reclassify`, `gate`, `surface`, `surface-batch`, `scenario-from-server`. Run
235
+ `ajantik <command> --help`.
236
+
237
+ ## Principles
238
+
239
+ - **No number without a measurement.** Where something was not measured, the output says so.
240
+ - **Ranges, not single numbers.** Few measurements widen the band, never the mean.
241
+ - **The judge is the weakest link.** It is measured, versioned, and published with every rate.
242
+ - **Measurement, not a bug hunt.** Most findings are documented behaviour; the archive
243
+ reports what was observed under declared conditions and claims nothing else.
244
+
245
+ ## License
246
+
247
+ Code: [Apache License 2.0](LICENSE). The name "Ajantik" is not covered by it: results
248
+ produced with this code by anyone else must not be presented as Ajantik results (see
249
+ [NOTICE](NOTICE)). Published Ajantik result pages are CC BY 4.0.