agentx-python 0.8.13__tar.gz → 0.8.15__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. {agentx_python-0.8.13 → agentx_python-0.8.15}/PKG-INFO +22 -13
  2. {agentx_python-0.8.13 → agentx_python-0.8.15}/README.md +19 -11
  3. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/integrations/anthropic.py +1 -1
  4. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/integrations/crewai.py +1 -1
  5. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/monitor/client.py +27 -2
  6. agentx_python-0.8.15/agentx/monitor/improvement_groups.py +76 -0
  7. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/monitor/judge_scorers.py +10 -2
  8. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/version.py +2 -2
  9. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx_python.egg-info/PKG-INFO +22 -13
  10. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx_python.egg-info/SOURCES.txt +2 -0
  11. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx_python.egg-info/requires.txt +1 -0
  12. {agentx_python-0.8.13 → agentx_python-0.8.15}/setup.py +2 -1
  13. agentx_python-0.8.15/tests/test_selfhost_compat.py +424 -0
  14. {agentx_python-0.8.13 → agentx_python-0.8.15}/LICENSE +0 -0
  15. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/__init__.py +0 -0
  16. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/agentx.py +0 -0
  17. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/cli.py +0 -0
  18. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/evaluations/__init__.py +0 -0
  19. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/evaluations/_term.py +0 -0
  20. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/evaluations/adapters/__init__.py +0 -0
  21. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/evaluations/adapters/http_endpoint.py +0 -0
  22. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/evaluations/adapters/precomputed.py +0 -0
  23. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/evaluations/adapters/raw.py +0 -0
  24. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/evaluations/client.py +0 -0
  25. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/evaluations/datasets.py +0 -0
  26. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/evaluations/evaluation_settings.py +0 -0
  27. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/evaluations/models.py +0 -0
  28. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/evaluations/prompts.py +0 -0
  29. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/evaluations/reporting.py +0 -0
  30. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/evaluations/results.py +0 -0
  31. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/evaluations/runner.py +0 -0
  32. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/evaluations/tool_schemas.py +0 -0
  33. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/evaluations/tracing.py +0 -0
  34. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/exceptions.py +0 -0
  35. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/export.py +0 -0
  36. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/feedback.py +0 -0
  37. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/integrations/__init__.py +0 -0
  38. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/integrations/_traced_call.py +0 -0
  39. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/integrations/autogen.py +0 -0
  40. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/integrations/databricks.py +0 -0
  41. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/integrations/google_adk.py +0 -0
  42. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/integrations/google_genai.py +0 -0
  43. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/integrations/langchain.py +0 -0
  44. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/integrations/litellm.py +0 -0
  45. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/integrations/llamaindex.py +0 -0
  46. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/integrations/moveworks.py +0 -0
  47. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/integrations/openai.py +0 -0
  48. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/integrations/openai_agents.py +0 -0
  49. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/monitor/__init__.py +0 -0
  50. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/monitor/agents.py +0 -0
  51. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/monitor/models.py +0 -0
  52. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/monitor/online_evaluators.py +0 -0
  53. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/monitor/patterns.py +0 -0
  54. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/monitor/profile.py +0 -0
  55. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/monitor/review_queue.py +0 -0
  56. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/monitor/rules.py +0 -0
  57. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/monitor/scorers.py +0 -0
  58. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/monitor/sessions.py +0 -0
  59. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/monitor/signals.py +0 -0
  60. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/outcomes.py +0 -0
  61. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/projects.py +0 -0
  62. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/py.typed +0 -0
  63. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/resources/__init__.py +0 -0
  64. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/resources/agent.py +0 -0
  65. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/resources/conversation.py +0 -0
  66. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/resources/workforce.py +0 -0
  67. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/testing.py +0 -0
  68. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/traces.py +0 -0
  69. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/tracing/__init__.py +0 -0
  70. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/tracing/ci_types.py +0 -0
  71. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/tracing/eval_scope.py +0 -0
  72. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/tracing/framework_detect.py +0 -0
  73. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/tracing/ingest_client.py +0 -0
  74. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/tracing/tracer.py +0 -0
  75. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx/util.py +0 -0
  76. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx_python.egg-info/dependency_links.txt +0 -0
  77. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx_python.egg-info/entry_points.txt +0 -0
  78. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx_python.egg-info/not-zip-safe +0 -0
  79. {agentx_python-0.8.13 → agentx_python-0.8.15}/agentx_python.egg-info/top_level.txt +0 -0
  80. {agentx_python-0.8.13 → agentx_python-0.8.15}/setup.cfg +0 -0
  81. {agentx_python-0.8.13 → agentx_python-0.8.15}/tests/test_cli_launcher.py +0 -0
  82. {agentx_python-0.8.13 → agentx_python-0.8.15}/tests/test_deep_dive_fixes.py +0 -0
  83. {agentx_python-0.8.13 → agentx_python-0.8.15}/tests/test_docs_match_sdk.py +0 -0
  84. {agentx_python-0.8.13 → agentx_python-0.8.15}/tests/test_eval_scope.py +0 -0
  85. {agentx_python-0.8.13 → agentx_python-0.8.15}/tests/test_framework_detect.py +0 -0
  86. {agentx_python-0.8.13 → agentx_python-0.8.15}/tests/test_integration.py +0 -0
  87. {agentx_python-0.8.13 → agentx_python-0.8.15}/tests/test_integrations.py +0 -0
  88. {agentx_python-0.8.13 → agentx_python-0.8.15}/tests/test_judge_scorers.py +0 -0
  89. {agentx_python-0.8.13 → agentx_python-0.8.15}/tests/test_pairwise.py +0 -0
  90. {agentx_python-0.8.13 → agentx_python-0.8.15}/tests/test_review_queue.py +0 -0
  91. {agentx_python-0.8.13 → agentx_python-0.8.15}/tests/test_runner_features.py +0 -0
  92. {agentx_python-0.8.13 → agentx_python-0.8.15}/tests/test_selfhost_analysis_fallback.py +0 -0
  93. {agentx_python-0.8.13 → agentx_python-0.8.15}/tests/test_span_tree.py +0 -0
  94. {agentx_python-0.8.13 → agentx_python-0.8.15}/tests/test_testing.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentx-python
3
- Version: 0.8.13
3
+ Version: 0.8.15
4
4
  Summary: Official Python SDK for AgentX (https://www.agentx.so/)
5
5
  Home-page: https://github.com/AgentX-ai/AgentX-python
6
6
  Author: Robin Wang and AgentX Team
@@ -8,7 +8,7 @@ Author-email: contact@agentx.so
8
8
  Classifier: Programming Language :: Python :: 3
9
9
  Classifier: License :: OSI Approved :: Apache Software License
10
10
  Classifier: Operating System :: OS Independent
11
- Requires-Python: >=3.6
11
+ Requires-Python: >=3.9
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
14
  Requires-Dist: urllib3>=1.26.11
@@ -50,6 +50,7 @@ Requires-Dist: litellm>=1.0.0; extra == "all"
50
50
  Requires-Dist: llama-index-core>=0.10.0; extra == "all"
51
51
  Requires-Dist: autogen-agentchat>=0.4.0; extra == "all"
52
52
  Requires-Dist: autogen-core>=0.4.0; extra == "all"
53
+ Requires-Dist: mlflow>=3.6.0; extra == "all"
53
54
  Dynamic: author
54
55
  Dynamic: author-email
55
56
  Dynamic: classifier
@@ -109,12 +110,14 @@ pip install --upgrade agentx-python
109
110
 
110
111
  Requires Python 3.9 or newer.
111
112
 
112
- #### Run self host eval framework locally
113
+ #### Run the self-host governance suite locally
113
114
 
114
- ```
115
- agentx-trace-eval --dev --update
115
+ ```bash
116
+ agentx-trace-eval --dev
116
117
  ```
117
118
 
119
+ (See [Self-host](#self-host) below for what this downloads and how to point the SDK at it.)
120
+
118
121
  ---
119
122
 
120
123
  ## Quick start
@@ -137,7 +140,7 @@ report = (
137
140
  .analyze()
138
141
  )
139
142
 
140
- print(report.average_rating) # LLM-graded score, 010
143
+ print(report.average_rating) # LLM-graded score, 0-10
141
144
  print(report.summary) # AI-generated narrative from .analyze()
142
145
  ```
143
146
 
@@ -158,9 +161,9 @@ report = (
158
161
  .analyze()
159
162
  )
160
163
 
161
- print(report.average_rating) # LLM-graded score, 010
162
- print(report.cosine_similarity) # embedding cosine, 01 (None if not enabled)
163
- print(report.jaccard_similarity) # token-set overlap, 01 (None if not enabled)
164
+ print(report.average_rating) # LLM-graded score, 0-10
165
+ print(report.cosine_similarity) # embedding cosine, 0-1 (None if not enabled)
166
+ print(report.jaccard_similarity) # token-set overlap, 0-1 (None if not enabled)
164
167
 
165
168
  print(report.summary) # AI-generated narrative from .analyze()
166
169
  print(report.recommendations) # list of prioritized, actionable fixes
@@ -184,7 +187,7 @@ client.evaluations.run(
184
187
 
185
188
  See [Prompt registry](EVALUATIONS.md#prompt-registry) in the full guide, or [self-host's docs](https://docs.agentx.so/improve/prompt-management) for the "Suggest improvement" dashboard flow (self-host only - no hosted-SaaS equivalent yet).
186
189
 
187
- On self-host, a finalized run can also **gate a CI job**: `run.gate(fail_under=7, no_regression=True)` (on the run context `.execute()` returns) checks the run's average rating against an absolute floor and/or the dataset's previous run, prints per-check verdicts into the CI log, and returns an exit code - `sys.exit(gate.exit_code)` blocks the merge on regression. Recorded gates appear in the dashboard's CI Gates tab. See [self-host's CI docs](https://docs.agentx.so/integrations/self-host-ci) for the GitHub Actions recipe.
190
+ On self-host, a finalized run can also **gate a CI job**: `run.gate(fail_under=7, no_regression=True)` (on the run context `.execute()` returns) checks the run's average rating against an absolute floor and/or the dataset's previous run, prints per-check verdicts into the CI log, and returns a `GateResult` - `sys.exit(gate.exit_code)` blocks the merge on regression. Recorded gates appear in the dashboard's CI Gates tab. See [self-host's CI docs](https://docs.agentx.so/integrations/self-host-ci) for the GitHub Actions recipe.
188
191
 
189
192
  See **[EVALUATIONS.md](EVALUATIONS.md)** for the full guide - dataset builder, framework adapters, similarity metrics, smoke testing, judge configuration, prompt registry, and the complete API reference.
190
193
 
@@ -252,6 +255,10 @@ extra:
252
255
  | LlamaIndex | `pip install "agentx-python[llamaindex]"` | `AgentXLlamaIndexHandler` |
253
256
  | AutoGen | `pip install "agentx-python[autogen]"` | `AgentXAutoGenObserver` |
254
257
 
258
+ Two more platforms are covered by **pull importers** rather than in-process hooks, each with its
259
+ own CLI: `agentx-moveworks` (Moveworks Data API sync, no extra needed) and `agentx-databricks`
260
+ (`pip install "agentx-python[databricks]"`, MLflow/Databricks trace sync).
261
+
255
262
  Or plain Python - wrap any function with `@tracer.trace(...)` and it just works, no framework
256
263
  required. Tracing is **platform agnostic**: each integration stamps its platform label
257
264
  automatically, a plain trace auto-detects the one orchestration framework imported in the
@@ -292,12 +299,14 @@ for signal in client.monitor.signals.list(severity="high"):
292
299
  print(signal.summary, signal.occurrence_count)
293
300
  ```
294
301
 
295
- Per-agent coverage/threshold settings (sample rate, retention, and threshold overrides like the built-in "Latency regression" pattern's threshold) are `client.monitor.profile.get()`/`.update()`:
302
+ Per-agent monitoring settings (enable/disable, detection categories, notification channels) are `client.monitor.profile.get()`/`.update()`:
296
303
 
297
304
  ```python
298
- client.monitor.profile.update("agent_123", threshold_overrides={"latencyMs": 15000})
305
+ client.monitor.profile.update("agent_123", info_detection_enabled=False)
299
306
  ```
300
307
 
308
+ On self-host, coverage mode, sample rate, retention, and the built-in latency threshold are project-level defaults set in the dashboard's Platform Settings; `update()` still accepts them for wire compatibility, but only the per-agent fields above take effect there.
309
+
301
310
  Self-host also has **online evaluators**: a real LLM judge scoring a sample of live traffic continuously, distinct from a pattern's rule-matching. A score below `alert_threshold` raises a signal the same way a failing pattern does, deduped and triage-ready in `client.monitor.signals`.
302
311
 
303
312
  ```python
@@ -371,7 +380,7 @@ export AGENTX_API_BASE_URL=http://localhost:4700/api/v1
371
380
  export AGENTX_API_KEY=<printed by agentx-trace-eval on first run>
372
381
  ```
373
382
 
374
- `agentx-trace-eval` isn't this SDK's own code - the engine itself is a separate, compiled binary, downloaded on demand rather than bundled into this package, so installing `agentx-python` doesn't get any heavier for the (much more common) case of just talking to the hosted AgentX API. See that repo's README for what's included, and `AGENTX_INSTALL_DIR`/`AGENTX_TRACE_EVAL_VERSION`/`AGENTX_TRACE_EVAL_SKIP_WEB` env vars to control where/what it installs.
383
+ `agentx-trace-eval` isn't this SDK's own code - the engine itself is a separate, compiled binary, downloaded on demand rather than bundled into this package, so installing `agentx-python` doesn't get any heavier for the (much more common) case of just talking to the hosted AgentX API. Each SDK release pins the engine release it was tested against and converges the install to that pin, so upgrading the SDK upgrades the engine too. Two flags to know: `--update` (consumed by this launcher) force-reinstalls the resolved engine release, while `--upgrade` passes through to `agentx-server` and re-downloads the dashboard bundle before serving. See that repo's README for what's included, and the `AGENTX_INSTALL_DIR`/`AGENTX_TRACE_EVAL_VERSION`/`AGENTX_TRACE_EVAL_SKIP_WEB` env vars to control where/what it installs.
375
384
 
376
385
  ---
377
386
 
@@ -45,12 +45,14 @@ pip install --upgrade agentx-python
45
45
 
46
46
  Requires Python 3.9 or newer.
47
47
 
48
- #### Run self host eval framework locally
48
+ #### Run the self-host governance suite locally
49
49
 
50
- ```
51
- agentx-trace-eval --dev --update
50
+ ```bash
51
+ agentx-trace-eval --dev
52
52
  ```
53
53
 
54
+ (See [Self-host](#self-host) below for what this downloads and how to point the SDK at it.)
55
+
54
56
  ---
55
57
 
56
58
  ## Quick start
@@ -73,7 +75,7 @@ report = (
73
75
  .analyze()
74
76
  )
75
77
 
76
- print(report.average_rating) # LLM-graded score, 010
78
+ print(report.average_rating) # LLM-graded score, 0-10
77
79
  print(report.summary) # AI-generated narrative from .analyze()
78
80
  ```
79
81
 
@@ -94,9 +96,9 @@ report = (
94
96
  .analyze()
95
97
  )
96
98
 
97
- print(report.average_rating) # LLM-graded score, 010
98
- print(report.cosine_similarity) # embedding cosine, 01 (None if not enabled)
99
- print(report.jaccard_similarity) # token-set overlap, 01 (None if not enabled)
99
+ print(report.average_rating) # LLM-graded score, 0-10
100
+ print(report.cosine_similarity) # embedding cosine, 0-1 (None if not enabled)
101
+ print(report.jaccard_similarity) # token-set overlap, 0-1 (None if not enabled)
100
102
 
101
103
  print(report.summary) # AI-generated narrative from .analyze()
102
104
  print(report.recommendations) # list of prioritized, actionable fixes
@@ -120,7 +122,7 @@ client.evaluations.run(
120
122
 
121
123
  See [Prompt registry](EVALUATIONS.md#prompt-registry) in the full guide, or [self-host's docs](https://docs.agentx.so/improve/prompt-management) for the "Suggest improvement" dashboard flow (self-host only - no hosted-SaaS equivalent yet).
122
124
 
123
- On self-host, a finalized run can also **gate a CI job**: `run.gate(fail_under=7, no_regression=True)` (on the run context `.execute()` returns) checks the run's average rating against an absolute floor and/or the dataset's previous run, prints per-check verdicts into the CI log, and returns an exit code - `sys.exit(gate.exit_code)` blocks the merge on regression. Recorded gates appear in the dashboard's CI Gates tab. See [self-host's CI docs](https://docs.agentx.so/integrations/self-host-ci) for the GitHub Actions recipe.
125
+ On self-host, a finalized run can also **gate a CI job**: `run.gate(fail_under=7, no_regression=True)` (on the run context `.execute()` returns) checks the run's average rating against an absolute floor and/or the dataset's previous run, prints per-check verdicts into the CI log, and returns a `GateResult` - `sys.exit(gate.exit_code)` blocks the merge on regression. Recorded gates appear in the dashboard's CI Gates tab. See [self-host's CI docs](https://docs.agentx.so/integrations/self-host-ci) for the GitHub Actions recipe.
124
126
 
125
127
  See **[EVALUATIONS.md](EVALUATIONS.md)** for the full guide - dataset builder, framework adapters, similarity metrics, smoke testing, judge configuration, prompt registry, and the complete API reference.
126
128
 
@@ -188,6 +190,10 @@ extra:
188
190
  | LlamaIndex | `pip install "agentx-python[llamaindex]"` | `AgentXLlamaIndexHandler` |
189
191
  | AutoGen | `pip install "agentx-python[autogen]"` | `AgentXAutoGenObserver` |
190
192
 
193
+ Two more platforms are covered by **pull importers** rather than in-process hooks, each with its
194
+ own CLI: `agentx-moveworks` (Moveworks Data API sync, no extra needed) and `agentx-databricks`
195
+ (`pip install "agentx-python[databricks]"`, MLflow/Databricks trace sync).
196
+
191
197
  Or plain Python - wrap any function with `@tracer.trace(...)` and it just works, no framework
192
198
  required. Tracing is **platform agnostic**: each integration stamps its platform label
193
199
  automatically, a plain trace auto-detects the one orchestration framework imported in the
@@ -228,12 +234,14 @@ for signal in client.monitor.signals.list(severity="high"):
228
234
  print(signal.summary, signal.occurrence_count)
229
235
  ```
230
236
 
231
- Per-agent coverage/threshold settings (sample rate, retention, and threshold overrides like the built-in "Latency regression" pattern's threshold) are `client.monitor.profile.get()`/`.update()`:
237
+ Per-agent monitoring settings (enable/disable, detection categories, notification channels) are `client.monitor.profile.get()`/`.update()`:
232
238
 
233
239
  ```python
234
- client.monitor.profile.update("agent_123", threshold_overrides={"latencyMs": 15000})
240
+ client.monitor.profile.update("agent_123", info_detection_enabled=False)
235
241
  ```
236
242
 
243
+ On self-host, coverage mode, sample rate, retention, and the built-in latency threshold are project-level defaults set in the dashboard's Platform Settings; `update()` still accepts them for wire compatibility, but only the per-agent fields above take effect there.
244
+
237
245
  Self-host also has **online evaluators**: a real LLM judge scoring a sample of live traffic continuously, distinct from a pattern's rule-matching. A score below `alert_threshold` raises a signal the same way a failing pattern does, deduped and triage-ready in `client.monitor.signals`.
238
246
 
239
247
  ```python
@@ -307,7 +315,7 @@ export AGENTX_API_BASE_URL=http://localhost:4700/api/v1
307
315
  export AGENTX_API_KEY=<printed by agentx-trace-eval on first run>
308
316
  ```
309
317
 
310
- `agentx-trace-eval` isn't this SDK's own code - the engine itself is a separate, compiled binary, downloaded on demand rather than bundled into this package, so installing `agentx-python` doesn't get any heavier for the (much more common) case of just talking to the hosted AgentX API. See that repo's README for what's included, and `AGENTX_INSTALL_DIR`/`AGENTX_TRACE_EVAL_VERSION`/`AGENTX_TRACE_EVAL_SKIP_WEB` env vars to control where/what it installs.
318
+ `agentx-trace-eval` isn't this SDK's own code - the engine itself is a separate, compiled binary, downloaded on demand rather than bundled into this package, so installing `agentx-python` doesn't get any heavier for the (much more common) case of just talking to the hosted AgentX API. Each SDK release pins the engine release it was tested against and converges the install to that pin, so upgrading the SDK upgrades the engine too. Two flags to know: `--update` (consumed by this launcher) force-reinstalls the resolved engine release, while `--upgrade` passes through to `agentx-server` and re-downloads the dashboard bundle before serving. See that repo's README for what's included, and the `AGENTX_INSTALL_DIR`/`AGENTX_TRACE_EVAL_VERSION`/`AGENTX_TRACE_EVAL_SKIP_WEB` env vars to control where/what it installs.
311
319
 
312
320
  ---
313
321
 
@@ -13,7 +13,7 @@ Usage::
13
13
 
14
14
  Works with both ``anthropic.Anthropic`` and ``anthropic.AsyncAnthropic`` clients.
15
15
 
16
- Requires: ``pip install agentx[anthropic]``
16
+ Requires: ``pip install "agentx-python[anthropic]"``
17
17
  """
18
18
  from __future__ import annotations
19
19
 
@@ -14,7 +14,7 @@ Or as a context manager around your own kickoff::
14
14
  result = crew.kickoff(inputs={"topic": "AI"})
15
15
  span.output = result.raw
16
16
 
17
- Requires: ``pip install agentx[crewai]``
17
+ Requires: ``pip install "agentx-python[crewai]"``
18
18
  """
19
19
  from __future__ import annotations
20
20
 
@@ -67,6 +67,22 @@ class CalibrationSummary(dict):
67
67
  def review_label_count(self) -> int:
68
68
  return int(self.get("reviewLabelCount") or 0)
69
69
 
70
+ @property
71
+ def alpha(self):
72
+ """Chance-corrected agreement (Krippendorff's alpha over the binary verdict pair) -
73
+ the raw ``agreement_rate`` corrected for what a weighted coin would score on this
74
+ label mix. ``None`` below the server's sample floor (``alphaMinItems`` labeled pairs)
75
+ or when every label is identical: withheld, never fabricated. 1 = perfect, 0 = no
76
+ better than chance, negative = systematically opposed."""
77
+ return self.get("alpha")
78
+
79
+ @property
80
+ def alpha_band(self):
81
+ """Human-readable band for ``alpha`` (poor/slight/fair/moderate/substantial/
82
+ near-perfect), computed server-side so every surface reads the same alpha the
83
+ same way."""
84
+ return self.get("alphaBand")
85
+
70
86
 
71
87
  class MonitorClient:
72
88
  """Low-level HTTP client for the Monitor API (``/monitor``). Accessed via
@@ -131,6 +147,11 @@ class MonitorClient:
131
147
  # surface that matches the product; evaluations.settings and online_evaluators below
132
148
  # remain as its profile-level views.
133
149
  self.judge_scorers = JudgeScorersClient(api_key=api_key, base_url=self._api_root())
150
+ from agentx.monitor.improvement_groups import ImprovementGroupsClient
151
+
152
+ # Auto-improve: confirmed production failures -> improvement report -> code fix (via
153
+ # the AgentX-Eval-Skill auto-improve skill). Self-host only.
154
+ self.improvement_groups = ImprovementGroupsClient(api_key=api_key, base_url=self._api_root())
134
155
  self.profile = MonitorProfileClient(self)
135
156
  # Legacy view of an LLM Judge Scorer's online profile - constructed lazily so its
136
157
  # DeprecationWarning fires on first USE, not for every client that never touches it.
@@ -317,8 +338,12 @@ class MonitorClient:
317
338
  AgentX's own verdicts agreed with real-world ground truth reported later (ops outcomes
318
339
  via ``client.outcomes``, end-user downvotes, and human review labels). Returns the
319
340
  dashboard's Judge Calibration numbers with these exact keys: ``comparedCount``,
320
- ``agreementRate``, ``falsePositiveRate``, ``falseNegativeRate`` (plus
321
- ``reportedCount``/``reviewLabelCount``/``noVerdictCount``). Per-scorer calibration
341
+ ``agreementRate``, ``falsePositiveRate``, ``falseNegativeRate``, ``alpha``,
342
+ ``alphaBand``, ``alphaMinItems`` (plus
343
+ ``reportedCount``/``reviewLabelCount``/``noVerdictCount``). ``agreementRate`` is raw
344
+ agreement and inflates under class imbalance; ``alpha`` is the chance-corrected
345
+ version (Krippendorff's alpha - null until ``alphaMinItems`` labeled pairs exist).
346
+ Per-scorer calibration
322
347
  lives on ``client.monitor.judge_scorers.calibration(scorer_id)``."""
323
348
  return CalibrationSummary(
324
349
  self._request(
@@ -0,0 +1,76 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Any, Dict, List, Optional
4
+
5
+ import requests
6
+
7
+ from agentx.util import api_base, get_headers
8
+
9
+
10
+ class AgentXImprovementGroupsError(Exception):
11
+ pass
12
+
13
+
14
+ class ImprovementGroupsClient:
15
+ """Surfaced as ``client.monitor.improvement_groups``: the auto-improve loop's accumulator.
16
+
17
+ Batch lifecycle: one COLLECTING group at a time. Every Confirm verdict in signal review
18
+ automatically lands the confirmed failure there - accumulation is free, declining is
19
+ choosing Ignore. ``generate_report`` SPENDS the batch: one LLM pass clusters the confirmed
20
+ failures into issues with recommendations, the group is sealed onto that report (keeping
21
+ exactly its source cases), and the pending accumulator is thereby cleared - the next
22
+ Confirm starts a fresh batch, and the next generate makes a new report from it. The report's id is the
23
+ hand-off: paste it into the AgentX-Eval-Skill ``auto-improve`` skill, which fetches the
24
+ report (``get_report``) and triages the fixes against your agent's actual source code.
25
+
26
+ Evidence here is exclusively ONLINE - production verdicts a human confirmed - never
27
+ offline dataset runs. Self-host only.
28
+ """
29
+
30
+ def __init__(self, api_key: Optional[str] = None, base_url: Optional[str] = None):
31
+ self._api_key = api_key
32
+ self._base_url = (base_url or api_base()).rstrip("/")
33
+
34
+ def _request(self, method: str, path: str, json: Any = None, timeout: int = 120) -> Any:
35
+ resp = requests.request(
36
+ method,
37
+ f"{self._base_url}/agent-monitoring{path}",
38
+ headers={**get_headers(self._api_key), "Content-Type": "application/json"},
39
+ json=json,
40
+ timeout=timeout,
41
+ )
42
+ if resp.status_code >= 400:
43
+ try:
44
+ detail = resp.json().get("error", resp.reason)
45
+ except ValueError:
46
+ detail = resp.reason
47
+ raise AgentXImprovementGroupsError(f"Improvement group request failed ({resp.status_code}): {detail}")
48
+ return resp.json() if resp.text else {}
49
+
50
+ def list(self) -> List[Dict[str, Any]]:
51
+ return self._request("GET", "/improvement-groups").get("improvementGroups", [])
52
+
53
+ def get(self, group_id: str) -> Dict[str, Any]:
54
+ """The group with its members - each a confirmed failure's evidence snapshot."""
55
+ return self._request("GET", f"/improvement-groups/{group_id}")["improvementGroup"]
56
+
57
+ def remove_member(self, group_id: str, member_id: str) -> None:
58
+ """Prune a member before spending the group (a confirm that turned out uninteresting)."""
59
+ self._request("DELETE", f"/improvement-groups/{group_id}/members/{member_id}")
60
+
61
+ def generate_report(self, group_id: str, model: Optional[str] = None) -> Dict[str, Any]:
62
+ """Spend the group: one real LLM call clustering the confirmed failures into issues
63
+ with recommendations. Returns the report; its ``_id`` is what the auto-improve skill
64
+ takes. Explicit and billed - never called implicitly."""
65
+ payload: Dict[str, Any] = {}
66
+ if model is not None:
67
+ payload["model"] = model
68
+ return self._request("POST", f"/improvement-groups/{group_id}/report", json=payload, timeout=300)["report"]
69
+
70
+ def list_reports(self) -> List[Dict[str, Any]]:
71
+ return self._request("GET", "/improvement-reports").get("improvementReports", [])
72
+
73
+ def get_report(self, report_id: str) -> Dict[str, Any]:
74
+ """Fetch a report by the id the dashboard (or generate_report) handed out - the exact
75
+ call the auto-improve skill makes."""
76
+ return self._request("GET", f"/improvement-reports/{report_id}")["report"]
@@ -258,11 +258,19 @@ class JudgeScorersClient:
258
258
 
259
259
  def calibration(self, scorer_id: str, window: str = "7d") -> dict:
260
260
  """How this scorer's verdicts compare against recorded ground truth (triage
261
- corrections, outcomes, end-user votes) over the window."""
261
+ corrections, outcomes, end-user votes) over the window. Beyond the raw
262
+ ``agreementRate``, the response carries ``alpha``/``alphaBand`` (chance-corrected
263
+ agreement - Krippendorff's alpha, null until ``alphaMinItems`` labeled pairs exist)
264
+ and ``ratingMae`` (mean absolute error against human re-scores, over the
265
+ ``withCorrectedScore`` pairs that carry a number). ``window`` accepts "24h", "7d",
266
+ "30d", or "rubric" - only verdicts produced by the CURRENT rubric (since its criteria
267
+ were last edited, clamped to 30 days), which is what the dashboard's Tune Judge flow
268
+ uses by default; the response's ``window``/``since`` echo the boundary applied."""
262
269
  return self._request("GET", f"/online-evaluators/{self._profile_id(scorer_id)}/calibration?window={window}")
263
270
 
264
271
  def tune(self, scorer_id: str, window: str = "7d") -> dict:
265
- """Propose a rewrite of the rubric from calibration disagreements (LLM call, slow)."""
272
+ """Propose a rewrite of the rubric from calibration disagreements (LLM call, slow).
273
+ ``window`` accepts the same values as :meth:`calibration`, including "rubric"."""
266
274
  data = self._request(
267
275
  "POST", f"/online-evaluators/{self._profile_id(scorer_id)}/tune", json={"window": window}, timeout=300
268
276
  )
@@ -1,7 +1,7 @@
1
- VERSION = "0.8.13"
1
+ VERSION = "0.8.15"
2
2
 
3
3
  # The AgentX-trace-eval release this SDK version is tested against - what `agentx-trace-eval`
4
4
  # installs and converges to (see agentx/cli.py). Bump together with VERSION when releasing, so
5
5
  # every published SDK names a known-good engine+dashboard pair. Users can override with
6
6
  # AGENTX_TRACE_EVAL_VERSION=<tag|latest>.
7
- ENGINE_VERSION = "v0.3.7"
7
+ ENGINE_VERSION = "v0.3.11"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentx-python
3
- Version: 0.8.13
3
+ Version: 0.8.15
4
4
  Summary: Official Python SDK for AgentX (https://www.agentx.so/)
5
5
  Home-page: https://github.com/AgentX-ai/AgentX-python
6
6
  Author: Robin Wang and AgentX Team
@@ -8,7 +8,7 @@ Author-email: contact@agentx.so
8
8
  Classifier: Programming Language :: Python :: 3
9
9
  Classifier: License :: OSI Approved :: Apache Software License
10
10
  Classifier: Operating System :: OS Independent
11
- Requires-Python: >=3.6
11
+ Requires-Python: >=3.9
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
14
  Requires-Dist: urllib3>=1.26.11
@@ -50,6 +50,7 @@ Requires-Dist: litellm>=1.0.0; extra == "all"
50
50
  Requires-Dist: llama-index-core>=0.10.0; extra == "all"
51
51
  Requires-Dist: autogen-agentchat>=0.4.0; extra == "all"
52
52
  Requires-Dist: autogen-core>=0.4.0; extra == "all"
53
+ Requires-Dist: mlflow>=3.6.0; extra == "all"
53
54
  Dynamic: author
54
55
  Dynamic: author-email
55
56
  Dynamic: classifier
@@ -109,12 +110,14 @@ pip install --upgrade agentx-python
109
110
 
110
111
  Requires Python 3.9 or newer.
111
112
 
112
- #### Run self host eval framework locally
113
+ #### Run the self-host governance suite locally
113
114
 
114
- ```
115
- agentx-trace-eval --dev --update
115
+ ```bash
116
+ agentx-trace-eval --dev
116
117
  ```
117
118
 
119
+ (See [Self-host](#self-host) below for what this downloads and how to point the SDK at it.)
120
+
118
121
  ---
119
122
 
120
123
  ## Quick start
@@ -137,7 +140,7 @@ report = (
137
140
  .analyze()
138
141
  )
139
142
 
140
- print(report.average_rating) # LLM-graded score, 010
143
+ print(report.average_rating) # LLM-graded score, 0-10
141
144
  print(report.summary) # AI-generated narrative from .analyze()
142
145
  ```
143
146
 
@@ -158,9 +161,9 @@ report = (
158
161
  .analyze()
159
162
  )
160
163
 
161
- print(report.average_rating) # LLM-graded score, 010
162
- print(report.cosine_similarity) # embedding cosine, 01 (None if not enabled)
163
- print(report.jaccard_similarity) # token-set overlap, 01 (None if not enabled)
164
+ print(report.average_rating) # LLM-graded score, 0-10
165
+ print(report.cosine_similarity) # embedding cosine, 0-1 (None if not enabled)
166
+ print(report.jaccard_similarity) # token-set overlap, 0-1 (None if not enabled)
164
167
 
165
168
  print(report.summary) # AI-generated narrative from .analyze()
166
169
  print(report.recommendations) # list of prioritized, actionable fixes
@@ -184,7 +187,7 @@ client.evaluations.run(
184
187
 
185
188
  See [Prompt registry](EVALUATIONS.md#prompt-registry) in the full guide, or [self-host's docs](https://docs.agentx.so/improve/prompt-management) for the "Suggest improvement" dashboard flow (self-host only - no hosted-SaaS equivalent yet).
186
189
 
187
- On self-host, a finalized run can also **gate a CI job**: `run.gate(fail_under=7, no_regression=True)` (on the run context `.execute()` returns) checks the run's average rating against an absolute floor and/or the dataset's previous run, prints per-check verdicts into the CI log, and returns an exit code - `sys.exit(gate.exit_code)` blocks the merge on regression. Recorded gates appear in the dashboard's CI Gates tab. See [self-host's CI docs](https://docs.agentx.so/integrations/self-host-ci) for the GitHub Actions recipe.
190
+ On self-host, a finalized run can also **gate a CI job**: `run.gate(fail_under=7, no_regression=True)` (on the run context `.execute()` returns) checks the run's average rating against an absolute floor and/or the dataset's previous run, prints per-check verdicts into the CI log, and returns a `GateResult` - `sys.exit(gate.exit_code)` blocks the merge on regression. Recorded gates appear in the dashboard's CI Gates tab. See [self-host's CI docs](https://docs.agentx.so/integrations/self-host-ci) for the GitHub Actions recipe.
188
191
 
189
192
  See **[EVALUATIONS.md](EVALUATIONS.md)** for the full guide - dataset builder, framework adapters, similarity metrics, smoke testing, judge configuration, prompt registry, and the complete API reference.
190
193
 
@@ -252,6 +255,10 @@ extra:
252
255
  | LlamaIndex | `pip install "agentx-python[llamaindex]"` | `AgentXLlamaIndexHandler` |
253
256
  | AutoGen | `pip install "agentx-python[autogen]"` | `AgentXAutoGenObserver` |
254
257
 
258
+ Two more platforms are covered by **pull importers** rather than in-process hooks, each with its
259
+ own CLI: `agentx-moveworks` (Moveworks Data API sync, no extra needed) and `agentx-databricks`
260
+ (`pip install "agentx-python[databricks]"`, MLflow/Databricks trace sync).
261
+
255
262
  Or plain Python - wrap any function with `@tracer.trace(...)` and it just works, no framework
256
263
  required. Tracing is **platform agnostic**: each integration stamps its platform label
257
264
  automatically, a plain trace auto-detects the one orchestration framework imported in the
@@ -292,12 +299,14 @@ for signal in client.monitor.signals.list(severity="high"):
292
299
  print(signal.summary, signal.occurrence_count)
293
300
  ```
294
301
 
295
- Per-agent coverage/threshold settings (sample rate, retention, and threshold overrides like the built-in "Latency regression" pattern's threshold) are `client.monitor.profile.get()`/`.update()`:
302
+ Per-agent monitoring settings (enable/disable, detection categories, notification channels) are `client.monitor.profile.get()`/`.update()`:
296
303
 
297
304
  ```python
298
- client.monitor.profile.update("agent_123", threshold_overrides={"latencyMs": 15000})
305
+ client.monitor.profile.update("agent_123", info_detection_enabled=False)
299
306
  ```
300
307
 
308
+ On self-host, coverage mode, sample rate, retention, and the built-in latency threshold are project-level defaults set in the dashboard's Platform Settings; `update()` still accepts them for wire compatibility, but only the per-agent fields above take effect there.
309
+
301
310
  Self-host also has **online evaluators**: a real LLM judge scoring a sample of live traffic continuously, distinct from a pattern's rule-matching. A score below `alert_threshold` raises a signal the same way a failing pattern does, deduped and triage-ready in `client.monitor.signals`.
302
311
 
303
312
  ```python
@@ -371,7 +380,7 @@ export AGENTX_API_BASE_URL=http://localhost:4700/api/v1
371
380
  export AGENTX_API_KEY=<printed by agentx-trace-eval on first run>
372
381
  ```
373
382
 
374
- `agentx-trace-eval` isn't this SDK's own code - the engine itself is a separate, compiled binary, downloaded on demand rather than bundled into this package, so installing `agentx-python` doesn't get any heavier for the (much more common) case of just talking to the hosted AgentX API. See that repo's README for what's included, and `AGENTX_INSTALL_DIR`/`AGENTX_TRACE_EVAL_VERSION`/`AGENTX_TRACE_EVAL_SKIP_WEB` env vars to control where/what it installs.
383
+ `agentx-trace-eval` isn't this SDK's own code - the engine itself is a separate, compiled binary, downloaded on demand rather than bundled into this package, so installing `agentx-python` doesn't get any heavier for the (much more common) case of just talking to the hosted AgentX API. Each SDK release pins the engine release it was tested against and converges the install to that pin, so upgrading the SDK upgrades the engine too. Two flags to know: `--update` (consumed by this launcher) force-reinstalls the resolved engine release, while `--upgrade` passes through to `agentx-server` and re-downloads the dashboard bundle before serving. See that repo's README for what's included, and the `AGENTX_INSTALL_DIR`/`AGENTX_TRACE_EVAL_VERSION`/`AGENTX_TRACE_EVAL_SKIP_WEB` env vars to control where/what it installs.
375
384
 
376
385
  ---
377
386
 
@@ -47,6 +47,7 @@ agentx/integrations/openai_agents.py
47
47
  agentx/monitor/__init__.py
48
48
  agentx/monitor/agents.py
49
49
  agentx/monitor/client.py
50
+ agentx/monitor/improvement_groups.py
50
51
  agentx/monitor/judge_scorers.py
51
52
  agentx/monitor/models.py
52
53
  agentx/monitor/online_evaluators.py
@@ -86,5 +87,6 @@ tests/test_pairwise.py
86
87
  tests/test_review_queue.py
87
88
  tests/test_runner_features.py
88
89
  tests/test_selfhost_analysis_fallback.py
90
+ tests/test_selfhost_compat.py
89
91
  tests/test_span_tree.py
90
92
  tests/test_testing.py
@@ -15,6 +15,7 @@ litellm>=1.0.0
15
15
  llama-index-core>=0.10.0
16
16
  autogen-agentchat>=0.4.0
17
17
  autogen-core>=0.4.0
18
+ mlflow>=3.6.0
18
19
 
19
20
  [anthropic]
20
21
  anthropic>=0.25.0
@@ -70,6 +70,7 @@ setup(
70
70
  "llama-index-core>=0.10.0",
71
71
  "autogen-agentchat>=0.4.0",
72
72
  "autogen-core>=0.4.0",
73
+ "mlflow>=3.6.0",
73
74
  ],
74
75
  },
75
76
  author="Robin Wang and AgentX Team",
@@ -83,5 +84,5 @@ setup(
83
84
  "License :: OSI Approved :: Apache Software License",
84
85
  "Operating System :: OS Independent",
85
86
  ],
86
- python_requires=">=3.6",
87
+ python_requires=">=3.9",
87
88
  )