agentx-python 0.8.14__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.14 → agentx_python-0.8.15}/PKG-INFO +1 -1
  2. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/monitor/client.py +27 -2
  3. agentx_python-0.8.15/agentx/monitor/improvement_groups.py +76 -0
  4. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/monitor/judge_scorers.py +10 -2
  5. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/version.py +2 -2
  6. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx_python.egg-info/PKG-INFO +1 -1
  7. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx_python.egg-info/SOURCES.txt +1 -0
  8. {agentx_python-0.8.14 → agentx_python-0.8.15}/LICENSE +0 -0
  9. {agentx_python-0.8.14 → agentx_python-0.8.15}/README.md +0 -0
  10. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/__init__.py +0 -0
  11. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/agentx.py +0 -0
  12. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/cli.py +0 -0
  13. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/evaluations/__init__.py +0 -0
  14. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/evaluations/_term.py +0 -0
  15. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/evaluations/adapters/__init__.py +0 -0
  16. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/evaluations/adapters/http_endpoint.py +0 -0
  17. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/evaluations/adapters/precomputed.py +0 -0
  18. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/evaluations/adapters/raw.py +0 -0
  19. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/evaluations/client.py +0 -0
  20. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/evaluations/datasets.py +0 -0
  21. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/evaluations/evaluation_settings.py +0 -0
  22. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/evaluations/models.py +0 -0
  23. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/evaluations/prompts.py +0 -0
  24. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/evaluations/reporting.py +0 -0
  25. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/evaluations/results.py +0 -0
  26. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/evaluations/runner.py +0 -0
  27. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/evaluations/tool_schemas.py +0 -0
  28. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/evaluations/tracing.py +0 -0
  29. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/exceptions.py +0 -0
  30. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/export.py +0 -0
  31. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/feedback.py +0 -0
  32. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/integrations/__init__.py +0 -0
  33. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/integrations/_traced_call.py +0 -0
  34. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/integrations/anthropic.py +0 -0
  35. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/integrations/autogen.py +0 -0
  36. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/integrations/crewai.py +0 -0
  37. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/integrations/databricks.py +0 -0
  38. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/integrations/google_adk.py +0 -0
  39. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/integrations/google_genai.py +0 -0
  40. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/integrations/langchain.py +0 -0
  41. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/integrations/litellm.py +0 -0
  42. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/integrations/llamaindex.py +0 -0
  43. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/integrations/moveworks.py +0 -0
  44. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/integrations/openai.py +0 -0
  45. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/integrations/openai_agents.py +0 -0
  46. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/monitor/__init__.py +0 -0
  47. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/monitor/agents.py +0 -0
  48. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/monitor/models.py +0 -0
  49. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/monitor/online_evaluators.py +0 -0
  50. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/monitor/patterns.py +0 -0
  51. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/monitor/profile.py +0 -0
  52. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/monitor/review_queue.py +0 -0
  53. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/monitor/rules.py +0 -0
  54. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/monitor/scorers.py +0 -0
  55. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/monitor/sessions.py +0 -0
  56. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/monitor/signals.py +0 -0
  57. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/outcomes.py +0 -0
  58. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/projects.py +0 -0
  59. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/py.typed +0 -0
  60. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/resources/__init__.py +0 -0
  61. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/resources/agent.py +0 -0
  62. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/resources/conversation.py +0 -0
  63. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/resources/workforce.py +0 -0
  64. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/testing.py +0 -0
  65. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/traces.py +0 -0
  66. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/tracing/__init__.py +0 -0
  67. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/tracing/ci_types.py +0 -0
  68. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/tracing/eval_scope.py +0 -0
  69. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/tracing/framework_detect.py +0 -0
  70. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/tracing/ingest_client.py +0 -0
  71. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/tracing/tracer.py +0 -0
  72. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx/util.py +0 -0
  73. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx_python.egg-info/dependency_links.txt +0 -0
  74. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx_python.egg-info/entry_points.txt +0 -0
  75. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx_python.egg-info/not-zip-safe +0 -0
  76. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx_python.egg-info/requires.txt +0 -0
  77. {agentx_python-0.8.14 → agentx_python-0.8.15}/agentx_python.egg-info/top_level.txt +0 -0
  78. {agentx_python-0.8.14 → agentx_python-0.8.15}/setup.cfg +0 -0
  79. {agentx_python-0.8.14 → agentx_python-0.8.15}/setup.py +0 -0
  80. {agentx_python-0.8.14 → agentx_python-0.8.15}/tests/test_cli_launcher.py +0 -0
  81. {agentx_python-0.8.14 → agentx_python-0.8.15}/tests/test_deep_dive_fixes.py +0 -0
  82. {agentx_python-0.8.14 → agentx_python-0.8.15}/tests/test_docs_match_sdk.py +0 -0
  83. {agentx_python-0.8.14 → agentx_python-0.8.15}/tests/test_eval_scope.py +0 -0
  84. {agentx_python-0.8.14 → agentx_python-0.8.15}/tests/test_framework_detect.py +0 -0
  85. {agentx_python-0.8.14 → agentx_python-0.8.15}/tests/test_integration.py +0 -0
  86. {agentx_python-0.8.14 → agentx_python-0.8.15}/tests/test_integrations.py +0 -0
  87. {agentx_python-0.8.14 → agentx_python-0.8.15}/tests/test_judge_scorers.py +0 -0
  88. {agentx_python-0.8.14 → agentx_python-0.8.15}/tests/test_pairwise.py +0 -0
  89. {agentx_python-0.8.14 → agentx_python-0.8.15}/tests/test_review_queue.py +0 -0
  90. {agentx_python-0.8.14 → agentx_python-0.8.15}/tests/test_runner_features.py +0 -0
  91. {agentx_python-0.8.14 → agentx_python-0.8.15}/tests/test_selfhost_analysis_fallback.py +0 -0
  92. {agentx_python-0.8.14 → agentx_python-0.8.15}/tests/test_selfhost_compat.py +0 -0
  93. {agentx_python-0.8.14 → agentx_python-0.8.15}/tests/test_span_tree.py +0 -0
  94. {agentx_python-0.8.14 → 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.14
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
@@ -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.14"
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.10"
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.14
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
@@ -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
File without changes
File without changes
File without changes
File without changes