agentx-python 0.8.18__tar.gz → 0.8.19__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 (96) hide show
  1. {agentx_python-0.8.18/agentx_python.egg-info → agentx_python-0.8.19}/PKG-INFO +1 -1
  2. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/tracing/tracer.py +68 -0
  3. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/version.py +2 -2
  4. {agentx_python-0.8.18 → agentx_python-0.8.19/agentx_python.egg-info}/PKG-INFO +1 -1
  5. {agentx_python-0.8.18 → agentx_python-0.8.19}/tests/test_span_tree.py +16 -0
  6. {agentx_python-0.8.18 → agentx_python-0.8.19}/LICENSE +0 -0
  7. {agentx_python-0.8.18 → agentx_python-0.8.19}/README.md +0 -0
  8. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/__init__.py +0 -0
  9. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/agentx.py +0 -0
  10. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/cli.py +0 -0
  11. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/evaluations/__init__.py +0 -0
  12. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/evaluations/_term.py +0 -0
  13. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/evaluations/adapters/__init__.py +0 -0
  14. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/evaluations/adapters/http_endpoint.py +0 -0
  15. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/evaluations/adapters/precomputed.py +0 -0
  16. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/evaluations/adapters/raw.py +0 -0
  17. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/evaluations/client.py +0 -0
  18. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/evaluations/datasets.py +0 -0
  19. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/evaluations/evaluation_settings.py +0 -0
  20. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/evaluations/models.py +0 -0
  21. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/evaluations/prompts.py +0 -0
  22. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/evaluations/reporting.py +0 -0
  23. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/evaluations/results.py +0 -0
  24. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/evaluations/runner.py +0 -0
  25. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/evaluations/tool_schemas.py +0 -0
  26. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/evaluations/tracing.py +0 -0
  27. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/exceptions.py +0 -0
  28. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/export.py +0 -0
  29. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/feedback.py +0 -0
  30. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/integrations/__init__.py +0 -0
  31. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/integrations/_traced_call.py +0 -0
  32. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/integrations/anthropic.py +0 -0
  33. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/integrations/autogen.py +0 -0
  34. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/integrations/crewai.py +0 -0
  35. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/integrations/databricks.py +0 -0
  36. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/integrations/google_adk.py +0 -0
  37. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/integrations/google_genai.py +0 -0
  38. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/integrations/langchain.py +0 -0
  39. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/integrations/litellm.py +0 -0
  40. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/integrations/llamaindex.py +0 -0
  41. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/integrations/moveworks.py +0 -0
  42. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/integrations/openai.py +0 -0
  43. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/integrations/openai_agents.py +0 -0
  44. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/monitor/__init__.py +0 -0
  45. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/monitor/agents.py +0 -0
  46. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/monitor/client.py +0 -0
  47. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/monitor/improvement_groups.py +0 -0
  48. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/monitor/judge_scorers.py +0 -0
  49. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/monitor/models.py +0 -0
  50. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/monitor/online_evaluators.py +0 -0
  51. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/monitor/patterns.py +0 -0
  52. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/monitor/profile.py +0 -0
  53. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/monitor/review_queue.py +0 -0
  54. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/monitor/rules.py +0 -0
  55. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/monitor/scorer_groups.py +0 -0
  56. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/monitor/scorers.py +0 -0
  57. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/monitor/sessions.py +0 -0
  58. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/monitor/signals.py +0 -0
  59. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/outcomes.py +0 -0
  60. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/projects.py +0 -0
  61. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/py.typed +0 -0
  62. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/resources/__init__.py +0 -0
  63. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/resources/agent.py +0 -0
  64. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/resources/conversation.py +0 -0
  65. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/resources/workforce.py +0 -0
  66. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/testing.py +0 -0
  67. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/traces.py +0 -0
  68. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/tracing/__init__.py +0 -0
  69. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/tracing/ci_types.py +0 -0
  70. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/tracing/eval_scope.py +0 -0
  71. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/tracing/framework_detect.py +0 -0
  72. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/tracing/ingest_client.py +0 -0
  73. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx/util.py +0 -0
  74. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx_python.egg-info/SOURCES.txt +0 -0
  75. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx_python.egg-info/dependency_links.txt +0 -0
  76. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx_python.egg-info/entry_points.txt +0 -0
  77. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx_python.egg-info/not-zip-safe +0 -0
  78. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx_python.egg-info/requires.txt +0 -0
  79. {agentx_python-0.8.18 → agentx_python-0.8.19}/agentx_python.egg-info/top_level.txt +0 -0
  80. {agentx_python-0.8.18 → agentx_python-0.8.19}/setup.cfg +0 -0
  81. {agentx_python-0.8.18 → agentx_python-0.8.19}/setup.py +0 -0
  82. {agentx_python-0.8.18 → agentx_python-0.8.19}/tests/test_cli_launcher.py +0 -0
  83. {agentx_python-0.8.18 → agentx_python-0.8.19}/tests/test_deep_dive_fixes.py +0 -0
  84. {agentx_python-0.8.18 → agentx_python-0.8.19}/tests/test_docs_match_sdk.py +0 -0
  85. {agentx_python-0.8.18 → agentx_python-0.8.19}/tests/test_eval_scope.py +0 -0
  86. {agentx_python-0.8.18 → agentx_python-0.8.19}/tests/test_framework_detect.py +0 -0
  87. {agentx_python-0.8.18 → agentx_python-0.8.19}/tests/test_integration.py +0 -0
  88. {agentx_python-0.8.18 → agentx_python-0.8.19}/tests/test_integrations.py +0 -0
  89. {agentx_python-0.8.18 → agentx_python-0.8.19}/tests/test_judge_scorers.py +0 -0
  90. {agentx_python-0.8.18 → agentx_python-0.8.19}/tests/test_multi_judge.py +0 -0
  91. {agentx_python-0.8.18 → agentx_python-0.8.19}/tests/test_pairwise.py +0 -0
  92. {agentx_python-0.8.18 → agentx_python-0.8.19}/tests/test_review_queue.py +0 -0
  93. {agentx_python-0.8.18 → agentx_python-0.8.19}/tests/test_runner_features.py +0 -0
  94. {agentx_python-0.8.18 → agentx_python-0.8.19}/tests/test_selfhost_analysis_fallback.py +0 -0
  95. {agentx_python-0.8.18 → agentx_python-0.8.19}/tests/test_selfhost_compat.py +0 -0
  96. {agentx_python-0.8.18 → agentx_python-0.8.19}/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.18
3
+ Version: 0.8.19
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
@@ -581,6 +581,14 @@ class _RetrievalRecorder:
581
581
  self.output: Any = None
582
582
 
583
583
 
584
+ class _MemoryOpRecorder:
585
+ """Handle yielded by ``Tracer.trace_memory()`` - set ``output`` (what was recalled or
586
+ stored) inside the block."""
587
+
588
+ def __init__(self) -> None:
589
+ self.output: Any = None
590
+
591
+
584
592
  class _ToolCallRecorder:
585
593
  """Handle yielded by ``Tracer.trace_tool_call()`` - set ``output`` inside the block.
586
594
  ``success``/``error`` may be set manually; an exception escaping the block sets them
@@ -832,6 +840,66 @@ class Tracer:
832
840
  span_kind="retrieval",
833
841
  )
834
842
 
843
+ def record_memory(
844
+ self,
845
+ name: str = "Memory",
846
+ *,
847
+ operation: Optional[str] = None,
848
+ query: Optional[str] = None,
849
+ output: Any = None,
850
+ duration_ms: Optional[float] = None,
851
+ start_time: Optional[float] = None,
852
+ end_time: Optional[float] = None,
853
+ ) -> None:
854
+ """
855
+ Manually record a long-term-memory operation (a Mem0/Zep/Letta-style recall or store)
856
+ as a ``span_kind="memory"`` child span of the active span. ``operation`` is free text -
857
+ conventionally ``"read"`` or ``"write"`` - carried in the span's metadata; the kind
858
+ itself stays one value so dashboards and scorers can select all memory activity at once.
859
+ Deliberately NOT a retrieval: retrieval spans feed the RAG judges' ``{context}``
860
+ (knowledge grounding), while memory is recalled state - see the engine's spanKind.ts.
861
+ """
862
+ active_span = self.current_span
863
+ if active_span is None:
864
+ return
865
+ active_span.child_span(
866
+ name,
867
+ start_time=start_time,
868
+ end_time=end_time,
869
+ duration_ms=duration_ms,
870
+ input=query,
871
+ output=output,
872
+ metadata={"kind": "memory", **({"operation": operation} if operation else {})},
873
+ span_kind="memory",
874
+ )
875
+
876
+ @contextmanager
877
+ def trace_memory(
878
+ self, name: str = "Memory", *, operation: Optional[str] = None, query: Optional[str] = None
879
+ ) -> Iterator["_MemoryOpRecorder"]:
880
+ """
881
+ Context manager that times a memory operation and records it via
882
+ :meth:`record_memory` on exit::
883
+
884
+ with tracer.trace_memory("user prefs", operation="read", query=user_id) as m:
885
+ m.output = memory.search(user_id, question)
886
+ """
887
+ start_t = time.time()
888
+ recorder = _MemoryOpRecorder()
889
+ try:
890
+ yield recorder
891
+ finally:
892
+ end_t = time.time()
893
+ self.record_memory(
894
+ name,
895
+ operation=operation,
896
+ query=query,
897
+ output=recorder.output,
898
+ duration_ms=(end_t - start_t) * 1000,
899
+ start_time=start_t,
900
+ end_time=end_t,
901
+ )
902
+
835
903
  @contextmanager
836
904
  def trace_retrieval(self, name: str = "Retrieval", *, query: Optional[str] = None) -> Iterator["_RetrievalRecorder"]:
837
905
  """
@@ -1,7 +1,7 @@
1
- VERSION = "0.8.18"
1
+ VERSION = "0.8.19"
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.18"
7
+ ENGINE_VERSION = "v0.3.19"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentx-python
3
- Version: 0.8.18
3
+ Version: 0.8.19
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
@@ -594,6 +594,22 @@ def test_trace_tool_call_emits_real_child_span():
594
594
  assert root["tool_calls"][0]["output"] == "digital purchases are final"
595
595
 
596
596
 
597
+ def test_trace_memory_emits_a_memory_kind_child_span():
598
+ tracer = make_tracer()
599
+ with tracer.trace("agent") as span:
600
+ with tracer.trace_memory("user prefs", operation="read", query="u-42") as m:
601
+ m.output = ["prefers window seats"]
602
+
603
+ wires = enqueued_wires(tracer)
604
+ child = wires[0]
605
+ assert child["name"] == "user prefs"
606
+ assert child["span_kind"] == "memory"
607
+ assert child["metadata"]["kind"] == "memory"
608
+ assert child["metadata"]["operation"] == "read"
609
+ assert child["input"] == "u-42"
610
+ assert child["output"] == ["prefers window seats"]
611
+
612
+
597
613
  def test_trace_retrieval_emits_real_child_span():
598
614
  tracer = make_tracer()
599
615
  with tracer.trace("agent") as span:
File without changes
File without changes
File without changes
File without changes