evalgate-sdk 3.3.1__tar.gz → 3.5.1__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 (128) hide show
  1. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/CHANGELOG.md +31 -0
  2. evalgate_sdk-3.5.1/PKG-INFO +250 -0
  3. evalgate_sdk-3.5.1/README.md +196 -0
  4. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/pyproject.toml +7 -3
  5. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/__init__.py +137 -7
  6. evalgate_sdk-3.5.1/src/evalgate_sdk/_version.py +3 -0
  7. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/assertions.py +79 -10
  8. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/auto.py +9 -4
  9. evalgate_sdk-3.5.1/src/evalgate_sdk/auto_experiment_runner.py +214 -0
  10. evalgate_sdk-3.5.1/src/evalgate_sdk/auto_failure_analyzer.py +211 -0
  11. evalgate_sdk-3.5.1/src/evalgate_sdk/auto_mutation_engine.py +354 -0
  12. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/batch.py +2 -1
  13. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/cli/__init__.py +38 -0
  14. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/cli/api.py +184 -1
  15. evalgate_sdk-3.5.1/src/evalgate_sdk/cli/api_command_config.py +83 -0
  16. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/cli/commands.py +353 -72
  17. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/cli/config.py +45 -16
  18. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/cli/golden_commands.py +22 -8
  19. evalgate_sdk-3.5.1/src/evalgate_sdk/cli/judge_commands.py +436 -0
  20. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/cli/new_commands.py +23 -1
  21. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/cli/regression_gate.py +20 -5
  22. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/cli/report/build_check_report.py +6 -4
  23. evalgate_sdk-3.5.1/src/evalgate_sdk/cli/workflow_commands.py +615 -0
  24. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/cli/workspace.py +2 -23
  25. evalgate_sdk-3.5.1/src/evalgate_sdk/client.py +1292 -0
  26. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/cluster.py +126 -7
  27. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/collector.py +41 -0
  28. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/context.py +5 -8
  29. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/errors.py +5 -5
  30. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/export.py +3 -3
  31. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/golden.py +60 -19
  32. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/integrations/anthropic.py +1 -1
  33. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/integrations/autogen.py +3 -2
  34. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/integrations/crewai.py +3 -2
  35. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/integrations/langchain.py +1 -1
  36. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/integrations/openai.py +1 -1
  37. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/integrations/openai_eval.py +35 -8
  38. evalgate_sdk-3.5.1/src/evalgate_sdk/knowledge.py +43 -0
  39. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/local.py +3 -2
  40. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/logger.py +1 -1
  41. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/pagination.py +1 -1
  42. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/replay_decision.py +3 -1
  43. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/runtime/adapters/config_to_dsl.py +6 -14
  44. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/runtime/eval.py +9 -10
  45. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/runtime/execution_mode.py +2 -6
  46. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/runtime/executor.py +6 -4
  47. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/synthesize.py +18 -5
  48. evalgate_sdk-3.5.1/src/evalgate_sdk/types.py +1211 -0
  49. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/workflows.py +86 -13
  50. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/tests/test_assertions_async.py +26 -0
  51. evalgate_sdk-3.5.1/tests/test_auto_mutation_engine_parity.py +229 -0
  52. evalgate_sdk-3.5.1/tests/test_auto_session_methods.py +103 -0
  53. evalgate_sdk-3.5.1/tests/test_batch_collector.py +73 -0
  54. evalgate_sdk-3.5.1/tests/test_cli_golden_commands.py +553 -0
  55. evalgate_sdk-3.5.1/tests/test_cli_hardening_351.py +321 -0
  56. evalgate_sdk-3.5.1/tests/test_client.py +674 -0
  57. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/tests/test_decorators_and_integrations.py +9 -24
  58. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/tests/test_execution_mode.py +5 -5
  59. evalgate_sdk-3.5.1/tests/test_knowledge_methods.py +85 -0
  60. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/tests/test_new_modules.py +1 -1
  61. evalgate_sdk-3.5.1/tests/test_openapi_contracts.py +259 -0
  62. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/tests/test_parity_gap_modules.py +37 -5
  63. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/tests/test_parity_gaps.py +4 -6
  64. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/tests/test_prod_hardening.py +3 -3
  65. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/tests/test_runtime_dsl.py +6 -0
  66. evalgate_sdk-3.5.1/tests/test_sdk_contract_scaffold.py +42 -0
  67. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/tests/test_testing.py +1 -1
  68. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/tests/test_types.py +53 -0
  69. evalgate_sdk-3.5.1/tests/test_workflows_parity.py +97 -0
  70. evalgate_sdk-3.3.1/PKG-INFO +0 -608
  71. evalgate_sdk-3.3.1/README.md +0 -556
  72. evalgate_sdk-3.3.1/src/evalgate_sdk/_version.py +0 -3
  73. evalgate_sdk-3.3.1/src/evalgate_sdk/client.py +0 -609
  74. evalgate_sdk-3.3.1/src/evalgate_sdk/types.py +0 -666
  75. evalgate_sdk-3.3.1/tests/test_cli_golden_commands.py +0 -232
  76. evalgate_sdk-3.3.1/tests/test_client.py +0 -164
  77. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/.gitignore +0 -0
  78. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/cache.py +0 -0
  79. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/ci_context.py +0 -0
  80. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/cli/cli_constants.py +0 -0
  81. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/cli/env.py +0 -0
  82. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/cli/formatters/types.py +0 -0
  83. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/cli/manifest.py +0 -0
  84. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/cli/policy_packs.py +0 -0
  85. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/cli/profiles.py +0 -0
  86. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/cli/render/__init__.py +0 -0
  87. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/cli/render/snippet.py +0 -0
  88. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/cli/render/sort.py +0 -0
  89. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/cli/report/__init__.py +0 -0
  90. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/cli/traces.py +0 -0
  91. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/constants.py +0 -0
  92. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/formatters/__init__.py +0 -0
  93. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/formatters/github.py +0 -0
  94. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/formatters/human.py +0 -0
  95. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/formatters/json_fmt.py +0 -0
  96. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/formatters/pr_comment.py +0 -0
  97. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/integrations/__init__.py +0 -0
  98. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/matchers.py +0 -0
  99. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/otel.py +0 -0
  100. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/py.typed +0 -0
  101. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/pytest_plugin.py +0 -0
  102. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/reason_codes.py +0 -0
  103. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/regression.py +0 -0
  104. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/runtime/__init__.py +0 -0
  105. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/runtime/adapters/__init__.py +0 -0
  106. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/runtime/adapters/testsuite_to_dsl.py +0 -0
  107. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/runtime/context.py +0 -0
  108. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/runtime/registry.py +0 -0
  109. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/runtime/run_report.py +0 -0
  110. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/runtime/types.py +0 -0
  111. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/snapshot.py +0 -0
  112. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/streaming.py +0 -0
  113. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/testing.py +0 -0
  114. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/utils/__init__.py +0 -0
  115. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/src/evalgate_sdk/utils/input_hash.py +0 -0
  116. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/tests/__init__.py +0 -0
  117. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/tests/test_assertions.py +0 -0
  118. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/tests/test_ci_context.py +0 -0
  119. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/tests/test_cli_new_commands.py +0 -0
  120. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/tests/test_collector.py +0 -0
  121. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/tests/test_contract_payloads.py +0 -0
  122. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/tests/test_errors.py +0 -0
  123. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/tests/test_formatters.py +0 -0
  124. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/tests/test_local_storage.py +0 -0
  125. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/tests/test_otel.py +0 -0
  126. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/tests/test_pytest_plugin.py +0 -0
  127. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/tests/test_run_report.py +0 -0
  128. {evalgate_sdk-3.3.1 → evalgate_sdk-3.5.1}/tests/test_workflows.py +0 -0
@@ -9,6 +9,37 @@ Version numbering is aligned with the TypeScript SDK (`@evalgate/sdk`) and the p
9
9
 
10
10
  **Version history note:** The Python SDK jumped from 1.0.0 → 1.9.x → 2.0.0 to stay in sync with the TypeScript SDK. The TypeScript SDK had many releases (1.1–1.9) before the Python SDK existed. We now align both SDKs on the same major.minor version.
11
11
 
12
+ ## [3.5.1] - 2026-06-26
13
+
14
+ ### Fixed
15
+ - **CLI JSON contracts** — `check --format json` now emits one parseable JSON document.
16
+ - **Zero-config scaffolds** — `start --template` writes config that `run` and `doctor` discover consistently.
17
+ - **Runtime scoring defaults** — boolean/dict executor fallbacks now use the SDK's 0-100 score scale.
18
+ - **Sync safety** — missing labeled datasets surface an explicit error, and prompt pulls write UTF-8 content on Windows.
19
+ - **Default CLI install** — `pip install evalgate-sdk` now includes the runtime dependencies needed for the `evalgate` command.
20
+
21
+ ## [3.5.0] - 2026-04-09
22
+
23
+ ### Added
24
+ - **Knowledge API parity** — new `client.knowledge.search()`, `upload_document()`, and `get_grounding_context()` methods matching the TypeScript SDK surface.
25
+ - **Auto-session SDK methods** — `evaluations.create_auto_session()`, `list_auto_sessions()`, `get_auto_session()`, `get_quality_score()`, and `synthesize_test_cases()` for autonomous loop management.
26
+ - **Batch trace ingestion** — `report_traces()` function for sending up to 100 traces per request.
27
+ - **Offline trace persistence** — `WorkflowTracer` supports JSON file persistence when disconnected.
28
+
29
+ ### Changed
30
+ - **Version alignment** — bumped Python SDK package metadata and spec constants to `3.5.0`.
31
+
32
+ ## [3.4.0] - 2026-03-29
33
+
34
+ ### Added
35
+ - **Judge orchestration parity** — added Python client and CLI support for the normalized judge registry, presets, run/case judge inspection, and multi-judge evidence payloads.
36
+ - **Workflow and controls parity** — expanded Python operator surfaces for workflow execution, system controls, and workflow-aware parity with the TypeScript SDK.
37
+ - **Provider/PII safeguards** — outbound judge/assertion flows now enforce shared provider policy and pre-send PII protection semantics in the Python SDK path too.
38
+
39
+ ### Changed
40
+ - **Canonical contract alignment** — updated Python types and CLI copy to match the workflow-native and judge-orchestration model used across the platform.
41
+ - **Version alignment** — bumped Python SDK package metadata and spec constants to `3.4.0`.
42
+
12
43
  ## [3.3.1] - 2026-03-24
13
44
 
14
45
  ### Changed
@@ -0,0 +1,250 @@
1
+ Metadata-Version: 2.4
2
+ Name: evalgate-sdk
3
+ Version: 3.5.1
4
+ Summary: EvalGate Python SDK — CI for AI behavior. Traces, evaluations, assertions, and regression gates for LLM apps.
5
+ Project-URL: Homepage, https://evalgate.com
6
+ Project-URL: Documentation, https://github.com/evalgate/ai-evaluation-platform#readme
7
+ Project-URL: Repository, https://github.com/evalgate/ai-evaluation-platform
8
+ Project-URL: Issues, https://github.com/evalgate/ai-evaluation-platform/issues
9
+ Project-URL: Changelog, https://github.com/evalgate/ai-evaluation-platform/blob/main/src/packages/sdk-python/CHANGELOG.md
10
+ Author-email: EvalGate <team@evalgate.com>
11
+ License-Expression: MIT
12
+ Keywords: ai,anthropic,assertions,ci,evaluation,llm,monitoring,observability,openai,regression,testing,tracing,workflow
13
+ Classifier: Development Status :: 5 - Production/Stable
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
22
+ Classifier: Topic :: Software Development :: Testing
23
+ Classifier: Typing :: Typed
24
+ Requires-Python: >=3.10
25
+ Requires-Dist: httpx<1,>=0.27
26
+ Requires-Dist: pydantic<3,>=2.0
27
+ Requires-Dist: rich>=13
28
+ Requires-Dist: typer>=0.12
29
+ Provides-Extra: all
30
+ Requires-Dist: anthropic>=0.20; extra == 'all'
31
+ Requires-Dist: langchain-core>=0.2; extra == 'all'
32
+ Requires-Dist: openai>=1.0; extra == 'all'
33
+ Requires-Dist: rich>=13; extra == 'all'
34
+ Requires-Dist: typer>=0.12; extra == 'all'
35
+ Provides-Extra: anthropic
36
+ Requires-Dist: anthropic>=0.20; extra == 'anthropic'
37
+ Provides-Extra: cli
38
+ Requires-Dist: rich>=13; extra == 'cli'
39
+ Requires-Dist: typer>=0.12; extra == 'cli'
40
+ Provides-Extra: dev
41
+ Requires-Dist: mypy>=1.10; extra == 'dev'
42
+ Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
43
+ Requires-Dist: pytest-cov>=5; extra == 'dev'
44
+ Requires-Dist: pytest>=8; extra == 'dev'
45
+ Requires-Dist: respx>=0.21; extra == 'dev'
46
+ Requires-Dist: rich>=13; extra == 'dev'
47
+ Requires-Dist: ruff>=0.5; extra == 'dev'
48
+ Requires-Dist: typer>=0.12; extra == 'dev'
49
+ Provides-Extra: langchain
50
+ Requires-Dist: langchain-core>=0.2; extra == 'langchain'
51
+ Provides-Extra: openai
52
+ Requires-Dist: openai>=1.0; extra == 'openai'
53
+ Description-Content-Type: text/markdown
54
+
55
+ # evalgate-sdk
56
+
57
+ [![PyPI](https://img.shields.io/pypi/v/evalgate-sdk)](https://pypi.org/project/evalgate-sdk/)
58
+ [![Python](https://img.shields.io/pypi/pyversions/evalgate-sdk)](https://pypi.org/project/evalgate-sdk/)
59
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
60
+ [![Typed](https://img.shields.io/badge/typing-typed-blue)](https://peps.python.org/pep-0561/)
61
+
62
+ `evalgate-sdk` brings EvalGate's evaluation control plane to Python.
63
+
64
+ Use it to run assertions, trace agent workflows, inspect platform runs, orchestrate judges, and participate in the same closed-loop evaluation workflow as the TypeScript SDK and the web app.
65
+
66
+ ## Install
67
+
68
+ ```bash
69
+ pip install evalgate-sdk
70
+ ```
71
+
72
+ Optional extras:
73
+
74
+ ```bash
75
+ pip install "evalgate-sdk[openai]"
76
+ pip install "evalgate-sdk[anthropic]"
77
+ pip install "evalgate-sdk[langchain]"
78
+ pip install "evalgate-sdk[all]"
79
+ ```
80
+
81
+ ## Quick Start
82
+
83
+ ### Local Assertions
84
+
85
+ ```python
86
+ from evalgate_sdk import expect
87
+
88
+ result = expect("The capital of France is Paris.").to_contain("Paris")
89
+ print(result.passed)
90
+ ```
91
+
92
+ ### Platform Client
93
+
94
+ ```python
95
+ from evalgate_sdk import AIEvalClient
96
+ from evalgate_sdk.types import CreateTraceParams
97
+
98
+ client = AIEvalClient(api_key="sk-...")
99
+
100
+ trace = await client.traces.create(
101
+ CreateTraceParams(
102
+ name="support-run",
103
+ input="Cancel my subscription",
104
+ output="I've canceled your plan effective today.",
105
+ )
106
+ )
107
+
108
+ print(trace.id)
109
+ ```
110
+
111
+ ## Closed-Loop Workflow
112
+
113
+ The Python package participates in the same EvalGate loop:
114
+
115
+ ```text
116
+ trace -> cluster -> synthesize -> gate -> review -> auto -> ship
117
+ ```
118
+
119
+ Representative CLI commands:
120
+
121
+ ```bash
122
+ evalgate gate
123
+ evalgate cluster --run .evalgate/runs/latest.json
124
+ evalgate synthesize --dataset .evalgate/golden/labeled.jsonl
125
+ evalgate judge registry
126
+ evalgate judge presets
127
+ ```
128
+
129
+ ## Web App Sync
130
+
131
+ The Python CLI uses the same sync contracts as the TypeScript SDK. Local labeled
132
+ JSONL can be pushed into the web app, web-labeled cases can be merged back into
133
+ the same file, and prompt files can round-trip with stale active-version
134
+ protection.
135
+
136
+ ```bash
137
+ # Push local labels into the web app and pull web labels back into JSONL
138
+ evalgate sync \
139
+ --project-key support-agent \
140
+ --labeled-dataset .evalgate/golden/labeled.jsonl \
141
+ --pull-labels
142
+
143
+ # Pull the active web prompt into a local file
144
+ evalgate sync \
145
+ --project-key support-agent \
146
+ --prompt-id prompt_support \
147
+ --target-path prompts/support.md \
148
+ --pull-prompt
149
+
150
+ # Push an edited local prompt as a new web prompt version
151
+ evalgate sync \
152
+ --project-key support-agent \
153
+ --prompt-id prompt_support \
154
+ --target-path prompts/support.md \
155
+ --push-prompt
156
+ ```
157
+
158
+ ## Judge Orchestration
159
+
160
+ The Python SDK supports the same core judge model as the platform:
161
+
162
+ - registry-backed judge selection
163
+ - saved judge configs
164
+ - multi-judge aggregation
165
+ - per-run and per-case judge inspection
166
+ - structured reasoning and signal breakdowns
167
+
168
+ ### CLI
169
+
170
+ ```bash
171
+ evalgate judge registry
172
+ evalgate judge presets
173
+
174
+ evalgate judge test \
175
+ --provider openai \
176
+ --model gpt-5.2-chat-latest \
177
+ --judge openai:gpt-5.2-chat-latest \
178
+ --judge anthropic:claude-sonnet-4-20250514 \
179
+ --aggregation weighted \
180
+ --prompt-template "Return strict JSON with score, passed, reasoning, and signals." \
181
+ --input "Cancel my subscription" \
182
+ --output "I've canceled your plan effective today."
183
+ ```
184
+
185
+ ### Client
186
+
187
+ ```python
188
+ from evalgate_sdk.types import TestLLMJudgeConfigParams
189
+
190
+ registry = await client.llm_judge.list_registry()
191
+ presets = await client.llm_judge.list_presets()
192
+
193
+ result = await client.llm_judge.test_config(
194
+ TestLLMJudgeConfigParams(
195
+ provider="openai",
196
+ model="gpt-5.2-chat-latest",
197
+ prompt_template="Return strict JSON with score, passed, reasoning, and signals.",
198
+ judges=[
199
+ {
200
+ "id": "primary",
201
+ "type": "llm",
202
+ "provider": "openai",
203
+ "model": "gpt-5.2-chat-latest",
204
+ "weight": 0.6,
205
+ },
206
+ {
207
+ "id": "backup",
208
+ "type": "llm",
209
+ "provider": "anthropic",
210
+ "model": "claude-sonnet-4-20250514",
211
+ "weight": 0.4,
212
+ },
213
+ ],
214
+ aggregation="weighted",
215
+ input="Cancel my subscription",
216
+ output="I've canceled your plan effective today.",
217
+ behavior="tool_use",
218
+ task_type="support",
219
+ )
220
+ )
221
+
222
+ print(result.result.score, result.result.reasoning)
223
+ ```
224
+
225
+ ## Enterprise Controls
226
+
227
+ The Python SDK respects the same platform guardrails:
228
+
229
+ - provider allowlists
230
+ - pre-send PII checks for outbound judge/provider calls
231
+ - org-scoped policy
232
+ - shared config precedence with the API and web app
233
+
234
+ ## Surface Parity
235
+
236
+ The Python SDK now covers the primary EvalGate workflows used in the product:
237
+
238
+ - traces and runs
239
+ - clustering and synthesis
240
+ - gate/check/review loops
241
+ - judge registry, presets, configs, results, and comparisons
242
+ - workflow and control-plane inspection commands
243
+
244
+ TypeScript still has a few extra convenience wrappers, but the core control-plane model is shared.
245
+
246
+ For broader product context, see:
247
+
248
+ - [Root README](../../../README.md)
249
+ - [Integration reference](../../app/docs/integration/page.tsx)
250
+ - [SDK parity guide](../../app/docs/sdk-parity/page.tsx)
@@ -0,0 +1,196 @@
1
+ # evalgate-sdk
2
+
3
+ [![PyPI](https://img.shields.io/pypi/v/evalgate-sdk)](https://pypi.org/project/evalgate-sdk/)
4
+ [![Python](https://img.shields.io/pypi/pyversions/evalgate-sdk)](https://pypi.org/project/evalgate-sdk/)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
6
+ [![Typed](https://img.shields.io/badge/typing-typed-blue)](https://peps.python.org/pep-0561/)
7
+
8
+ `evalgate-sdk` brings EvalGate's evaluation control plane to Python.
9
+
10
+ Use it to run assertions, trace agent workflows, inspect platform runs, orchestrate judges, and participate in the same closed-loop evaluation workflow as the TypeScript SDK and the web app.
11
+
12
+ ## Install
13
+
14
+ ```bash
15
+ pip install evalgate-sdk
16
+ ```
17
+
18
+ Optional extras:
19
+
20
+ ```bash
21
+ pip install "evalgate-sdk[openai]"
22
+ pip install "evalgate-sdk[anthropic]"
23
+ pip install "evalgate-sdk[langchain]"
24
+ pip install "evalgate-sdk[all]"
25
+ ```
26
+
27
+ ## Quick Start
28
+
29
+ ### Local Assertions
30
+
31
+ ```python
32
+ from evalgate_sdk import expect
33
+
34
+ result = expect("The capital of France is Paris.").to_contain("Paris")
35
+ print(result.passed)
36
+ ```
37
+
38
+ ### Platform Client
39
+
40
+ ```python
41
+ from evalgate_sdk import AIEvalClient
42
+ from evalgate_sdk.types import CreateTraceParams
43
+
44
+ client = AIEvalClient(api_key="sk-...")
45
+
46
+ trace = await client.traces.create(
47
+ CreateTraceParams(
48
+ name="support-run",
49
+ input="Cancel my subscription",
50
+ output="I've canceled your plan effective today.",
51
+ )
52
+ )
53
+
54
+ print(trace.id)
55
+ ```
56
+
57
+ ## Closed-Loop Workflow
58
+
59
+ The Python package participates in the same EvalGate loop:
60
+
61
+ ```text
62
+ trace -> cluster -> synthesize -> gate -> review -> auto -> ship
63
+ ```
64
+
65
+ Representative CLI commands:
66
+
67
+ ```bash
68
+ evalgate gate
69
+ evalgate cluster --run .evalgate/runs/latest.json
70
+ evalgate synthesize --dataset .evalgate/golden/labeled.jsonl
71
+ evalgate judge registry
72
+ evalgate judge presets
73
+ ```
74
+
75
+ ## Web App Sync
76
+
77
+ The Python CLI uses the same sync contracts as the TypeScript SDK. Local labeled
78
+ JSONL can be pushed into the web app, web-labeled cases can be merged back into
79
+ the same file, and prompt files can round-trip with stale active-version
80
+ protection.
81
+
82
+ ```bash
83
+ # Push local labels into the web app and pull web labels back into JSONL
84
+ evalgate sync \
85
+ --project-key support-agent \
86
+ --labeled-dataset .evalgate/golden/labeled.jsonl \
87
+ --pull-labels
88
+
89
+ # Pull the active web prompt into a local file
90
+ evalgate sync \
91
+ --project-key support-agent \
92
+ --prompt-id prompt_support \
93
+ --target-path prompts/support.md \
94
+ --pull-prompt
95
+
96
+ # Push an edited local prompt as a new web prompt version
97
+ evalgate sync \
98
+ --project-key support-agent \
99
+ --prompt-id prompt_support \
100
+ --target-path prompts/support.md \
101
+ --push-prompt
102
+ ```
103
+
104
+ ## Judge Orchestration
105
+
106
+ The Python SDK supports the same core judge model as the platform:
107
+
108
+ - registry-backed judge selection
109
+ - saved judge configs
110
+ - multi-judge aggregation
111
+ - per-run and per-case judge inspection
112
+ - structured reasoning and signal breakdowns
113
+
114
+ ### CLI
115
+
116
+ ```bash
117
+ evalgate judge registry
118
+ evalgate judge presets
119
+
120
+ evalgate judge test \
121
+ --provider openai \
122
+ --model gpt-5.2-chat-latest \
123
+ --judge openai:gpt-5.2-chat-latest \
124
+ --judge anthropic:claude-sonnet-4-20250514 \
125
+ --aggregation weighted \
126
+ --prompt-template "Return strict JSON with score, passed, reasoning, and signals." \
127
+ --input "Cancel my subscription" \
128
+ --output "I've canceled your plan effective today."
129
+ ```
130
+
131
+ ### Client
132
+
133
+ ```python
134
+ from evalgate_sdk.types import TestLLMJudgeConfigParams
135
+
136
+ registry = await client.llm_judge.list_registry()
137
+ presets = await client.llm_judge.list_presets()
138
+
139
+ result = await client.llm_judge.test_config(
140
+ TestLLMJudgeConfigParams(
141
+ provider="openai",
142
+ model="gpt-5.2-chat-latest",
143
+ prompt_template="Return strict JSON with score, passed, reasoning, and signals.",
144
+ judges=[
145
+ {
146
+ "id": "primary",
147
+ "type": "llm",
148
+ "provider": "openai",
149
+ "model": "gpt-5.2-chat-latest",
150
+ "weight": 0.6,
151
+ },
152
+ {
153
+ "id": "backup",
154
+ "type": "llm",
155
+ "provider": "anthropic",
156
+ "model": "claude-sonnet-4-20250514",
157
+ "weight": 0.4,
158
+ },
159
+ ],
160
+ aggregation="weighted",
161
+ input="Cancel my subscription",
162
+ output="I've canceled your plan effective today.",
163
+ behavior="tool_use",
164
+ task_type="support",
165
+ )
166
+ )
167
+
168
+ print(result.result.score, result.result.reasoning)
169
+ ```
170
+
171
+ ## Enterprise Controls
172
+
173
+ The Python SDK respects the same platform guardrails:
174
+
175
+ - provider allowlists
176
+ - pre-send PII checks for outbound judge/provider calls
177
+ - org-scoped policy
178
+ - shared config precedence with the API and web app
179
+
180
+ ## Surface Parity
181
+
182
+ The Python SDK now covers the primary EvalGate workflows used in the product:
183
+
184
+ - traces and runs
185
+ - clustering and synthesis
186
+ - gate/check/review loops
187
+ - judge registry, presets, configs, results, and comparisons
188
+ - workflow and control-plane inspection commands
189
+
190
+ TypeScript still has a few extra convenience wrappers, but the core control-plane model is shared.
191
+
192
+ For broader product context, see:
193
+
194
+ - [Root README](../../../README.md)
195
+ - [Integration reference](../../app/docs/integration/page.tsx)
196
+ - [SDK parity guide](../../app/docs/sdk-parity/page.tsx)
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "evalgate-sdk"
7
- version = "3.3.1"
7
+ version = "3.5.1"
8
8
  description = "EvalGate Python SDK — CI for AI behavior. Traces, evaluations, assertions, and regression gates for LLM apps."
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -31,6 +31,8 @@ classifiers = [
31
31
  dependencies = [
32
32
  "httpx>=0.27,<1",
33
33
  "pydantic>=2.0,<3",
34
+ "rich>=13",
35
+ "typer>=0.12",
34
36
  ]
35
37
 
36
38
  [project.optional-dependencies]
@@ -66,6 +68,8 @@ packages = ["src/evalgate_sdk"]
66
68
  [tool.pytest.ini_options]
67
69
  testpaths = ["tests"]
68
70
  asyncio_mode = "auto"
71
+ asyncio_default_fixture_loop_scope = "function"
72
+ pythonpath = ["src"]
69
73
 
70
74
  [tool.ruff]
71
75
  target-version = "py310"
@@ -76,5 +80,5 @@ select = ["E", "F", "I", "UP", "B", "SIM"]
76
80
 
77
81
  [tool.mypy]
78
82
  python_version = "3.10"
79
- strict = true
80
- warn_return_any = true
83
+ strict = false
84
+ warn_return_any = false