agentx-python 0.6.30__py3-none-any.whl → 0.6.31__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
agentx/feedback.py CHANGED
@@ -74,3 +74,19 @@ class FeedbackClient:
74
74
  raise AgentXFeedbackError(f"Failed to report feedback ({resp.status_code}): {detail}")
75
75
  logger.info("Reported %s feedback on trace %s", rating, trace_id)
76
76
  return resp.json().get("feedback", {})
77
+
78
+ def list(self, trace_id: str) -> list:
79
+ """All votes recorded on one trace, oldest first (``GET /feedback/trace/:traceId``) -
80
+ the same rows the dashboard's trace dialog shows as up/down chips."""
81
+ resp = requests.get(
82
+ f"{api_base()}/feedback/trace/{trace_id}",
83
+ headers=get_headers(self._api_key),
84
+ timeout=10,
85
+ )
86
+ if resp.status_code >= 400:
87
+ try:
88
+ detail = resp.json().get("error", resp.reason)
89
+ except ValueError:
90
+ detail = resp.reason
91
+ raise AgentXFeedbackError(f"Failed to list feedback ({resp.status_code}): {detail}")
92
+ return resp.json().get("feedback", [])
agentx/monitor/client.py CHANGED
@@ -198,6 +198,17 @@ class MonitorClient:
198
198
  data = self._request("GET", f"/online-evaluators/{evaluator_id}/events", params=params)
199
199
  return [OnlineEvaluatorEvent(**e) for e in data.get("events", [])]
200
200
 
201
+ # ------------------------------------------------------------------
202
+ # KPI endpoint
203
+ # ------------------------------------------------------------------
204
+
205
+ def kpis(self, window: str = "7d") -> dict:
206
+ """Production health metrics over a window ("24h", "7d", or "30d") - the same numbers
207
+ the dashboard's Overview KPI strip shows: totalRuns, healthRate, failureRate,
208
+ downvoteRate (share of end-user votes that were "down"), toolFailureRate, p95LatencyMs,
209
+ plus deltas vs the prior window and the run-outcome breakdown."""
210
+ return self._request("GET", "/kpis", params={"window": window})
211
+
201
212
  # ------------------------------------------------------------------
202
213
  # Signal endpoints
203
214
  # ------------------------------------------------------------------
agentx/version.py CHANGED
@@ -1 +1 @@
1
- VERSION = "0.6.30"
1
+ VERSION = "0.6.31"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentx-python
3
- Version: 0.6.30
3
+ Version: 0.6.31
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
@@ -2,11 +2,11 @@ agentx/__init__.py,sha256=4iMiGLNU4S-I-WyX0Z7l0BFUY_krVJ3seMQPqyO-ReA,602
2
2
  agentx/agentx.py,sha256=ouSkh7nEeif5-YyS4BcR9mtyQNdFlqJ1Zw7xXYsqcdk,7225
3
3
  agentx/cli.py,sha256=ueKYPBhW8qd63nvQBQeZ4Mgz9NwEVaM0KH2WvLQ0bGs,6097
4
4
  agentx/exceptions.py,sha256=2tDLdZjriFBQbjgzyIcah12RazpbujhqZSRbSXgAml4,1377
5
- agentx/feedback.py,sha256=B36L2MVNZRVRidzGb-YDMFObLJjV5EHmcA_RU1wbHTU,2762
5
+ agentx/feedback.py,sha256=ZNM89mfKtjkbDZefbGWuej-pqSwlnjAnIS6oQ-Tw09M,3472
6
6
  agentx/outcomes.py,sha256=wD03oNUuFv56_l1ebOSTbWJ6XqSU7_QXnWzMZ5G3RDU,3295
7
7
  agentx/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  agentx/util.py,sha256=lt2Kpg4Fj8whrSuAhLEahcPEIYRVpK9RCC5y9ShdTJs,703
9
- agentx/version.py,sha256=5ov8mCSBBGXmuxglBpPHdoiwFspsdPeZj8EHTk4eSpE,19
9
+ agentx/version.py,sha256=GJa7LuCJYCHH830fJBmg_7di4gvdlEJmB2WMoe59e1Q,19
10
10
  agentx/evaluations/__init__.py,sha256=Erv7RGFlRxGTG4rVb2uHhCqLLEX_iAWKqkZKzK6CumE,262
11
11
  agentx/evaluations/_term.py,sha256=tTg_yc6X5HCs9QCptYjrfsNWGNYb_1JWwcORm_81SkU,2289
12
12
  agentx/evaluations/client.py,sha256=GoYWV0v_4AJRwdwohyfGrICe2QNi6Q2WjS1sgaJQ16g,25837
@@ -40,7 +40,7 @@ agentx/integrations/openai.py,sha256=1KLs-hJaeW2emHPwNkmC3zcGksL3zd87uWbcLGRW704
40
40
  agentx/integrations/openai_agents.py,sha256=tCa3kPxqux5LnNNDQ6zA05OybQrjkc_LeE08YuNPJEs,12742
41
41
  agentx/monitor/__init__.py,sha256=MLiASSvQnCy2jqVNRTgPWFhUSf8lGYRQeEgEVVhE5Tg,574
42
42
  agentx/monitor/agents.py,sha256=8Xk4jWmNTvdtjFixHiLmw4jj96uqIXWIT6KW8zXoWrc,1006
43
- agentx/monitor/client.py,sha256=4YcHjPNHNWdpvBCV7NcC-h3xFJl44SWDH5r0fUjg-iI,13933
43
+ agentx/monitor/client.py,sha256=yZdrZB6autYZBRWD7wVclh7ilBK68EvnqFZNFNYYVuM,14570
44
44
  agentx/monitor/models.py,sha256=5prDuicSoSEX4akOR6dS6-Z5XzxL9No_eM1q38hrU-I,8564
45
45
  agentx/monitor/online_evaluators.py,sha256=gfGMgJLIWjPUpYK068fxv2oZerHi3o0_4AOjxoVQhak,7176
46
46
  agentx/monitor/patterns.py,sha256=ruBqLoA2T2KQuqRbbn1kWkIEkiOal3SvyPl9opGyhzI,4185
@@ -55,9 +55,9 @@ agentx/tracing/__init__.py,sha256=l2mIRILE-wWrCD0fekgrIOQUEvtDObzdrkgpQUtXroU,40
55
55
  agentx/tracing/ci_types.py,sha256=zFVcZGvc1qbVDdOlEPQ1i5R6terqJHxCzFF4ZjouxxI,1423
56
56
  agentx/tracing/ingest_client.py,sha256=TuKQAVeKi35Nv8oMGIHxw-vR8Lg_4NtpzBQHouxljFk,15517
57
57
  agentx/tracing/tracer.py,sha256=B5Gfa0n7RDQ-rPui-SFQeBGsN9hC1PvtWzFNoIGVf8k,50446
58
- agentx_python-0.6.30.dist-info/licenses/LICENSE,sha256=gZVsM-nLsE8vlaY6NXXsVoo6IlCClxkToAWmhgT3y_s,10762
59
- agentx_python-0.6.30.dist-info/METADATA,sha256=t43aDgvp_-selCm7WLGN2ZEqN4PrTVlqs2zPjwMhJiU,20133
60
- agentx_python-0.6.30.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
61
- agentx_python-0.6.30.dist-info/entry_points.txt,sha256=rQqF1JTY3T1yfviBU1r8PU-5mBdfOk6P4bZ1L4BskIM,172
62
- agentx_python-0.6.30.dist-info/top_level.txt,sha256=s-q-HB9Gb_QdrZNacSeQyF_c25gQooMy7DlxzgLOHPk,7
63
- agentx_python-0.6.30.dist-info/RECORD,,
58
+ agentx_python-0.6.31.dist-info/licenses/LICENSE,sha256=gZVsM-nLsE8vlaY6NXXsVoo6IlCClxkToAWmhgT3y_s,10762
59
+ agentx_python-0.6.31.dist-info/METADATA,sha256=3tZLXEye2yr8wj-cumNXm_D-hCP68cEkn_RBwdZWKm8,20133
60
+ agentx_python-0.6.31.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
61
+ agentx_python-0.6.31.dist-info/entry_points.txt,sha256=rQqF1JTY3T1yfviBU1r8PU-5mBdfOk6P4bZ1L4BskIM,172
62
+ agentx_python-0.6.31.dist-info/top_level.txt,sha256=s-q-HB9Gb_QdrZNacSeQyF_c25gQooMy7DlxzgLOHPk,7
63
+ agentx_python-0.6.31.dist-info/RECORD,,