evalkit-py 0.2.0.dev12__py3-none-any.whl

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 (371) hide show
  1. evalkit/__init__.py +0 -0
  2. evalkit/api/__init__.py +0 -0
  3. evalkit/api/access.py +74 -0
  4. evalkit/api/agents.py +159 -0
  5. evalkit/api/app.py +360 -0
  6. evalkit/api/auth.py +225 -0
  7. evalkit/api/cli_dist.py +10 -0
  8. evalkit/api/datasets.py +169 -0
  9. evalkit/api/deps.py +79 -0
  10. evalkit/api/download.py +15 -0
  11. evalkit/api/evaluators.py +121 -0
  12. evalkit/api/experiments.py +616 -0
  13. evalkit/api/fixtures.py +95 -0
  14. evalkit/api/harness_check.py +48 -0
  15. evalkit/api/imports.py +180 -0
  16. evalkit/api/limits.py +84 -0
  17. evalkit/api/llm_providers.py +120 -0
  18. evalkit/api/mcp/__init__.py +0 -0
  19. evalkit/api/mcp/auth.py +100 -0
  20. evalkit/api/mcp/descriptions.py +336 -0
  21. evalkit/api/mcp/models.py +259 -0
  22. evalkit/api/mcp/server.py +101 -0
  23. evalkit/api/mcp/tools.py +844 -0
  24. evalkit/api/meta.py +19 -0
  25. evalkit/api/otel.py +350 -0
  26. evalkit/api/pull.py +197 -0
  27. evalkit/api/review.py +271 -0
  28. evalkit/api/runs.py +555 -0
  29. evalkit/api/server_keys.py +44 -0
  30. evalkit/api/tokens.py +51 -0
  31. evalkit/api/trace_imports.py +173 -0
  32. evalkit/api/trace_sources.py +49 -0
  33. evalkit/api/traces.py +196 -0
  34. evalkit/api/users.py +72 -0
  35. evalkit/api/workspaces.py +131 -0
  36. evalkit/bundled/contracts/atif-accepted.json +5 -0
  37. evalkit/bundled/contracts/custom-evaluator-api-v1.json +243 -0
  38. evalkit/bundled/contracts/harness-api-v1.json +938 -0
  39. evalkit/bundled/contracts/span-mapping-v1.json +314 -0
  40. evalkit/bundled/docs/concepts.md +26 -0
  41. evalkit/bundled/docs/config.md +38 -0
  42. evalkit/bundled/docs/harness-api.md +44 -0
  43. evalkit/bundled/docs/install.md +60 -0
  44. evalkit/bundled/docs/login.md +36 -0
  45. evalkit/bundled/docs/mappings.md +136 -0
  46. evalkit/bundled/docs/mcp.md +44 -0
  47. evalkit/bundled/docs/quickstart.md +142 -0
  48. evalkit/bundled/docs/sdk-runs.md +171 -0
  49. evalkit/bundled/docs/tracing.md +171 -0
  50. evalkit/bundled/docs/try-locally.md +288 -0
  51. evalkit/bundled/docs/workspaces.md +45 -0
  52. evalkit/bundled/skills/authoring-eval-cases/SKILL.md +387 -0
  53. evalkit/bundled/skills/authoring-eval-cases/references/overlays.md +83 -0
  54. evalkit/bundled/skills/authoring-eval-cases/references/tool-checks.md +71 -0
  55. evalkit/bundled/skills/connect-traces/SKILL.md +296 -0
  56. evalkit/bundled/skills/connect-traces/references/gen_ai.json +42 -0
  57. evalkit/bundled/skills/connect-traces/references/openinference.json +35 -0
  58. evalkit/bundled/skills/connect-traces/references/span-mapping-schema.md +88 -0
  59. evalkit/bundled/skills/eval-driven-development/SKILL.md +458 -0
  60. evalkit/bundled/skills/eval-driven-development/references/analyze-run.md +97 -0
  61. evalkit/bundled/skills/eval-driven-development/references/diagnose.md +130 -0
  62. evalkit/bundled/skills/eval-driven-development/references/synthesize-cases.md +87 -0
  63. evalkit/bundled/skills/eval-driven-development/references/synthesize.md +165 -0
  64. evalkit/bundled/skills/evalkit-deployment/SKILL.md +332 -0
  65. evalkit/bundled/skills/evalkit-deployment/config.example.yaml +49 -0
  66. evalkit/bundled/skills/evalkit-deployment/docker-compose.yml +51 -0
  67. evalkit/bundled/skills/evalkit-deployment/references/config-and-deploy.md +333 -0
  68. evalkit/bundled/skills/evalkit-deployment/references/harness-api.md +139 -0
  69. evalkit/bundled/skills/evalkit-deployment/try/.env.example +11 -0
  70. evalkit/bundled/skills/evalkit-deployment/try/agent.py +131 -0
  71. evalkit/bundled/skills/evalkit-deployment/try/cases/acme/balance-sheet/cases.yaml +25 -0
  72. evalkit/bundled/skills/evalkit-deployment/try/cases/acme/income-statement/cases.yaml +43 -0
  73. evalkit/bundled/skills/evalkit-deployment/try/config.yaml +17 -0
  74. evalkit/bundled/skills/evalkit-deployment/try/docker-compose.yml +82 -0
  75. evalkit/bundled/skills/evalkit-deployment/try/evalkit.yaml +4 -0
  76. evalkit/bundled/skills/evalkit-deployment/try/mapping.json +42 -0
  77. evalkit/bundled/skills/evalkit-deployment/try/run.py +33 -0
  78. evalkit/bundled/skills/evalkit-usage/SKILL.md +509 -0
  79. evalkit/bundled/skills/evalkit-usage/references/suite-fixtures.md +42 -0
  80. evalkit/bundled/ui/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  81. evalkit/bundled/ui/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  82. evalkit/bundled/ui/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  83. evalkit/bundled/ui/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  84. evalkit/bundled/ui/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  85. evalkit/bundled/ui/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  86. evalkit/bundled/ui/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  87. evalkit/bundled/ui/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  88. evalkit/bundled/ui/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  89. evalkit/bundled/ui/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  90. evalkit/bundled/ui/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  91. evalkit/bundled/ui/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  92. evalkit/bundled/ui/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  93. evalkit/bundled/ui/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  94. evalkit/bundled/ui/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  95. evalkit/bundled/ui/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  96. evalkit/bundled/ui/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  97. evalkit/bundled/ui/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  98. evalkit/bundled/ui/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  99. evalkit/bundled/ui/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  100. evalkit/bundled/ui/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  101. evalkit/bundled/ui/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  102. evalkit/bundled/ui/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  103. evalkit/bundled/ui/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  104. evalkit/bundled/ui/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  105. evalkit/bundled/ui/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  106. evalkit/bundled/ui/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  107. evalkit/bundled/ui/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  108. evalkit/bundled/ui/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  109. evalkit/bundled/ui/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  110. evalkit/bundled/ui/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  111. evalkit/bundled/ui/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  112. evalkit/bundled/ui/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  113. evalkit/bundled/ui/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  114. evalkit/bundled/ui/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  115. evalkit/bundled/ui/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  116. evalkit/bundled/ui/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  117. evalkit/bundled/ui/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  118. evalkit/bundled/ui/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  119. evalkit/bundled/ui/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  120. evalkit/bundled/ui/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  121. evalkit/bundled/ui/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  122. evalkit/bundled/ui/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  123. evalkit/bundled/ui/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  124. evalkit/bundled/ui/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  125. evalkit/bundled/ui/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  126. evalkit/bundled/ui/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  127. evalkit/bundled/ui/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  128. evalkit/bundled/ui/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  129. evalkit/bundled/ui/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  130. evalkit/bundled/ui/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  131. evalkit/bundled/ui/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  132. evalkit/bundled/ui/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  133. evalkit/bundled/ui/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  134. evalkit/bundled/ui/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  135. evalkit/bundled/ui/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  136. evalkit/bundled/ui/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  137. evalkit/bundled/ui/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  138. evalkit/bundled/ui/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  139. evalkit/bundled/ui/assets/abap-08VXUWAP.js +1 -0
  140. evalkit/bundled/ui/assets/apex-BWPQTe0t.js +1 -0
  141. evalkit/bundled/ui/assets/azcli-Bc_sGQ0U.js +1 -0
  142. evalkit/bundled/ui/assets/bat-i0X4ZdIN.js +1 -0
  143. evalkit/bundled/ui/assets/bicep-B5-_aFwp.js +2 -0
  144. evalkit/bundled/ui/assets/cameligo-DMUM7wLl.js +1 -0
  145. evalkit/bundled/ui/assets/clojure-Cm7r79vr.js +1 -0
  146. evalkit/bundled/ui/assets/codicon-DF1abBS2.ttf +0 -0
  147. evalkit/bundled/ui/assets/coffee-Ba7i2nA0.js +1 -0
  148. evalkit/bundled/ui/assets/cpp-C7h46wYY.js +1 -0
  149. evalkit/bundled/ui/assets/csharp-BKxtCVv1.js +1 -0
  150. evalkit/bundled/ui/assets/csp-bTuwJoIa.js +1 -0
  151. evalkit/bundled/ui/assets/css-DIMkf-bt.js +3 -0
  152. evalkit/bundled/ui/assets/css.worker-DwfUZ3fB.js +96 -0
  153. evalkit/bundled/ui/assets/cssMode-C97l1pbB.js +1 -0
  154. evalkit/bundled/ui/assets/cypher-CVaqCwHa.js +1 -0
  155. evalkit/bundled/ui/assets/dart-onAF5SnQ.js +1 -0
  156. evalkit/bundled/ui/assets/dockerfile-DZFCIeNp.js +1 -0
  157. evalkit/bundled/ui/assets/ecl-94qehhXe.js +1 -0
  158. evalkit/bundled/ui/assets/editor-DjpsE8to.css +1 -0
  159. evalkit/bundled/ui/assets/editor.api-NTesIxw5.js +908 -0
  160. evalkit/bundled/ui/assets/editor.worker-CRz__AKW.js +33 -0
  161. evalkit/bundled/ui/assets/elixir-6RTg0lbw.js +1 -0
  162. evalkit/bundled/ui/assets/flow9-C5_-GSwl.js +1 -0
  163. evalkit/bundled/ui/assets/freemarker2-BWqEFagp.js +3 -0
  164. evalkit/bundled/ui/assets/fsharp-C8Ef5oNN.js +1 -0
  165. evalkit/bundled/ui/assets/go-C-y9NEjX.js +1 -0
  166. evalkit/bundled/ui/assets/graphql-fmXr3nnJ.js +1 -0
  167. evalkit/bundled/ui/assets/handlebars-DkIF-whN.js +1 -0
  168. evalkit/bundled/ui/assets/hcl-CpzslTdj.js +1 -0
  169. evalkit/bundled/ui/assets/html-C_rpeQXJ.js +1 -0
  170. evalkit/bundled/ui/assets/html.worker-D9ugpX4y.js +509 -0
  171. evalkit/bundled/ui/assets/htmlMode-B0YIq3DF.js +1 -0
  172. evalkit/bundled/ui/assets/index-Cw-jBH6M.js +736 -0
  173. evalkit/bundled/ui/assets/index-DKtoQZtm.css +1 -0
  174. evalkit/bundled/ui/assets/ini-sBoK_t0W.js +1 -0
  175. evalkit/bundled/ui/assets/java-BEtHBSE6.js +1 -0
  176. evalkit/bundled/ui/assets/javascript-D4EGhYA6.js +1 -0
  177. evalkit/bundled/ui/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
  178. evalkit/bundled/ui/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
  179. evalkit/bundled/ui/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
  180. evalkit/bundled/ui/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
  181. evalkit/bundled/ui/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
  182. evalkit/bundled/ui/assets/json.worker-CV9fqkUp.js +65 -0
  183. evalkit/bundled/ui/assets/jsonMode-pQjSfIH6.js +7 -0
  184. evalkit/bundled/ui/assets/julia-Bri6UV-V.js +1 -0
  185. evalkit/bundled/ui/assets/kotlin-BOotOW0E.js +1 -0
  186. evalkit/bundled/ui/assets/less-B9JPFI3C.js +2 -0
  187. evalkit/bundled/ui/assets/lexon-CfSJPG6W.js +1 -0
  188. evalkit/bundled/ui/assets/liquid-DbrvoYjD.js +1 -0
  189. evalkit/bundled/ui/assets/lspLanguageFeatures-D0B7cH6y.js +4 -0
  190. evalkit/bundled/ui/assets/lua-CsQS60Ue.js +1 -0
  191. evalkit/bundled/ui/assets/m3-D-oSqn_W.js +1 -0
  192. evalkit/bundled/ui/assets/markdown-Cimd5fb3.js +1 -0
  193. evalkit/bundled/ui/assets/mdx-B0HrujLR.js +1 -0
  194. evalkit/bundled/ui/assets/mips-CIPQ_RoX.js +1 -0
  195. evalkit/bundled/ui/assets/monacoEditor-DsoPncxW.js +68 -0
  196. evalkit/bundled/ui/assets/monacoEditor-n7clI0si.css +1 -0
  197. evalkit/bundled/ui/assets/msdax-DauUninz.js +1 -0
  198. evalkit/bundled/ui/assets/mysql-SOo6toE5.js +1 -0
  199. evalkit/bundled/ui/assets/objective-c-FvmIjYaQ.js +1 -0
  200. evalkit/bundled/ui/assets/pascal-DrH0SRf2.js +1 -0
  201. evalkit/bundled/ui/assets/pascaligo-D-ptJ9y-.js +1 -0
  202. evalkit/bundled/ui/assets/perl-oz_6vUea.js +1 -0
  203. evalkit/bundled/ui/assets/pgsql-DTj74zXo.js +1 -0
  204. evalkit/bundled/ui/assets/php-nr791fC2.js +1 -0
  205. evalkit/bundled/ui/assets/pla-CopQ2nXW.js +1 -0
  206. evalkit/bundled/ui/assets/postiats-43DmfD33.js +1 -0
  207. evalkit/bundled/ui/assets/powerquery-D3hlyOfw.js +1 -0
  208. evalkit/bundled/ui/assets/powershell-DmHpPYUd.js +1 -0
  209. evalkit/bundled/ui/assets/protobuf-C531GsRP.js +2 -0
  210. evalkit/bundled/ui/assets/pug-Z5eAx3Zn.js +1 -0
  211. evalkit/bundled/ui/assets/python-CieHVM9n.js +1 -0
  212. evalkit/bundled/ui/assets/qsharp-DkqhCAOL.js +1 -0
  213. evalkit/bundled/ui/assets/r-BwWrilGY.js +1 -0
  214. evalkit/bundled/ui/assets/razor-sLewSMyp.js +1 -0
  215. evalkit/bundled/ui/assets/redis-ClamHrr6.js +1 -0
  216. evalkit/bundled/ui/assets/redshift-DT7zqm-g.js +1 -0
  217. evalkit/bundled/ui/assets/restructuredtext-BYgofb2h.js +1 -0
  218. evalkit/bundled/ui/assets/ruby-DezsRK8O.js +1 -0
  219. evalkit/bundled/ui/assets/rust-DdL9SqIa.js +1 -0
  220. evalkit/bundled/ui/assets/sb-CcwsVR0C.js +1 -0
  221. evalkit/bundled/ui/assets/scala-DHpiXF5c.js +1 -0
  222. evalkit/bundled/ui/assets/scheme-BeGwcela.js +1 -0
  223. evalkit/bundled/ui/assets/scss-gp-XZpBa.js +3 -0
  224. evalkit/bundled/ui/assets/shell-CC2rA5mh.js +1 -0
  225. evalkit/bundled/ui/assets/solidity-BEEn4gHE.js +1 -0
  226. evalkit/bundled/ui/assets/sophia-CRfGWb83.js +1 -0
  227. evalkit/bundled/ui/assets/sparql-D_Lu-MrJ.js +1 -0
  228. evalkit/bundled/ui/assets/sql-NEE52Syq.js +1 -0
  229. evalkit/bundled/ui/assets/st-DbInun42.js +1 -0
  230. evalkit/bundled/ui/assets/swift-Bxkupp3x.js +1 -0
  231. evalkit/bundled/ui/assets/systemverilog-Bz4Y3fRF.js +1 -0
  232. evalkit/bundled/ui/assets/tcl-DISqw1ZD.js +1 -0
  233. evalkit/bundled/ui/assets/ts.worker-DIAQkoB3.js +67741 -0
  234. evalkit/bundled/ui/assets/tsMode-BcVQ1nu0.js +11 -0
  235. evalkit/bundled/ui/assets/twig-De2hgUGE.js +1 -0
  236. evalkit/bundled/ui/assets/typescript-CUvNWd9p.js +1 -0
  237. evalkit/bundled/ui/assets/typespec-B8J7ngcE.js +1 -0
  238. evalkit/bundled/ui/assets/vb-DV3o63ZY.js +1 -0
  239. evalkit/bundled/ui/assets/wgsl-DpFanUEy.js +298 -0
  240. evalkit/bundled/ui/assets/workers-CwpYQtzp.js +1 -0
  241. evalkit/bundled/ui/assets/xml-C1HnXMdF.js +1 -0
  242. evalkit/bundled/ui/assets/yaml-D7Ey3HQu.js +1 -0
  243. evalkit/bundled/ui/favicon.svg +6 -0
  244. evalkit/bundled/ui/index.html +14 -0
  245. evalkit/cli/__init__.py +0 -0
  246. evalkit/cli/admin_commands.py +590 -0
  247. evalkit/cli/client.py +67 -0
  248. evalkit/cli/init_server.py +165 -0
  249. evalkit/cli/local_run.py +195 -0
  250. evalkit/cli/main.py +1365 -0
  251. evalkit/cli/runs_commands.py +539 -0
  252. evalkit/cli/server_commands.py +130 -0
  253. evalkit/cli/skill_targets.py +43 -0
  254. evalkit/cli/tokens_commands.py +52 -0
  255. evalkit/cli/traces_commands.py +332 -0
  256. evalkit/cli/update.py +85 -0
  257. evalkit/client/__init__.py +0 -0
  258. evalkit/client/agents.py +25 -0
  259. evalkit/client/api.py +193 -0
  260. evalkit/client/blob.py +104 -0
  261. evalkit/client/connection.py +88 -0
  262. evalkit/client/evaluators.py +11 -0
  263. evalkit/client/sessions.py +17 -0
  264. evalkit/client/store.py +139 -0
  265. evalkit/client/summary.py +46 -0
  266. evalkit/client/sync.py +198 -0
  267. evalkit/config.py +227 -0
  268. evalkit/contracts/__init__.py +0 -0
  269. evalkit/contracts/atif.py +115 -0
  270. evalkit/contracts/cases.py +456 -0
  271. evalkit/contracts/custom_evaluator.py +58 -0
  272. evalkit/contracts/enums.py +86 -0
  273. evalkit/contracts/esf.py +120 -0
  274. evalkit/contracts/harness.py +281 -0
  275. evalkit/contracts/notes.json +4 -0
  276. evalkit/contracts/notes.py +7 -0
  277. evalkit/contracts/settings.py +41 -0
  278. evalkit/core/__init__.py +0 -0
  279. evalkit/core/access.py +75 -0
  280. evalkit/core/agents.py +65 -0
  281. evalkit/core/blob.py +46 -0
  282. evalkit/core/capabilities.py +36 -0
  283. evalkit/core/costmap.py +90 -0
  284. evalkit/core/custom_eval.py +50 -0
  285. evalkit/core/data/cost_map.json +81546 -0
  286. evalkit/core/endpoints.py +31 -0
  287. evalkit/core/evaluators/__init__.py +29 -0
  288. evalkit/core/evaluators/base.py +121 -0
  289. evalkit/core/evaluators/gauges.py +84 -0
  290. evalkit/core/evaluators/presentation.py +166 -0
  291. evalkit/core/evaluators/response_time.py +21 -0
  292. evalkit/core/evaluators/rubrics.py +494 -0
  293. evalkit/core/evaluators/tool_trajectory.py +187 -0
  294. evalkit/core/evaluators/trajectory_rubrics.py +198 -0
  295. evalkit/core/fixtures.py +57 -0
  296. evalkit/core/harness.py +227 -0
  297. evalkit/core/harness_check.py +191 -0
  298. evalkit/core/importer.py +257 -0
  299. evalkit/core/judge.py +78 -0
  300. evalkit/core/lint.py +265 -0
  301. evalkit/core/overlays.py +76 -0
  302. evalkit/core/paths.py +25 -0
  303. evalkit/core/promotion.py +94 -0
  304. evalkit/core/pull.py +198 -0
  305. evalkit/core/python_eval.py +59 -0
  306. evalkit/core/remote_evaluators.py +32 -0
  307. evalkit/core/review.py +220 -0
  308. evalkit/core/run_digest.py +421 -0
  309. evalkit/core/runner.py +995 -0
  310. evalkit/core/scorecard.py +255 -0
  311. evalkit/core/traces/__init__.py +0 -0
  312. evalkit/core/traces/convert.py +336 -0
  313. evalkit/core/traces/importer.py +113 -0
  314. evalkit/core/traces/mapping.py +385 -0
  315. evalkit/core/traces/poll.py +38 -0
  316. evalkit/core/traces/raw.py +21 -0
  317. evalkit/core/traces/sessions.py +172 -0
  318. evalkit/core/traces/settle.py +14 -0
  319. evalkit/core/traces/sources/__init__.py +19 -0
  320. evalkit/core/traces/sources/base.py +25 -0
  321. evalkit/core/traces/sources/phoenix.py +121 -0
  322. evalkit/core/trajectory.py +248 -0
  323. evalkit/core/workspace.py +30 -0
  324. evalkit/credentials.py +119 -0
  325. evalkit/db/__init__.py +0 -0
  326. evalkit/db/agents.py +289 -0
  327. evalkit/db/alembic/env.py +90 -0
  328. evalkit/db/alembic/script.py.mako +28 -0
  329. evalkit/db/alembic/versions/0011_baseline.py +1002 -0
  330. evalkit/db/alembic/versions/0012_ticket_token_kind.py +27 -0
  331. evalkit/db/alembic/versions/0013_keys_and_llm_providers.py +67 -0
  332. evalkit/db/cases.py +608 -0
  333. evalkit/db/crypto.py +12 -0
  334. evalkit/db/evaluators.py +156 -0
  335. evalkit/db/experiments.py +363 -0
  336. evalkit/db/fixture_blobs.py +91 -0
  337. evalkit/db/keys.py +78 -0
  338. evalkit/db/llm_providers.py +176 -0
  339. evalkit/db/locks.py +6 -0
  340. evalkit/db/mappings.py +168 -0
  341. evalkit/db/models.py +567 -0
  342. evalkit/db/promotion.py +271 -0
  343. evalkit/db/rekey.py +46 -0
  344. evalkit/db/review.py +250 -0
  345. evalkit/db/review_state.py +50 -0
  346. evalkit/db/runs.py +533 -0
  347. evalkit/db/scorecard.py +300 -0
  348. evalkit/db/session.py +71 -0
  349. evalkit/db/sessions.py +90 -0
  350. evalkit/db/spans.py +360 -0
  351. evalkit/db/store.py +209 -0
  352. evalkit/db/tokens.py +100 -0
  353. evalkit/db/trace_imports.py +308 -0
  354. evalkit/db/trace_sources.py +131 -0
  355. evalkit/db/users.py +186 -0
  356. evalkit/db/workspaces.py +232 -0
  357. evalkit/paths.py +33 -0
  358. evalkit/sdk/__init__.py +29 -0
  359. evalkit/sdk/binding.py +69 -0
  360. evalkit/sdk/evaluators.py +56 -0
  361. evalkit/sdk/runner.py +957 -0
  362. evalkit/sdk/tracing.py +166 -0
  363. evalkit/store/__init__.py +0 -0
  364. evalkit/store/base.py +354 -0
  365. evalkit/store/blob.py +69 -0
  366. evalkit/version.py +44 -0
  367. evalkit_py-0.2.0.dev12.dist-info/METADATA +205 -0
  368. evalkit_py-0.2.0.dev12.dist-info/RECORD +371 -0
  369. evalkit_py-0.2.0.dev12.dist-info/WHEEL +4 -0
  370. evalkit_py-0.2.0.dev12.dist-info/entry_points.txt +2 -0
  371. evalkit_py-0.2.0.dev12.dist-info/licenses/LICENSE +661 -0
@@ -0,0 +1,314 @@
1
+ {
2
+ "$defs": {
3
+ "AttributeRule": {
4
+ "additionalProperties": false,
5
+ "properties": {
6
+ "attribute": {
7
+ "description": "The span attribute key to read.",
8
+ "title": "Attribute",
9
+ "type": "string"
10
+ },
11
+ "json": {
12
+ "default": false,
13
+ "description": "Parse the value with json.loads when it is a string; keep the string on failure.",
14
+ "title": "Json",
15
+ "type": "boolean"
16
+ },
17
+ "values": {
18
+ "anyOf": [
19
+ {
20
+ "additionalProperties": {
21
+ "type": "string"
22
+ },
23
+ "type": "object"
24
+ },
25
+ {
26
+ "type": "null"
27
+ }
28
+ ],
29
+ "default": null,
30
+ "description": "Translate the read value through this table.",
31
+ "title": "Values"
32
+ },
33
+ "message_format": {
34
+ "anyOf": [
35
+ {
36
+ "enum": [
37
+ "openinference",
38
+ "gen_ai",
39
+ "openai"
40
+ ],
41
+ "type": "string"
42
+ },
43
+ {
44
+ "type": "null"
45
+ }
46
+ ],
47
+ "default": null,
48
+ "description": "Collect messages laid out per this format under the attribute key.",
49
+ "title": "Message Format"
50
+ }
51
+ },
52
+ "required": [
53
+ "attribute"
54
+ ],
55
+ "title": "AttributeRule",
56
+ "type": "object"
57
+ },
58
+ "TokenRules": {
59
+ "additionalProperties": false,
60
+ "properties": {
61
+ "prompt": {
62
+ "anyOf": [
63
+ {
64
+ "$ref": "#/$defs/AttributeRule"
65
+ },
66
+ {
67
+ "type": "null"
68
+ }
69
+ ],
70
+ "default": null
71
+ },
72
+ "completion": {
73
+ "anyOf": [
74
+ {
75
+ "$ref": "#/$defs/AttributeRule"
76
+ },
77
+ {
78
+ "type": "null"
79
+ }
80
+ ],
81
+ "default": null
82
+ },
83
+ "cached": {
84
+ "anyOf": [
85
+ {
86
+ "$ref": "#/$defs/AttributeRule"
87
+ },
88
+ {
89
+ "type": "null"
90
+ }
91
+ ],
92
+ "default": null
93
+ },
94
+ "cache_write": {
95
+ "anyOf": [
96
+ {
97
+ "$ref": "#/$defs/AttributeRule"
98
+ },
99
+ {
100
+ "type": "null"
101
+ }
102
+ ],
103
+ "default": null
104
+ }
105
+ },
106
+ "title": "TokenRules",
107
+ "type": "object"
108
+ },
109
+ "ToolRules": {
110
+ "additionalProperties": false,
111
+ "properties": {
112
+ "name": {
113
+ "anyOf": [
114
+ {
115
+ "$ref": "#/$defs/AttributeRule"
116
+ },
117
+ {
118
+ "type": "null"
119
+ }
120
+ ],
121
+ "default": null
122
+ },
123
+ "call_id": {
124
+ "anyOf": [
125
+ {
126
+ "$ref": "#/$defs/AttributeRule"
127
+ },
128
+ {
129
+ "type": "null"
130
+ }
131
+ ],
132
+ "default": null
133
+ },
134
+ "arguments": {
135
+ "anyOf": [
136
+ {
137
+ "$ref": "#/$defs/AttributeRule"
138
+ },
139
+ {
140
+ "type": "null"
141
+ }
142
+ ],
143
+ "default": null
144
+ },
145
+ "result": {
146
+ "anyOf": [
147
+ {
148
+ "$ref": "#/$defs/AttributeRule"
149
+ },
150
+ {
151
+ "type": "null"
152
+ }
153
+ ],
154
+ "default": null
155
+ }
156
+ },
157
+ "title": "ToolRules",
158
+ "type": "object"
159
+ }
160
+ },
161
+ "additionalProperties": false,
162
+ "properties": {
163
+ "schema_version": {
164
+ "const": "1",
165
+ "title": "Schema Version",
166
+ "type": "string"
167
+ },
168
+ "kind": {
169
+ "anyOf": [
170
+ {
171
+ "$ref": "#/$defs/AttributeRule"
172
+ },
173
+ {
174
+ "type": "null"
175
+ }
176
+ ],
177
+ "default": null
178
+ },
179
+ "session_id": {
180
+ "anyOf": [
181
+ {
182
+ "$ref": "#/$defs/AttributeRule"
183
+ },
184
+ {
185
+ "type": "null"
186
+ }
187
+ ],
188
+ "default": null
189
+ },
190
+ "model": {
191
+ "anyOf": [
192
+ {
193
+ "$ref": "#/$defs/AttributeRule"
194
+ },
195
+ {
196
+ "type": "null"
197
+ }
198
+ ],
199
+ "default": null
200
+ },
201
+ "system_instructions": {
202
+ "anyOf": [
203
+ {
204
+ "$ref": "#/$defs/AttributeRule"
205
+ },
206
+ {
207
+ "type": "null"
208
+ }
209
+ ],
210
+ "default": null,
211
+ "description": "System prompt kept outside the input messages: a string or a list of text parts. Read on llm spans and put first in the input messages."
212
+ },
213
+ "input_messages": {
214
+ "anyOf": [
215
+ {
216
+ "$ref": "#/$defs/AttributeRule"
217
+ },
218
+ {
219
+ "type": "null"
220
+ }
221
+ ],
222
+ "default": null
223
+ },
224
+ "output_messages": {
225
+ "anyOf": [
226
+ {
227
+ "$ref": "#/$defs/AttributeRule"
228
+ },
229
+ {
230
+ "type": "null"
231
+ }
232
+ ],
233
+ "default": null
234
+ },
235
+ "tokens": {
236
+ "$ref": "#/$defs/TokenRules"
237
+ },
238
+ "cost_usd": {
239
+ "anyOf": [
240
+ {
241
+ "$ref": "#/$defs/AttributeRule"
242
+ },
243
+ {
244
+ "type": "null"
245
+ }
246
+ ],
247
+ "default": null
248
+ },
249
+ "tool": {
250
+ "$ref": "#/$defs/ToolRules"
251
+ },
252
+ "agent_name": {
253
+ "anyOf": [
254
+ {
255
+ "$ref": "#/$defs/AttributeRule"
256
+ },
257
+ {
258
+ "type": "null"
259
+ }
260
+ ],
261
+ "default": null,
262
+ "description": "The agent's name on agent spans; names the subagent trajectory. The span name is used when it is absent."
263
+ },
264
+ "input": {
265
+ "anyOf": [
266
+ {
267
+ "$ref": "#/$defs/AttributeRule"
268
+ },
269
+ {
270
+ "type": "null"
271
+ }
272
+ ],
273
+ "default": null
274
+ },
275
+ "output": {
276
+ "anyOf": [
277
+ {
278
+ "$ref": "#/$defs/AttributeRule"
279
+ },
280
+ {
281
+ "type": "null"
282
+ }
283
+ ],
284
+ "default": null
285
+ },
286
+ "known_attributes": {
287
+ "description": "Attributes no rule reads that are expected and need nothing: not reported as unmapped. Glob patterns such as llm.tools.* are allowed.",
288
+ "items": {
289
+ "type": "string"
290
+ },
291
+ "title": "Known Attributes",
292
+ "type": "array"
293
+ },
294
+ "answer": {
295
+ "default": "root",
296
+ "description": "Where the run's answer comes from: root, a span name, or <span name>.<output key>.",
297
+ "title": "Answer",
298
+ "type": "string"
299
+ },
300
+ "exclude_spans": {
301
+ "description": "Span names left out of the trajectory.",
302
+ "items": {
303
+ "type": "string"
304
+ },
305
+ "title": "Exclude Spans",
306
+ "type": "array"
307
+ }
308
+ },
309
+ "required": [
310
+ "schema_version"
311
+ ],
312
+ "title": "MappingDocument",
313
+ "type": "object"
314
+ }
@@ -0,0 +1,26 @@
1
+ # Concepts
2
+
3
+ The words you need before your first scorecard. Everything else is explained on the page that uses it.
4
+
5
+ | Term | Meaning |
6
+ | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
7
+ | Case | One eval question, written in YAML: the input, the rubrics a right answer meets, and the checks to run. |
8
+ | Dataset | A directory of cases, run and tracked together. The directory name is the dataset name, and subfolders become tags you can run alone. |
9
+ | Sync | Copying a dataset directory to the server. Runs do it for you. |
10
+ | Workspace | Where datasets, agents and experiments live: your own (named after you), or a shared one such as `dev`. Every user can read every workspace; only the owner changes a personal one, and admins and writers change a shared one. |
11
+ | Reference | `name@workspace`, for example `acme@dev`. A bare name means your own workspace. |
12
+ | Agent | Your agent, registered once on the server. A code-driven agent is run by your own code; this is the usual way to start. |
13
+ | Task | The function `run_experiment` calls once per case. It calls your agent and returns the answer. |
14
+ | Experiment | One run of a dataset against an agent. |
15
+ | Run | One case answered once. |
16
+ | Trace, span, session | What your agent records as it works: one span per model call or tool call. One run is one session. |
17
+ | Mapping | Which span attribute holds the model, the messages, the tokens and each tool call. |
18
+ | Trajectory | The step-by-step record of a run that evalkit builds from the spans. |
19
+ | Judge | The LLM that grades an answer against the case's rubrics. |
20
+ | Evaluator | One scoring check, for example the rubric check or "did the agent call this tool". |
21
+ | Scorecard | The table of scores for an experiment, per case and per bucket (content, trajectory, presentation, efficiency, custom). |
22
+ | Unreviewed | A case in a shared dataset with no review decision at its current content. It runs like any other case; review decides promotion. |
23
+ | Promotion | An admin links a shared workspace to a target (`evalkit workspaces promote-to dev prod`). Approving a case in `dev` adds it, approved, to the same-named dataset in `prod`. Datasets in `prod` are fed only that way. |
24
+ | `evalkit.yaml` | The file in your repo that says where your cases are and which environment variables hold API keys. |
25
+
26
+ Next: [Try locally](try-locally.md) to see these on a running server, or the [Quickstart](quickstart.md) to connect your own agent.
@@ -0,0 +1,38 @@
1
+ # Config: `evalkit.yaml`
2
+
3
+ `evalkit.yaml` sits at the root of the repository that holds your eval cases or your agent. The CLI and the SDK look for it above the current directory. It names the case and fixture directories and the API keys the runs from this machine use.
4
+
5
+ ```yaml
6
+ cases: eval/cases # optional: directory whose children are datasets
7
+ fixtures: eval/fixtures # optional: fixture bytes, flat, keyed by filename
8
+
9
+ credentials: # values are env:NAME, read when a run needs them
10
+ agents:
11
+ myagent: env:MYAGENT_KEY # a bare name means your own workspace
12
+ evaluators:
13
+ citation_check: env:EVALUATOR_KEY
14
+ llm_providers:
15
+ https://litellm.example.com: env:LITELLM_API_KEY # keyed by the judge's base URL
16
+ ```
17
+
18
+ Only your personal Harness API agents use `credentials.agents` here. The server drives shared agents (`ouragent@dev`) with the keys stored in its database, so an entry for one in `evalkit.yaml` is never read. The same holds for shared remote evaluators.
19
+
20
+ Put the values in a `.env` file next to `evalkit.yaml` (and keep it out of git), or in your shell. A variable set in the shell wins over `.env`.
21
+
22
+ Agents, remote evaluators and the judge are not configured here:
23
+
24
+ - **Agents** are created once on the server with `evalkit agents create` (or on the Agents page). A personal agent runs from your machine; a shared one is driven by the server. An agent without a harness URL is code-driven: only `run_experiment` can run it. See [SDK runs](sdk-runs.md).
25
+ - **Remote evaluators** are created with `evalkit evaluators create`. A run uses the evaluators in its agent's workspace.
26
+ - **The judge** of an experiment is the server's default judge (an admin sets it with `evalkit judge-default set`) unless you pick one: `evalkit run … --judge-model M --judge-base-url URL --judge-effort E`, the run dialog's "Judge provider" picker, or `run_experiment(judge=Judge(...))`. Re-evaluating an experiment always reuses its judge.
27
+
28
+ Rules:
29
+
30
+ - `env:NAME` values are read only when a command needs them. A missing variable is an error that names it.
31
+ - An agent or evaluator with no `credentials` entry is called without a key, and the run prints one line saying so. A judge with no entry stops the run before its first case: `no credentials.llm_providers entry for <url>`.
32
+ - `credentials.judges` is now `credentials.llm_providers`. A file that still uses the old name fails to load.
33
+ - An `llm_providers` key may itself be `env:NAME` (`env:LLM_BASE_URL: env:LLM_API_KEY`), so the judge's base URL can come from the environment too. A key whose variable is unset is skipped.
34
+ - `cases` and `fixtures` are optional. Leave them out when you only run shared datasets, for example from `run_experiment`. Commands that need them say so:
35
+ - `evalkit sync <name>` and `evalkit run <name>` on a dataset in your workspace need `cases` to find `<cases>/<name>`. Passing the dataset's directory instead (`evalkit sync eval/cases/finance`) works without it.
36
+ - A sync uploads fixture bytes from `fixtures`. Without it, a case whose fixture the server does not already hold fails the sync with `E-FIXTURE-MISSING`.
37
+ - `run_experiment` on a dataset in your workspace skips the sync without `cases` and runs the copy the server holds.
38
+ - Fixtures a run downloads go to `fixtures`, or to a temporary directory when it is not set.
@@ -0,0 +1,44 @@
1
+ # Harness API
2
+
3
+ The Harness API is the HTTP contract a client's agent harness implements so evalkit can drive it: start a run, poll its status, serve its trajectory. Agents in a shared workspace are driven by this server; agents in a personal workspace by `evalkit run` from their owner's machine. The OpenAPI schema ships inside the CLI:
4
+
5
+ ```bash
6
+ evalkit contracts export --target ./contracts # harness-api-v1.json, atif-accepted.json, …
7
+ ```
8
+
9
+ Each endpoint lets evalkit do one thing. Every Harness API has the first three; declare the rest in the capabilities response when you implement them. An agent on the SDK + traces path has no Harness API and none of these endpoints; evalkit sees what its task returns and the spans it exports.
10
+
11
+ | Endpoint | Lets evalkit | Capability flag | Without it |
12
+ | ----------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------- |
13
+ | `GET /capabilities` | see what the harness supports and gate evaluators on it (snapshotted per experiment) | part of every Harness API | — |
14
+ | `POST /runs` | invoke the agent: start one run in a fresh session with the case input and files | part of every Harness API | — |
15
+ | `GET /runs/{id}` | wait for the run and read its answer, structured output, model and artifact list | part of every Harness API | — |
16
+ | `GET /runs/{id}/trajectory` | read the trajectory (ATIF): the run view, trajectory evaluators and token/cost gauges | `provides.trajectory` | trajectory evaluators skip, unless the agent's trajectory source is `otel` and the trajectory comes from spans |
17
+ | `GET /runs/{id}/files`, `GET /runs/{id}/files/{path}` | read the workspace: the run's Workspace tab, downloads and artifact copies | `provides.workspace` | no Workspace tab; artifacts the run reports are not copied |
18
+ | `GET /runs` | list the agent's sessions on the Runs page and for `evalkit runs list`/`runs pull`, including ones evalkit did not start; optional `since`/`until` filter by creation time | `provides.run_listing` | the Runs page is empty for this agent |
19
+ | `POST /runs/{id}/stop` | cancel a run that hit its time limit | `accepts.stop` | timed-out runs keep running on the harness |
20
+
21
+ `POST /runs` takes JSON, or multipart when the case has fixture files and the harness accepts `files` but not `file_urls`. Run status moves through `queued`, `running`, then one of `completed`, `failed`, `cancelled`.
22
+
23
+ A code-driven agent (no `harness_url`) has none of these endpoints, so its runs have no Workspace tab. To see an agent's files in evalkit, give it a Harness API with at least the files endpoints; its trajectory can still come from traces.
24
+
25
+ Every request carries `x-api-key`. Two rules matter more than the rest:
26
+
27
+ - **Capabilities honesty.** Declare only what works. evalkit neutral-skips evaluators whose inputs the harness does not provide; a false `true` produces failing scores blamed on the agent.
28
+ - **Implement stop.** evalkit calls stop on timeout when `accepts.stop` is true; a harness without it leaks resources on every timed-out run.
29
+
30
+ ## Already have a harness? Keep it
31
+
32
+ A harness that already emits OpenTelemetry traces can skip the trajectory endpoint: create the agent with `--trajectory-source otel --mapping FILE` and export spans to the collector with the run id it returned from `POST /runs` in the attribute the mapping's `session_id` rule names (`session.id` for OpenInference, `gen_ai.conversation.id` for GenAI). Everything else stays: server runs, `evalkit run`, the Workspace tab. The harness declares `provides.trajectory: false`. See [Tracing](tracing.md).
33
+
34
+ The session evalkit polls is the `run_id` that `POST /runs` returns; there is no separate session field. A queue-backed agent whose worker opens its own session can return that session id as `run_id`, or stamp the `run_id` it returned on the job's spans in the mapping's session id attribute. Either way the ids must also work with the other `/runs/{id}` endpoints.
35
+
36
+ Moving to [SDK runs](sdk-runs.md) instead only makes sense to stop hosting the harness. A code-driven agent loses server-started runs and the Workspace tab, and `run_experiment` refuses an agent with a `harness_url`: keep one agent name and run it with `evalkit run`, rather than adding a second entry for `run_experiment`.
37
+
38
+ ## Checking
39
+
40
+ ```bash
41
+ evalkit harness check ouragent@dev
42
+ ```
43
+
44
+ runs a trivial call, exercises every declared capability and prints a pass/fail table. For a harness agent whose trajectory source is `otel` the trajectory row reads "from traces" and a session row reports the collected spans.
@@ -0,0 +1,60 @@
1
+ # Install
2
+
3
+ evalkit is one Python package on PyPI, `evalkit-py`. It holds the `evalkit` command (the CLI), the `evalkit.sdk` module for SDK runs and, with the `server` extra, the server itself.
4
+
5
+ Your CLI and SDK must run the **same version as the evalkit server** you use: local runs and SDK runs refuse to start otherwise. The commands on this page pin version **{{version}}**. On your server's own `/docs/install` page, that is the server's version; `curl <server url>/api/cli` prints it anywhere.
6
+
7
+ ## The CLI, as a global tool
8
+
9
+ ```bash
10
+ uv tool install --reinstall "evalkit-py=={{version}}"
11
+ ```
12
+
13
+ With pipx instead: `pipx install --force "evalkit-py=={{version}}"`.
14
+
15
+ `curl {{origin}}/api/cli` prints the server's version, for scripts and CI:
16
+
17
+ ```bash
18
+ uv tool install --reinstall "evalkit-py==$(curl -fsSL {{origin}}/api/cli | jq -r .version)"
19
+ ```
20
+
21
+ ## The SDK, into a project
22
+
23
+ `run_experiment` and `tracing.register` live in the same package as the CLI. The `otel` extra brings the OpenTelemetry SDK and the OTLP exporter. Pin the server's version; `uv.lock` records it:
24
+
25
+ ```bash
26
+ uv add "evalkit-py[otel]=={{version}}"
27
+ ```
28
+
29
+ With pip instead: `pip install "evalkit-py[otel]=={{version}}"`.
30
+
31
+ To keep evalkit out of the app's dependencies, run the eval script with it instead:
32
+
33
+ ```bash
34
+ uv run --with "evalkit-py[otel]=={{version}}" python eval/run.py
35
+ ```
36
+
37
+ ## The server
38
+
39
+ `pip install "evalkit-py[server]"` installs the server too: the API, the web UI and migrations. To run one on your machine against a Postgres you already have:
40
+
41
+ ```bash
42
+ evalkit init-server # creates the database, writes config.yaml and .env in ./evalkit-try
43
+ cd evalkit-try && evalkit serve
44
+ ```
45
+
46
+ [Try locally](try-locally.md) walks through it with a sample agent; the evalkit-deployment skill covers running a server for a team.
47
+
48
+ ## Updating
49
+
50
+ Every API response carries `X-Evalkit-Version`. The CLI warns when it differs from the server and refuses when the major versions differ. Local runs and SDK runs refuse any difference, so after a server deploy, from the project's root:
51
+
52
+ ```bash
53
+ evalkit update
54
+ ```
55
+
56
+ It reinstalls the CLI at the server's version and, when `pyproject.toml` pins `evalkit-py==…`, moves the pin and runs `uv sync`. It then refreshes the skills in every directory `evalkit skills install` wrote to on this machine (listed in `~/.evalkit/skills-targets`), and in `./.claude/skills` or `./.agents/skills` if they hold an earlier install; commit the changes in repos that track the skills. Pass `--no-skills` to skip that.
57
+
58
+ A project that vendored an evalkit wheel before evalkit was on PyPI moves to PyPI once: `uv remove evalkit && uv add "evalkit-py[otel]=={{version}}"`.
59
+
60
+ Next: [Login](login.md).
@@ -0,0 +1,36 @@
1
+ # Login
2
+
3
+ ```bash
4
+ evalkit login --url {{origin}}
5
+ ```
6
+
7
+ The command asks for your username and password and stores the server URL and your token in `~/.evalkit/config.toml`. The CLI talks to one server at a time: logging in again, to the same server or another, replaces the stored login. Dev and prod are workspaces on one server (`finance@dev`, `finance@prod`), not separate logins.
8
+
9
+ Tokens expire after the TTL the deployer configured (30 days by default). `evalkit whoami` shows who the token logs in as and when it expires, and exits 1 if the server rejects it; run it before a long run. Commands that talk to the server warn when the token expires within a day. When commands start failing with 401, log in again.
10
+
11
+ ## Scripts and CI
12
+
13
+ Two environment variables bypass the config file:
14
+
15
+ ```bash
16
+ export EVALKIT_SERVER_URL={{origin}}
17
+ export EVALKIT_TOKEN=<token>
18
+ ```
19
+
20
+ A stored token expires, so CI jobs should log in at the start of every run with a password from the secret store:
21
+
22
+ ```bash
23
+ evalkit login --url "$EVALKIT_SERVER_URL" --username admin --password "$EVALKIT_ADMIN_PASSWORD"
24
+ ```
25
+
26
+ ## Timeout
27
+
28
+ The CLI and the SDK wait up to 120 seconds for each server call. Set `EVALKIT_TIMEOUT` (seconds) to wait longer, for example on a slow network:
29
+
30
+ ```bash
31
+ export EVALKIT_TIMEOUT=300
32
+ ```
33
+
34
+ It covers calls to the evalkit server only. The server's own calls to an agent's harness keep their fixed limits, and so does `evalkit harness check`.
35
+
36
+ The SDK uses the same login and the same two variables. A deployed agent that only exports traces uses an agent token instead; see [Tracing](tracing.md).
@@ -0,0 +1,136 @@
1
+ # Mappings
2
+
3
+ A mapping tells evalkit which span attribute holds each field of the evalkit span format (ESF): the span kind, the session id, the model, the messages, the token counts, the tool name and call id. It also says where the run's answer comes from (`answer`) and which spans to leave out (`exclude_spans`).
4
+
5
+ Every agent whose trajectories come from traces has its own mapping. `evalkit agents create NAME --trajectory-source otel --mapping FILE` makes the first version active. Start from the `connect-traces` skill's `openinference.json` or `gen_ai.json`, which cover agents on the OpenInference or GenAI semantic conventions as they are. Spans that reach an agent with no active mapping are stored without a session id.
6
+
7
+ An existing agent switches between ATIF and traces with `evalkit agents edit NAME --trajectory-source otel --mapping FILE` (or `--trajectory-source atif`), or from the agent's Edit dialog. Switching to traces without a file reuses the agent's last active mapping. The switch is refused while one of the agent's experiments is running, and experiments that already ran keep the source they ran with.
8
+
9
+ A mapping applies to every span of the agent and is versioned: `evalkit traces mapping push` creates a draft, you review the draft against recent sessions on the agent's Mappings tab (Agents → the agent → Mappings), and activate it there. The `connect-traces` skill walks a coding agent through writing one.
10
+
11
+ ## The document
12
+
13
+ ```json
14
+ {
15
+ "schema_version": "1",
16
+ "kind": {
17
+ "attribute": "openinference.span.kind",
18
+ "values": {
19
+ "LLM": "llm",
20
+ "TOOL": "tool",
21
+ "AGENT": "agent",
22
+ "CHAIN": "chain",
23
+ "RETRIEVER": "retriever"
24
+ }
25
+ },
26
+ "session_id": {
27
+ "attribute": "session.id"
28
+ },
29
+ "model": {
30
+ "attribute": "llm.model_name"
31
+ },
32
+ "input_messages": {
33
+ "attribute": "llm.input_messages",
34
+ "message_format": "openinference"
35
+ },
36
+ "output_messages": {
37
+ "attribute": "llm.output_messages",
38
+ "message_format": "openinference"
39
+ },
40
+ "tokens": {
41
+ "prompt": {
42
+ "attribute": "llm.token_count.prompt"
43
+ },
44
+ "completion": {
45
+ "attribute": "llm.token_count.completion"
46
+ },
47
+ "cached": {
48
+ "attribute": "llm.token_count.prompt_details.cache_read"
49
+ },
50
+ "cache_write": {
51
+ "attribute": "llm.token_count.prompt_details.cache_write"
52
+ }
53
+ },
54
+ "cost_usd": {
55
+ "attribute": "llm.cost.total"
56
+ },
57
+ "tool": {
58
+ "name": {
59
+ "attribute": "tool.name"
60
+ },
61
+ "call_id": {
62
+ "attribute": "tool.id"
63
+ },
64
+ "arguments": {
65
+ "attribute": "input.value",
66
+ "json": true
67
+ },
68
+ "result": {
69
+ "attribute": "output.value"
70
+ }
71
+ },
72
+ "agent_name": {
73
+ "attribute": "agent.name"
74
+ },
75
+ "input": {
76
+ "attribute": "input.value",
77
+ "json": true
78
+ },
79
+ "output": {
80
+ "attribute": "output.value",
81
+ "json": true
82
+ },
83
+ "known_attributes": [
84
+ "openinference.span.kind",
85
+ "session.id",
86
+ "user.id",
87
+ "metadata",
88
+ "tag.tags",
89
+ "input.mime_type",
90
+ "output.mime_type",
91
+ "llm.provider",
92
+ "llm.system",
93
+ "llm.invocation_parameters",
94
+ "llm.finish_reason",
95
+ "llm.tools.*",
96
+ "llm.token_count.total",
97
+ "llm.token_count.prompt_details.*",
98
+ "llm.token_count.completion_details.*",
99
+ "llm.cost.*",
100
+ "tool.description",
101
+ "tool.parameters",
102
+ "tool.json_schema",
103
+ "agent.name",
104
+ "graph.node.*"
105
+ ]
106
+ }
107
+ ```
108
+
109
+ That is the skill's `openinference.json`. Its `gen_ai.json` reads `gen_ai.operation.name` (`chat`, `execute_tool`, `invoke_agent`, …), `gen_ai.request.model`, `gen_ai.input.messages` / `gen_ai.output.messages` with `"message_format": "gen_ai"`, `gen_ai.usage.input_tokens` and friends, reads the system prompt from `gen_ai.system_instructions`, cache writes from `gen_ai.usage.cache_creation.input_tokens` and the agent's name from `gen_ai.agent.name`, and sets `"cost_usd": null` because the conventions define no cost attribute. Both list the other attributes of their convention under `known_attributes`, so `evalkit traces check` does not report them as unmapped; entries may be exact keys or globs such as `llm.tools.*`.
110
+
111
+ Rule shapes:
112
+
113
+ | Shape | Result |
114
+ | --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
115
+ | `{"attribute": K}` | the attribute's value, or null |
116
+ | `{"attribute": K, "json": true}` | the value parsed as JSON when it is a string; the string stays when parsing fails |
117
+ | `{"attribute": K, "values": {...}}` | the value translated through the table; an unlisted kind becomes `other` |
118
+ | `{"attribute": K, "message_format": F}` | the messages laid out under `K` per format `F`: `openinference` (flattened indexed keys), `gen_ai` (JSON list of messages with parts), `openai` (JSON list of chat messages) |
119
+ | `null` | never read |
120
+
121
+ Two more fields shape the trajectory: `answer` (`root`, a span name, or `<span name>.<output key>`; default `root`) and `exclude_spans` (span names left out; default none).
122
+
123
+ Every mapping is complete on its own; there is no inheritance. The schema ships as `span-mapping-v1.json` with `evalkit contracts export`.
124
+
125
+ ## The loop
126
+
127
+ ```bash
128
+ evalkit traces check myagent <session id> --dump spans.json # read the raw attributes
129
+ evalkit traces mapping push myagent eval/span-mapping.json # upload a draft
130
+ evalkit traces check myagent <session id> --mapping draft # preview with the draft
131
+ evalkit traces mapping list myagent
132
+ ```
133
+
134
+ Repeat until the unmapped list holds nothing that matters and the counts look right, then activate the draft on the agent's Mappings tab. `--activate` on push activates in the same step; a coding agent passes it only when the developer has approved the document.
135
+
136
+ Runs record the mapping version they were converted with; a later mapping change never alters a scored run. The Runs page converts sessions on demand with the active mapping.