agentx-python 0.8.12__tar.gz → 0.8.14__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.
- {agentx_python-0.8.12 → agentx_python-0.8.14}/PKG-INFO +28 -14
- {agentx_python-0.8.12 → agentx_python-0.8.14}/README.md +25 -12
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/integrations/_traced_call.py +3 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/integrations/anthropic.py +1 -1
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/integrations/crewai.py +1 -1
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/monitor/client.py +22 -0
- agentx_python-0.8.14/agentx/tracing/framework_detect.py +64 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/tracing/tracer.py +39 -9
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/version.py +2 -2
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx_python.egg-info/PKG-INFO +28 -14
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx_python.egg-info/SOURCES.txt +3 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx_python.egg-info/requires.txt +1 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/setup.py +2 -1
- agentx_python-0.8.14/tests/test_framework_detect.py +125 -0
- agentx_python-0.8.14/tests/test_selfhost_compat.py +424 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/LICENSE +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/__init__.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/agentx.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/cli.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/evaluations/__init__.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/evaluations/_term.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/evaluations/adapters/__init__.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/evaluations/adapters/http_endpoint.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/evaluations/adapters/precomputed.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/evaluations/adapters/raw.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/evaluations/client.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/evaluations/datasets.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/evaluations/evaluation_settings.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/evaluations/models.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/evaluations/prompts.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/evaluations/reporting.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/evaluations/results.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/evaluations/runner.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/evaluations/tool_schemas.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/evaluations/tracing.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/exceptions.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/export.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/feedback.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/integrations/__init__.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/integrations/autogen.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/integrations/databricks.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/integrations/google_adk.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/integrations/google_genai.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/integrations/langchain.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/integrations/litellm.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/integrations/llamaindex.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/integrations/moveworks.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/integrations/openai.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/integrations/openai_agents.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/monitor/__init__.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/monitor/agents.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/monitor/judge_scorers.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/monitor/models.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/monitor/online_evaluators.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/monitor/patterns.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/monitor/profile.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/monitor/review_queue.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/monitor/rules.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/monitor/scorers.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/monitor/sessions.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/monitor/signals.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/outcomes.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/projects.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/py.typed +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/resources/__init__.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/resources/agent.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/resources/conversation.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/resources/workforce.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/testing.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/traces.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/tracing/__init__.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/tracing/ci_types.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/tracing/eval_scope.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/tracing/ingest_client.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx/util.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx_python.egg-info/dependency_links.txt +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx_python.egg-info/entry_points.txt +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx_python.egg-info/not-zip-safe +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/agentx_python.egg-info/top_level.txt +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/setup.cfg +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/tests/test_cli_launcher.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/tests/test_deep_dive_fixes.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/tests/test_docs_match_sdk.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/tests/test_eval_scope.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/tests/test_integration.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/tests/test_integrations.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/tests/test_judge_scorers.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/tests/test_pairwise.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/tests/test_review_queue.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/tests/test_runner_features.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/tests/test_selfhost_analysis_fallback.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/tests/test_span_tree.py +0 -0
- {agentx_python-0.8.12 → agentx_python-0.8.14}/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.
|
|
3
|
+
Version: 0.8.14
|
|
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.
|
|
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
|
|
113
|
+
#### Run the self-host governance suite locally
|
|
113
114
|
|
|
114
|
-
```
|
|
115
|
-
agentx-trace-eval --dev
|
|
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, 0
|
|
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, 0
|
|
162
|
-
print(report.cosine_similarity) # embedding cosine, 0
|
|
163
|
-
print(report.jaccard_similarity) # token-set overlap, 0
|
|
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
|
|
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,7 +255,16 @@ extra:
|
|
|
252
255
|
| LlamaIndex | `pip install "agentx-python[llamaindex]"` | `AgentXLlamaIndexHandler` |
|
|
253
256
|
| AutoGen | `pip install "agentx-python[autogen]"` | `AgentXAutoGenObserver` |
|
|
254
257
|
|
|
255
|
-
|
|
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
|
+
|
|
262
|
+
Or plain Python - wrap any function with `@tracer.trace(...)` and it just works, no framework
|
|
263
|
+
required. Tracing is **platform agnostic**: each integration stamps its platform label
|
|
264
|
+
automatically, a plain trace auto-detects the one orchestration framework imported in the
|
|
265
|
+
process, and `framework="any-name"` labels platforms AgentX has never heard of - the label
|
|
266
|
+
drives the dashboard's framework filter and Monitor's Platforms chart. See
|
|
267
|
+
[Platform detection](TRACING.md#platform-detection).
|
|
256
268
|
|
|
257
269
|
Running specialist agents in parallel with a `ThreadPoolExecutor`? Wrap each worker body in `tracer.use_span(span)` so their steps land on the parent trace instead of becoming independent traces - see [TRACING.md](TRACING.md) for the full pattern.
|
|
258
270
|
|
|
@@ -287,12 +299,14 @@ for signal in client.monitor.signals.list(severity="high"):
|
|
|
287
299
|
print(signal.summary, signal.occurrence_count)
|
|
288
300
|
```
|
|
289
301
|
|
|
290
|
-
Per-agent
|
|
302
|
+
Per-agent monitoring settings (enable/disable, detection categories, notification channels) are `client.monitor.profile.get()`/`.update()`:
|
|
291
303
|
|
|
292
304
|
```python
|
|
293
|
-
client.monitor.profile.update("agent_123",
|
|
305
|
+
client.monitor.profile.update("agent_123", info_detection_enabled=False)
|
|
294
306
|
```
|
|
295
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
|
+
|
|
296
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`.
|
|
297
311
|
|
|
298
312
|
```python
|
|
@@ -366,7 +380,7 @@ export AGENTX_API_BASE_URL=http://localhost:4700/api/v1
|
|
|
366
380
|
export AGENTX_API_KEY=<printed by agentx-trace-eval on first run>
|
|
367
381
|
```
|
|
368
382
|
|
|
369
|
-
`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.
|
|
370
384
|
|
|
371
385
|
---
|
|
372
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
|
|
48
|
+
#### Run the self-host governance suite locally
|
|
49
49
|
|
|
50
|
-
```
|
|
51
|
-
agentx-trace-eval --dev
|
|
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, 0
|
|
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, 0
|
|
98
|
-
print(report.cosine_similarity) # embedding cosine, 0
|
|
99
|
-
print(report.jaccard_similarity) # token-set overlap, 0
|
|
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
|
|
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,7 +190,16 @@ extra:
|
|
|
188
190
|
| LlamaIndex | `pip install "agentx-python[llamaindex]"` | `AgentXLlamaIndexHandler` |
|
|
189
191
|
| AutoGen | `pip install "agentx-python[autogen]"` | `AgentXAutoGenObserver` |
|
|
190
192
|
|
|
191
|
-
|
|
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
|
+
|
|
197
|
+
Or plain Python - wrap any function with `@tracer.trace(...)` and it just works, no framework
|
|
198
|
+
required. Tracing is **platform agnostic**: each integration stamps its platform label
|
|
199
|
+
automatically, a plain trace auto-detects the one orchestration framework imported in the
|
|
200
|
+
process, and `framework="any-name"` labels platforms AgentX has never heard of - the label
|
|
201
|
+
drives the dashboard's framework filter and Monitor's Platforms chart. See
|
|
202
|
+
[Platform detection](TRACING.md#platform-detection).
|
|
192
203
|
|
|
193
204
|
Running specialist agents in parallel with a `ThreadPoolExecutor`? Wrap each worker body in `tracer.use_span(span)` so their steps land on the parent trace instead of becoming independent traces - see [TRACING.md](TRACING.md) for the full pattern.
|
|
194
205
|
|
|
@@ -223,12 +234,14 @@ for signal in client.monitor.signals.list(severity="high"):
|
|
|
223
234
|
print(signal.summary, signal.occurrence_count)
|
|
224
235
|
```
|
|
225
236
|
|
|
226
|
-
Per-agent
|
|
237
|
+
Per-agent monitoring settings (enable/disable, detection categories, notification channels) are `client.monitor.profile.get()`/`.update()`:
|
|
227
238
|
|
|
228
239
|
```python
|
|
229
|
-
client.monitor.profile.update("agent_123",
|
|
240
|
+
client.monitor.profile.update("agent_123", info_detection_enabled=False)
|
|
230
241
|
```
|
|
231
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
|
+
|
|
232
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`.
|
|
233
246
|
|
|
234
247
|
```python
|
|
@@ -302,7 +315,7 @@ export AGENTX_API_BASE_URL=http://localhost:4700/api/v1
|
|
|
302
315
|
export AGENTX_API_KEY=<printed by agentx-trace-eval on first run>
|
|
303
316
|
```
|
|
304
317
|
|
|
305
|
-
`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.
|
|
306
319
|
|
|
307
320
|
---
|
|
308
321
|
|
|
@@ -143,6 +143,9 @@ def finish_llm_call(
|
|
|
143
143
|
input=input_repr,
|
|
144
144
|
output=output,
|
|
145
145
|
model=model,
|
|
146
|
+
# Stamp the provider literal on a span opened without one (adoption keeps an
|
|
147
|
+
# explicit framework= or a framework integration's label winning over this).
|
|
148
|
+
framework=framework,
|
|
146
149
|
input_tokens=input_tokens,
|
|
147
150
|
output_tokens=output_tokens,
|
|
148
151
|
cache_read_tokens=cache_read_tokens,
|
|
@@ -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
|
|
|
@@ -268,6 +268,28 @@ class MonitorClient:
|
|
|
268
268
|
plus deltas vs the prior window and the run-outcome breakdown."""
|
|
269
269
|
return self._request("GET", "/kpis", params={"window": window})
|
|
270
270
|
|
|
271
|
+
def metrics(
|
|
272
|
+
self,
|
|
273
|
+
window: str = "1d",
|
|
274
|
+
*,
|
|
275
|
+
agent: Optional[str] = None,
|
|
276
|
+
model: Optional[str] = None,
|
|
277
|
+
tool: Optional[str] = None,
|
|
278
|
+
framework: Optional[str] = None,
|
|
279
|
+
status: Optional[str] = None,
|
|
280
|
+
) -> dict:
|
|
281
|
+
"""The Monitor metrics grid's data over a window ("1h".."90d") - bucketed spans by kind,
|
|
282
|
+
latency percentiles, tokens/cost, tool executions and failures, and platform attribution
|
|
283
|
+
(`frameworks` window totals + per-bucket `byFramework` - the Platforms chart). Optional
|
|
284
|
+
filters scope every number the way the dashboard's filter chips do; `framework` matches
|
|
285
|
+
the platform label traces carry (see TRACING.md's Platform detection), with "other"
|
|
286
|
+
selecting unlabeled traffic."""
|
|
287
|
+
params = {"window": window}
|
|
288
|
+
for key, value in (("agent", agent), ("model", model), ("tool", tool), ("framework", framework), ("status", status)):
|
|
289
|
+
if value is not None:
|
|
290
|
+
params[key] = value
|
|
291
|
+
return self._request("GET", "/metrics", params=params)
|
|
292
|
+
|
|
271
293
|
def topics(self, window: str = "7d") -> dict:
|
|
272
294
|
"""The Topics view's data over a window ("24h", "7d", "30d"): LLM-classified themes of
|
|
273
295
|
sampled production traffic with per-topic counts and sentiment. Empty until Topics is
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"""Best-effort agent-framework auto-detection (the "platform agnostic" story).
|
|
2
|
+
|
|
3
|
+
A span whose framework was neither passed explicitly (``tracer.trace(...,
|
|
4
|
+
framework="...")``) nor adopted from a framework integration (callback handler,
|
|
5
|
+
observer, patched client - see ``_TraceSpan._captured_framework``) gets labeled
|
|
6
|
+
by looking at which known ORCHESTRATION framework is actually imported in this
|
|
7
|
+
process. ``sys.modules`` is the signal - imported, not merely installed - so a
|
|
8
|
+
machine with ten frameworks pip-installed but one in use still resolves.
|
|
9
|
+
|
|
10
|
+
Only unambiguous answers are given: zero or more than one known framework
|
|
11
|
+
loaded means ``None``, and the span goes out unlabeled rather than mislabeled.
|
|
12
|
+
The user's explicit ``framework=`` always wins, including totally custom names
|
|
13
|
+
for platforms this table has never heard of.
|
|
14
|
+
|
|
15
|
+
Raw provider SDKs (openai, anthropic, google-genai, ...) are deliberately NOT
|
|
16
|
+
in this table: they are transitive dependencies of nearly every framework, so
|
|
17
|
+
their presence says nothing about what orchestrates the agent - and their
|
|
18
|
+
patched-client integrations already stamp the provider literal on the spans
|
|
19
|
+
they create.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
from __future__ import annotations
|
|
23
|
+
|
|
24
|
+
import sys
|
|
25
|
+
from typing import Optional
|
|
26
|
+
|
|
27
|
+
# Top-level module name -> the wire literal the matching integration emits.
|
|
28
|
+
# Multiple modules may map to one literal (langgraph is the LangChain family).
|
|
29
|
+
_ORCHESTRATOR_MODULES = {
|
|
30
|
+
"langchain": "langchain",
|
|
31
|
+
"langchain_core": "langchain",
|
|
32
|
+
"langgraph": "langchain",
|
|
33
|
+
"crewai": "crewai",
|
|
34
|
+
"llama_index": "llamaindex",
|
|
35
|
+
"autogen": "autogen",
|
|
36
|
+
"autogen_agentchat": "autogen",
|
|
37
|
+
"agents": "openai-agents", # the OpenAI Agents SDK's import name
|
|
38
|
+
"google.adk": "google-adk",
|
|
39
|
+
"semantic_kernel": "semantic-kernel",
|
|
40
|
+
"haystack": "haystack",
|
|
41
|
+
"pydantic_ai": "pydantic-ai",
|
|
42
|
+
"smolagents": "smolagents",
|
|
43
|
+
"dspy": "dspy",
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def _looks_like_openai_agents_sdk() -> bool:
|
|
48
|
+
# "agents" is a name any user package could claim - only trust it when the
|
|
49
|
+
# OpenAI Agents SDK's own submodules are loaded alongside it.
|
|
50
|
+
return "agents.run" in sys.modules or "agents.tracing" in sys.modules
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def detect_framework() -> Optional[str]:
|
|
54
|
+
"""The single unambiguous orchestration framework imported right now, else None."""
|
|
55
|
+
found: set = set()
|
|
56
|
+
for module, literal in _ORCHESTRATOR_MODULES.items():
|
|
57
|
+
if module not in sys.modules:
|
|
58
|
+
continue
|
|
59
|
+
if module == "agents" and not _looks_like_openai_agents_sdk():
|
|
60
|
+
continue
|
|
61
|
+
found.add(literal)
|
|
62
|
+
if len(found) > 1:
|
|
63
|
+
return None
|
|
64
|
+
return found.pop() if len(found) == 1 else None
|
|
@@ -14,6 +14,7 @@ from agentx.exceptions import CIGateFailure
|
|
|
14
14
|
from agentx.tracing.ingest_client import IngestClient
|
|
15
15
|
from agentx.tracing.ci_types import CIRun, CIRunResult, CIRunStatus, CIQuestionScore
|
|
16
16
|
from agentx.tracing.eval_scope import EVAL_RUN_SOURCE, current_eval_run_id
|
|
17
|
+
from agentx.tracing.framework_detect import detect_framework
|
|
17
18
|
|
|
18
19
|
F = TypeVar("F", bound=Callable[..., Any])
|
|
19
20
|
|
|
@@ -125,6 +126,10 @@ class _TraceSpan:
|
|
|
125
126
|
# Adopted from a merged child run (e.g. AgentXCallbackHandler) when this span itself
|
|
126
127
|
# wasn't opened with an explicit framework= - see _merge_child_run below.
|
|
127
128
|
self._captured_framework: Optional[str] = None
|
|
129
|
+
# Best-effort auto-detection (framework_detect.py), resolved once at span open so child
|
|
130
|
+
# spans emitted mid-flight carry the same label the root will. Lowest precedence:
|
|
131
|
+
# explicit framework= > integration adoption > this. None when ambiguous.
|
|
132
|
+
self._detected_framework: Optional[str] = None if framework else detect_framework()
|
|
128
133
|
self._input_tokens: int = 0
|
|
129
134
|
self._output_tokens: int = 0
|
|
130
135
|
# Subsets of _input_tokens (not additional tokens) - a prompt-caching write/read, when the
|
|
@@ -191,7 +196,7 @@ class _TraceSpan:
|
|
|
191
196
|
latency_ms=latency_ms,
|
|
192
197
|
error=self._error,
|
|
193
198
|
metadata=metadata,
|
|
194
|
-
framework=self._framework or self._captured_framework,
|
|
199
|
+
framework=self._framework or self._captured_framework or self._detected_framework or detect_framework(),
|
|
195
200
|
model=self._model or self._captured_model,
|
|
196
201
|
tool_calls=self.tool_calls or None,
|
|
197
202
|
session_id=self._session_id,
|
|
@@ -235,14 +240,18 @@ class _TraceSpan:
|
|
|
235
240
|
input: Any = None,
|
|
236
241
|
output: Any = None,
|
|
237
242
|
model: Optional[str] = None,
|
|
243
|
+
framework: Optional[str] = None,
|
|
238
244
|
input_tokens: Optional[int] = None,
|
|
239
245
|
output_tokens: Optional[int] = None,
|
|
240
246
|
cache_read_tokens: Optional[int] = None,
|
|
241
247
|
cache_write_tokens: Optional[int] = None,
|
|
242
248
|
) -> None:
|
|
243
249
|
"""Record one LLM-call child span (e.g. one patched Anthropic call) under this span -
|
|
244
|
-
name left unset so _merge_child_run auto-numbers it "LLM Call N".
|
|
250
|
+
name left unset so _merge_child_run auto-numbers it "LLM Call N". ``framework`` lets the
|
|
251
|
+
patched client stamp its provider literal on a span the user opened without one - the
|
|
252
|
+
adoption in _merge_child_run keeps explicit/integration labels winning."""
|
|
245
253
|
self._merge_child_run(
|
|
254
|
+
framework=framework,
|
|
246
255
|
execution_steps=[{
|
|
247
256
|
"duration_ms": duration_ms,
|
|
248
257
|
"start_time": start_time,
|
|
@@ -301,7 +310,7 @@ class _TraceSpan:
|
|
|
301
310
|
child = _TraceSpan(
|
|
302
311
|
tracer=self._tracer,
|
|
303
312
|
name=name,
|
|
304
|
-
framework=framework or self._framework or self._captured_framework,
|
|
313
|
+
framework=framework or self._framework or self._captured_framework or self._detected_framework,
|
|
305
314
|
model=model,
|
|
306
315
|
session_id=self._session_id,
|
|
307
316
|
)
|
|
@@ -397,6 +406,13 @@ class _TraceSpan:
|
|
|
397
406
|
under this span).
|
|
398
407
|
"""
|
|
399
408
|
with self._merge_lock:
|
|
409
|
+
# Adopt framework/model BEFORE emitting child spans: child_span resolves its
|
|
410
|
+
# framework from this span's fields, so adopting after the emission loops used to
|
|
411
|
+
# send every CrewAI/AutoGen child out unlabeled while only the root got stamped.
|
|
412
|
+
if model and not self._captured_model:
|
|
413
|
+
self._captured_model = model
|
|
414
|
+
if framework and not self._captured_framework:
|
|
415
|
+
self._captured_framework = framework
|
|
400
416
|
for step in [] if not emit_steps else (execution_steps or []):
|
|
401
417
|
self._child_span_count += 1
|
|
402
418
|
self.child_span(
|
|
@@ -463,10 +479,6 @@ class _TraceSpan:
|
|
|
463
479
|
self.input = input
|
|
464
480
|
if output is not None:
|
|
465
481
|
self.output = output
|
|
466
|
-
if model and not self._captured_model:
|
|
467
|
-
self._captured_model = model
|
|
468
|
-
if framework and not self._captured_framework:
|
|
469
|
-
self._captured_framework = framework
|
|
470
482
|
if input_tokens:
|
|
471
483
|
self._input_tokens += input_tokens
|
|
472
484
|
if output_tokens:
|
|
@@ -520,7 +532,8 @@ class _TraceSpan:
|
|
|
520
532
|
# to be called from inside another active span.
|
|
521
533
|
span = self._tracer.trace(
|
|
522
534
|
self.name, metadata=self._metadata, framework=self._framework, model=self._model,
|
|
523
|
-
session_id=self._session_id,
|
|
535
|
+
session_id=self._session_id, sync=self._sync, monitor=self._monitor,
|
|
536
|
+
pattern_ids=self._pattern_ids, agent_id=self._agent_id, span_kind=self._span_kind,
|
|
524
537
|
)
|
|
525
538
|
span.__enter__()
|
|
526
539
|
try:
|
|
@@ -542,7 +555,8 @@ class _TraceSpan:
|
|
|
542
555
|
# See _wrap_sync's comment - same "fresh span per call" reasoning applies here.
|
|
543
556
|
span = self._tracer.trace(
|
|
544
557
|
self.name, metadata=self._metadata, framework=self._framework, model=self._model,
|
|
545
|
-
session_id=self._session_id,
|
|
558
|
+
session_id=self._session_id, sync=self._sync, monitor=self._monitor,
|
|
559
|
+
pattern_ids=self._pattern_ids, agent_id=self._agent_id, span_kind=self._span_kind,
|
|
546
560
|
)
|
|
547
561
|
span.__enter__()
|
|
548
562
|
try:
|
|
@@ -911,6 +925,22 @@ class Tracer:
|
|
|
911
925
|
|
|
912
926
|
with client.tracer.trace("support-agent", agent_id="ag_123", sync=True) as span:
|
|
913
927
|
span.output = call_llm(...)
|
|
928
|
+
|
|
929
|
+
``framework`` names the platform the agent runs on - tracing is platform agnostic, and
|
|
930
|
+
this label is how the dashboard's framework filter and Monitor's Platforms chart group
|
|
931
|
+
traffic. Three ways it gets set, strongest first:
|
|
932
|
+
|
|
933
|
+
1. **Explicit**: ``framework="langchain"`` - any string works, including platforms
|
|
934
|
+
AgentX has no integration for (``framework="my-inhouse-runner"``).
|
|
935
|
+
2. **Integration**: every integration stamps its own literal automatically -
|
|
936
|
+
``langchain``, ``crewai``, ``openai-agents``, ``openai``, ``anthropic``,
|
|
937
|
+
``google-genai``, ``google-adk``, ``litellm``, ``llamaindex``, ``autogen``,
|
|
938
|
+
``moveworks``, ``databricks``.
|
|
939
|
+
3. **Auto-detection**: with neither of the above, the SDK labels the span with the one
|
|
940
|
+
known orchestration framework imported in the process (LangChain/LangGraph, CrewAI,
|
|
941
|
+
LlamaIndex, AutoGen, OpenAI Agents SDK, Google ADK, Semantic Kernel, Haystack,
|
|
942
|
+
Pydantic AI, smolagents, DSPy). Ambiguous (several imported) or unknown -> the span
|
|
943
|
+
goes out unlabeled rather than mislabeled.
|
|
914
944
|
"""
|
|
915
945
|
return _TraceSpan(
|
|
916
946
|
tracer=self,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
VERSION = "0.8.
|
|
1
|
+
VERSION = "0.8.14"
|
|
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
|
+
ENGINE_VERSION = "v0.3.10"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agentx-python
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.14
|
|
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.
|
|
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
|
|
113
|
+
#### Run the self-host governance suite locally
|
|
113
114
|
|
|
114
|
-
```
|
|
115
|
-
agentx-trace-eval --dev
|
|
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, 0
|
|
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, 0
|
|
162
|
-
print(report.cosine_similarity) # embedding cosine, 0
|
|
163
|
-
print(report.jaccard_similarity) # token-set overlap, 0
|
|
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
|
|
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,7 +255,16 @@ extra:
|
|
|
252
255
|
| LlamaIndex | `pip install "agentx-python[llamaindex]"` | `AgentXLlamaIndexHandler` |
|
|
253
256
|
| AutoGen | `pip install "agentx-python[autogen]"` | `AgentXAutoGenObserver` |
|
|
254
257
|
|
|
255
|
-
|
|
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
|
+
|
|
262
|
+
Or plain Python - wrap any function with `@tracer.trace(...)` and it just works, no framework
|
|
263
|
+
required. Tracing is **platform agnostic**: each integration stamps its platform label
|
|
264
|
+
automatically, a plain trace auto-detects the one orchestration framework imported in the
|
|
265
|
+
process, and `framework="any-name"` labels platforms AgentX has never heard of - the label
|
|
266
|
+
drives the dashboard's framework filter and Monitor's Platforms chart. See
|
|
267
|
+
[Platform detection](TRACING.md#platform-detection).
|
|
256
268
|
|
|
257
269
|
Running specialist agents in parallel with a `ThreadPoolExecutor`? Wrap each worker body in `tracer.use_span(span)` so their steps land on the parent trace instead of becoming independent traces - see [TRACING.md](TRACING.md) for the full pattern.
|
|
258
270
|
|
|
@@ -287,12 +299,14 @@ for signal in client.monitor.signals.list(severity="high"):
|
|
|
287
299
|
print(signal.summary, signal.occurrence_count)
|
|
288
300
|
```
|
|
289
301
|
|
|
290
|
-
Per-agent
|
|
302
|
+
Per-agent monitoring settings (enable/disable, detection categories, notification channels) are `client.monitor.profile.get()`/`.update()`:
|
|
291
303
|
|
|
292
304
|
```python
|
|
293
|
-
client.monitor.profile.update("agent_123",
|
|
305
|
+
client.monitor.profile.update("agent_123", info_detection_enabled=False)
|
|
294
306
|
```
|
|
295
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
|
+
|
|
296
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`.
|
|
297
311
|
|
|
298
312
|
```python
|
|
@@ -366,7 +380,7 @@ export AGENTX_API_BASE_URL=http://localhost:4700/api/v1
|
|
|
366
380
|
export AGENTX_API_KEY=<printed by agentx-trace-eval on first run>
|
|
367
381
|
```
|
|
368
382
|
|
|
369
|
-
`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.
|
|
370
384
|
|
|
371
385
|
---
|
|
372
386
|
|
|
@@ -64,6 +64,7 @@ agentx/resources/workforce.py
|
|
|
64
64
|
agentx/tracing/__init__.py
|
|
65
65
|
agentx/tracing/ci_types.py
|
|
66
66
|
agentx/tracing/eval_scope.py
|
|
67
|
+
agentx/tracing/framework_detect.py
|
|
67
68
|
agentx/tracing/ingest_client.py
|
|
68
69
|
agentx/tracing/tracer.py
|
|
69
70
|
agentx_python.egg-info/PKG-INFO
|
|
@@ -77,6 +78,7 @@ tests/test_cli_launcher.py
|
|
|
77
78
|
tests/test_deep_dive_fixes.py
|
|
78
79
|
tests/test_docs_match_sdk.py
|
|
79
80
|
tests/test_eval_scope.py
|
|
81
|
+
tests/test_framework_detect.py
|
|
80
82
|
tests/test_integration.py
|
|
81
83
|
tests/test_integrations.py
|
|
82
84
|
tests/test_judge_scorers.py
|
|
@@ -84,5 +86,6 @@ tests/test_pairwise.py
|
|
|
84
86
|
tests/test_review_queue.py
|
|
85
87
|
tests/test_runner_features.py
|
|
86
88
|
tests/test_selfhost_analysis_fallback.py
|
|
89
|
+
tests/test_selfhost_compat.py
|
|
87
90
|
tests/test_span_tree.py
|
|
88
91
|
tests/test_testing.py
|
|
@@ -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.
|
|
87
|
+
python_requires=">=3.9",
|
|
87
88
|
)
|