agentcat 2.0.0b5__tar.gz → 2.0.2__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 (152) hide show
  1. {agentcat-2.0.0b5 → agentcat-2.0.2}/.gitignore +1 -0
  2. agentcat-2.0.2/PKG-INFO +264 -0
  3. agentcat-2.0.2/README.md +232 -0
  4. agentcat-2.0.2/docs/cats/void.jpg +0 -0
  5. {agentcat-2.0.0b5 → agentcat-2.0.2}/pyproject.toml +1 -1
  6. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/__init__.py +3 -1
  7. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/adapters/community.py +220 -81
  8. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/callpath.py +2 -1
  9. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/constants.py +4 -0
  10. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/event_queue.py +30 -4
  11. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/handles.py +4 -0
  12. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/redaction.py +114 -2
  13. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/types.py +29 -0
  14. agentcat-2.0.2/tests/community/test_community_v3_nested_calls.py +403 -0
  15. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/conftest.py +1 -0
  16. agentcat-2.0.2/tests/test_community_v4_nested_calls.py +109 -0
  17. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_event_queue.py +165 -0
  18. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_handles.py +10 -0
  19. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_redaction.py +307 -2
  20. agentcat-2.0.2/tests/test_utils/community_catalog_server.py +180 -0
  21. agentcat-2.0.0b5/PKG-INFO +0 -356
  22. agentcat-2.0.0b5/README.md +0 -324
  23. {agentcat-2.0.0b5 → agentcat-2.0.2}/CONTRIBUTING.md +0 -0
  24. {agentcat-2.0.0b5 → agentcat-2.0.2}/LICENSE +0 -0
  25. {agentcat-2.0.0b5 → agentcat-2.0.2}/docs/cats/bibi.png +0 -0
  26. {agentcat-2.0.0b5 → agentcat-2.0.2}/docs/cats/zelda.jpg +0 -0
  27. {agentcat-2.0.0b5 → agentcat-2.0.2}/docs/static/architecture.png +0 -0
  28. {agentcat-2.0.0b5 → agentcat-2.0.2}/docs/static/og-image.png +0 -0
  29. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/__init__.py +0 -0
  30. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/adapters/__init__.py +0 -0
  31. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/adapters/_common.py +0 -0
  32. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/adapters/_inner_tap.py +0 -0
  33. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/adapters/lowlevel_v1.py +0 -0
  34. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/adapters/lowlevel_v2.py +0 -0
  35. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/client_identity.py +0 -0
  36. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/detection.py +0 -0
  37. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/diagnostics.py +0 -0
  38. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/exceptions.py +0 -0
  39. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/exporters/__init__.py +0 -0
  40. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/exporters/datadog.py +0 -0
  41. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/exporters/otlp.py +0 -0
  42. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/exporters/sentry.py +0 -0
  43. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/exporters/trace_context.py +0 -0
  44. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/hooks.py +0 -0
  45. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/identify.py +0 -0
  46. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/injection.py +0 -0
  47. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/internal.py +0 -0
  48. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/logging.py +0 -0
  49. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/request_extra.py +0 -0
  50. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/sanitization.py +0 -0
  51. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/telemetry.py +0 -0
  52. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/tools.py +0 -0
  53. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/truncation.py +0 -0
  54. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/modules/validation.py +0 -0
  55. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/thirdparty/__init__.py +0 -0
  56. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/thirdparty/ksuid/__init__.py +0 -0
  57. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/thirdparty/ksuid/baseconv.py +0 -0
  58. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/thirdparty/ksuid/ksuid.py +0 -0
  59. {agentcat-2.0.0b5 → agentcat-2.0.2}/src/agentcat/utils.py +0 -0
  60. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/__init__.py +0 -0
  61. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/community/__init__.py +0 -0
  62. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/community/test_community_v3_event_serialization.py +0 -0
  63. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/community/test_community_v3_handles.py +0 -0
  64. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/community/test_community_v3_inject_context.py +0 -0
  65. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/community/test_community_v3_openapi.py +0 -0
  66. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/community/test_community_v3_runtime_state_tools.py +0 -0
  67. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/__init__.py +0 -0
  68. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/_helpers.py +0 -0
  69. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/community_v3/__init__.py +0 -0
  70. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/community_v3/conftest.py +0 -0
  71. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/community_v3/test_agent_handle_http.py +0 -0
  72. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/community_v3/test_event_capture_http.py +0 -0
  73. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/community_v3/test_identify_http.py +0 -0
  74. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/community_v3/test_request_extra_http.py +0 -0
  75. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/community_v3/test_stateless_http.py +0 -0
  76. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/community_v4/__init__.py +0 -0
  77. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/community_v4/conftest.py +0 -0
  78. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/community_v4/test_agent_handle_http.py +0 -0
  79. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/community_v4/test_identify_http.py +0 -0
  80. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/community_v4/test_session_http.py +0 -0
  81. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/community_v4/test_stateless_http.py +0 -0
  82. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/conftest.py +0 -0
  83. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/official/__init__.py +0 -0
  84. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/official/conftest.py +0 -0
  85. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/official/test_agent_handle_http.py +0 -0
  86. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/official/test_event_capture_http.py +0 -0
  87. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/official/test_identify_http.py +0 -0
  88. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/official/test_redaction_http.py +0 -0
  89. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/official/test_request_extra_http.py +0 -0
  90. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/official/test_session_http.py +0 -0
  91. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/official/test_stateless_http.py +0 -0
  92. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/official_modern/__init__.py +0 -0
  93. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/official_modern/conftest.py +0 -0
  94. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/official_modern/test_agent_handle_http.py +0 -0
  95. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/official_modern/test_identify_http.py +0 -0
  96. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/official_modern/test_mcpserver_http.py +0 -0
  97. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/official_modern/test_session_http.py +0 -0
  98. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/e2e/official_modern/test_stateless_http.py +0 -0
  99. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_api_base_url.py +0 -0
  100. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_async_hooks.py +0 -0
  101. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_callpath.py +0 -0
  102. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_client_identity.py +0 -0
  103. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_community_v4_handles.py +0 -0
  104. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_concurrency_handles.py +0 -0
  105. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_constants_copy.py +0 -0
  106. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_customer_owned_parameters.py +0 -0
  107. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_detection.py +0 -0
  108. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_diagnostics_attributes.py +0 -0
  109. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_diagnostics_auth.py +0 -0
  110. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_diagnostics_export.py +0 -0
  111. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_diagnostics_integration.py +0 -0
  112. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_diagnostics_no_payload.py +0 -0
  113. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_diagnostics_optout.py +0 -0
  114. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_diagnostics_record.py +0 -0
  115. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_diagnostics_sink.py +0 -0
  116. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_diagnostics_test_env.py +0 -0
  117. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_dynamic_tracking.py +0 -0
  118. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_event_capture_completeness.py +0 -0
  119. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_event_tags_properties.py +0 -0
  120. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_exceptions.py +0 -0
  121. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_exporter_sdk_version.py +0 -0
  122. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_hook_offload.py +0 -0
  123. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_identify_shape.py +0 -0
  124. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_injection.py +0 -0
  125. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_inner_tap.py +0 -0
  126. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_logging.py +0 -0
  127. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_lowlevel_v1_handles.py +0 -0
  128. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_lowlevel_v2_handles.py +0 -0
  129. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_multiple_servers.py +0 -0
  130. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_options_v2.py +0 -0
  131. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_process_safety.py +0 -0
  132. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_publish_custom_event.py +0 -0
  133. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_rebuild_on_demand.py +0 -0
  134. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_removed_events.py +0 -0
  135. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_report_missing.py +0 -0
  136. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_request_extra.py +0 -0
  137. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_response_shape.py +0 -0
  138. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_sanitization.py +0 -0
  139. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_session_id_validation.py +0 -0
  140. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_tag_validation.py +0 -0
  141. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_tool_context.py +0 -0
  142. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_truncation.py +0 -0
  143. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_truncation_json_safe.py +0 -0
  144. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_utils/__init__.py +0 -0
  145. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_utils/client.py +0 -0
  146. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_utils/community_client.py +0 -0
  147. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_utils/community_openapi_server.py +0 -0
  148. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_utils/community_todo_server.py +0 -0
  149. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_utils/delivery.py +0 -0
  150. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_utils/flavors.py +0 -0
  151. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_utils/modern_server.py +0 -0
  152. {agentcat-2.0.0b5 → agentcat-2.0.2}/tests/test_utils/todo_server.py +0 -0
@@ -149,3 +149,4 @@ CLAUDE.md
149
149
  .claude/
150
150
  .serena/
151
151
  AGENTS.md
152
+ docs/superpowers/
@@ -0,0 +1,264 @@
1
+ Metadata-Version: 2.4
2
+ Name: agentcat
3
+ Version: 2.0.2
4
+ Summary: Analytics tool for MCP (Model Context Protocol) servers, Claude Connectors, and ChatGPT Plugins - tracks tool usage patterns and provides insights
5
+ Project-URL: Homepage, https://github.com/agentcathq/agentcat-python-sdk
6
+ Project-URL: Bug Tracker, https://github.com/agentcathq/agentcat-python-sdk/issues
7
+ Project-URL: Repository, https://github.com/agentcathq/agentcat-python-sdk
8
+ Author-email: "AgentCat, Inc." <support@agentcat.com>
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Requires-Python: >=3.10
19
+ Requires-Dist: agentcat-api==1.0.0
20
+ Requires-Dist: mcp<3,>=1.2.0
21
+ Requires-Dist: pydantic<3,>=2.0.0
22
+ Requires-Dist: requests>=2.31.0
23
+ Provides-Extra: community
24
+ Requires-Dist: fastmcp<5,>=3.0.0; extra == 'community'
25
+ Provides-Extra: dev
26
+ Requires-Dist: freezegun>=1.2.0; extra == 'dev'
27
+ Requires-Dist: mypy>=1.0.0; extra == 'dev'
28
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
29
+ Requires-Dist: pytest>=7.0.0; extra == 'dev'
30
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
31
+ Description-Content-Type: text/markdown
32
+
33
+ <div align="center">
34
+ <img alt="AgentCat — see exactly how agents experience your product" src="docs/static/og-image.png" width="80%">
35
+ </div>
36
+ <h3 align="center">
37
+ <a href="#getting-started">Getting Started</a>
38
+ <span> · </span>
39
+ <a href="#why-use-agentcat-">Features</a>
40
+ <span> · </span>
41
+ <a href="https://docs.agentcat.com">Docs</a>
42
+ <span> · </span>
43
+ <a href="https://agentcat.com">Website</a>
44
+ <span> · </span>
45
+ <a href="#free-for-open-source">Open Source</a>
46
+ <span> · </span>
47
+ <a href="https://meet.agentcat.com/meet">Schedule a Demo</a>
48
+ </h3>
49
+ <p align="center">
50
+ <a href="https://badge.fury.io/py/agentcat"><img src="https://badge.fury.io/py/agentcat.svg" alt="PyPI version"></a>
51
+ <a href="https://pypi.org/project/agentcat/"><img src="https://img.shields.io/pypi/dm/agentcat.svg" alt="PyPI downloads"></a>
52
+ <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT"></a>
53
+ <a href="https://www.python.org/"><img src="https://img.shields.io/badge/python-3.10+-blue.svg" alt="Python"></a>
54
+ <a href="https://github.com/agentcathq/agentcat-python-sdk/issues"><img src="https://img.shields.io/github/issues/agentcathq/agentcat-python-sdk.svg" alt="GitHub issues"></a>
55
+ <a href="https://github.com/agentcathq/agentcat-python-sdk/actions"><img src="https://github.com/agentcathq/agentcat-python-sdk/workflows/MCP%20Version%20Compatibility%20Testing/badge.svg" alt="CI"></a>
56
+ </p>
57
+
58
+ > [!NOTE]
59
+ > AgentCat v2 introduces compatibility with the [MCP Protocol "Stateless" 2026-07-28 Update](https://blog.modelcontextprotocol.io/posts/2026-07-28/) and the coinciding [MCP Python SDK v2](https://github.com/modelcontextprotocol/python-sdk/releases) release that puts it into effect. The stateless transition has a massive impact on analytics, as sessions were a built-in concept tying related tool calls together. AgentCat has now migrated its session tracking under guidance of the MCP core team's recommendations of using [explicit handles (SEP-2567)](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2567).
60
+ >
61
+ > As a result AgentCat now injects a `session_id` on every MCP tool call to associate them under the same task umbrella. Our evals show much higher tool correlation accuracy at the cost of < 1% additional context pollution.
62
+
63
+ > [!IMPORTANT]
64
+ > **MCPcat is now AgentCat** 🐱 — same team, same product, new name. This package was previously published as [`mcpcat`](https://pypi.org/project/mcpcat/), which keeps working forever, but new features land here. Upgrading takes a few minutes — see the [migration guide](./MIGRATION.md).
65
+
66
+ AgentCat is an analytics platform for MCP server owners 🐱. It captures user intentions and behavior patterns to help you understand what AI users actually need from your tools — eliminating guesswork and accelerating product development all with one-line of code.
67
+
68
+ This SDK also provides a free and simple way to forward telemetry like logs, traces, and errors to any Open Telemetry collector or popular tools like Datadog and Sentry.
69
+
70
+ ```bash
71
+ # Basic installation (includes official MCP SDK)
72
+ pip install agentcat
73
+
74
+ # With community FastMCP support
75
+ pip install "agentcat[community]"
76
+ ```
77
+
78
+ To learn more about us, check us out [here](https://agentcat.com). For detailed guides visit our [documentation](https://docs.agentcat.com).
79
+
80
+ ## Why use AgentCat? 🤔
81
+
82
+ AgentCat helps builders of MCP servers, Claude Connectors, and ChatGPT Plugins learn how to improve them by capturing any agents goals and detecting when they get stuck.
83
+
84
+ Use AgentCat for:
85
+
86
+ - **Agent session replay** 🎬. Follow alongside your users and their agents to understand why they're using your MCP servers, what functionality you're missing, and what clients they're coming from.
87
+ - **Trace debugging** 🔍. See where your users are getting stuck, track and find when LLMs get confused by your API, and debug sessions across all deployments of your MCP server.
88
+ - **Existing platform support** 📊. Get logging and tracing out of the box for your existing observability platforms (OpenTelemetry, Datadog, Sentry) — eliminating the tedious work of implementing telemetry yourself.
89
+
90
+ <img alt="AgentCat architecture — the AgentCat SDK inside your MCP server sends analytics to your observability vendors and session replay to the AgentCat dashboard" src="docs/static/architecture.png" />
91
+
92
+ ## How it works
93
+
94
+ AgentCat works as a lightweight middleware inside your MCP server. When you call `track()`, it seamlessly modifies your registered tool schemas in place, following the MCP core team's [explicit handles (SEP-2567)](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2567) guidelines. Concretely, AgentCat adds the following to your server:
95
+
96
+ - **`session_id`** — a parameter injected into each tool's input schema. Agents echo it back on every call, letting AgentCat group related tool calls into one task even over stateless transports. Values are validated: anything AgentCat did not issue is rejected rather than adopted, and the agent is told to re-send the ID it was given.
97
+ - **`agent_id`** _(off by default)_ — enabled with `enable_agent_tracking=True`. Each agent self-generates its own ID, keeping parallel agents working the same task individually attributable.
98
+ - **`context`** — a parameter asking the agent to explain, in one sentence, why it is making this call. This is where intent data comes from.
99
+ - **`get_more_tools`** — an additional tool, prompt-engineered so that agents readily report the features and tools they looked for but couldn't find — surfacing your missing functionality directly from real usage.
100
+
101
+ Injected parameters are stripped from arguments before your tool handler runs, so your code never sees them. For tools that declare an output schema, issued IDs are also mirrored into `structuredContent` (as `_mcp_instructions`), so clients that only read structured results still receive them.
102
+
103
+ ## Getting Started
104
+
105
+ To get started with AgentCat, first create an account and obtain your project ID by signing up at [agentcat.com](https://agentcat.com). For detailed setup instructions visit our [documentation](https://docs.agentcat.com).
106
+
107
+ Once you have your project ID, integrate AgentCat into your MCP server:
108
+
109
+ ```python
110
+ import agentcat
111
+ from mcp.server.mcpserver import MCPServer
112
+
113
+ server = MCPServer("echo-mcp", version="0.1.0")
114
+
115
+ @server.tool(description="Echo a message")
116
+ def echo(msg: str) -> str:
117
+ return msg
118
+
119
+ # Track the server with AgentCat
120
+ agentcat.track(server, "proj_0000000")
121
+ ```
122
+
123
+ Stateless servers built on [MCP 2026-07-28](https://blog.modelcontextprotocol.io/posts/2026-07-28/) create a fresh server instance per worker or per tenant, serving each request with `stateless_http=True`. Call `track()` inside the factory so every instance is tracked:
124
+
125
+ ```python
126
+ import agentcat
127
+ from mcp.server.mcpserver import MCPServer
128
+
129
+ def create_server() -> MCPServer:
130
+ server = MCPServer("echo-mcp", version="0.1.0")
131
+ # register tools...
132
+ agentcat.track(server, "proj_0000000")
133
+ return server
134
+
135
+ server = create_server()
136
+ server.run(transport="streamable-http", stateless_http=True)
137
+ ```
138
+
139
+ Calling `track()` per instance is cheap — the event queue, telemetry exporters, and diagnostics are initialized once and shared across instances.
140
+
141
+ ### Identifying users
142
+
143
+ We strongly encourage identifying every actor. If you can't resolve a real user, return a stable anonymized ID instead — for example, a hash of the auth token or API key — so that all events from the same end user still roll up to one actor in your dashboard rather than scattering into anonymous one-off sessions.
144
+
145
+ `identify` (like every AgentCat hook) may be sync or async and runs on every tool call, ahead of your handler: a hook that fails outright — or returns anything that is not a `UserIdentity` — costs analytics data for that event, never the call itself. Every hook runs under a 5-second cap, and a slow lookup delays that call's response — so keep it cheap, and add your own caching if it does a database or API lookup.
146
+
147
+ The callback receives the tool call's `request` params (`.name` and `.arguments`, a plain dict) and the request context the SDK hands to handlers — the same `(request, extra)` shape on every supported server flavor. On HTTP transports, identity signals like headers and auth live on `extra.request`:
148
+
149
+ ```python
150
+ from agentcat import AgentCatOptions, UserIdentity
151
+
152
+ async def identify(request, extra):
153
+ http = getattr(extra, "request", None) # incoming HTTP request, when present
154
+ token = http.headers.get("authorization") if http else None
155
+ org_id = http.headers.get("x-org-id") if http else None
156
+ user = await myapi.get_user(token)
157
+ if not user:
158
+ return None
159
+ return UserIdentity(user_id=user.id, user_name=user.name, user_data={"org_id": org_id})
160
+
161
+ agentcat.track(server, "proj_0000000", AgentCatOptions(identify=identify))
162
+ ```
163
+
164
+ ### Redacting sensitive data
165
+
166
+ AgentCat redacts all data sent to its servers and encrypts at rest, but for additional security, it offers a hook to do your own redaction on all text data returned back to our servers.
167
+
168
+ ```python
169
+ from agentcat import AgentCatOptions
170
+
171
+ async def redact(text: str) -> str:
172
+ return await redactor(text)
173
+ # or a plain sync function — both are supported
174
+
175
+ agentcat.track(server, "proj_0000000", AgentCatOptions(redact_sensitive_information=redact))
176
+ ```
177
+
178
+ For redaction decisions that need more context than a single string — such as which tool was called or what type of event is being published — use the event-level `redact_event` hook. It receives the full event and returns a modified event, or `None` to drop the event entirely. It may be sync or async, runs before `redact_sensitive_information` (so it sees raw values), and can be combined with it.
179
+
180
+ Mutate the event you're given and return it, as in the example below — don't construct or return a different `Event`. The return value replaces the event's fields wholesale, not as a diff against the original, so returning a partial or freshly-built event will silently drop every field you didn't set.
181
+
182
+ ```python
183
+ from agentcat import AgentCatOptions
184
+
185
+ def redact_event(event):
186
+ # Drop events from tools that handle secrets entirely
187
+ if event.resource_name == "get_credentials":
188
+ return None
189
+ # Strip response payloads from a specific tool
190
+ if event.resource_name == "export_report":
191
+ event.response = None
192
+ return event
193
+
194
+ agentcat.track(server, "proj_0000000", AgentCatOptions(redact_event=redact_event))
195
+ ```
196
+
197
+ ### Vendor Support
198
+
199
+ AgentCat seamlessly integrates with your existing observability stack, providing automatic logging and tracing without the tedious setup typically required. Export telemetry data to multiple platforms simultaneously:
200
+
201
+ ```python
202
+ import os
203
+
204
+ from agentcat import AgentCatOptions
205
+
206
+ agentcat.track(
207
+ server,
208
+ "proj_0000", # Project ID can optionally be None if you just want to forward telemetry
209
+ AgentCatOptions(
210
+ exporters={
211
+ "otlp": {
212
+ "type": "otlp",
213
+ "endpoint": "http://localhost:4318/v1/traces",
214
+ },
215
+ "datadog": {
216
+ "type": "datadog",
217
+ "api_key": os.environ["DD_API_KEY"],
218
+ "site": "datadoghq.com",
219
+ "service": "my-mcp-server",
220
+ },
221
+ "sentry": {
222
+ "type": "sentry",
223
+ "dsn": os.environ["SENTRY_DSN"],
224
+ "environment": "production",
225
+ },
226
+ }
227
+ ),
228
+ )
229
+ ```
230
+
231
+ Learn more about our free and open source [telemetry integrations](https://docs.agentcat.com/telemetry/integrations).
232
+
233
+ ### Internal diagnostics
234
+
235
+ To help us catch and fix broken installs, the SDK sends AgentCat a small, anonymized
236
+ signal when setup or runtime errors occur — never your tool calls, your responses,
237
+ or anything about your users. Records carry only operational metadata, such as your
238
+ project ID (or an anonymous install ID when none is set). Your local `~/agentcat.log`
239
+ is unchanged.
240
+
241
+ Diagnostics are on by default and can be turned off completely with either:
242
+
243
+ - `track(server, project_id, AgentCatOptions(disable_diagnostics=True))`, or
244
+ - the `DISABLE_DIAGNOSTICS` environment variable.
245
+
246
+ ## Free for open source
247
+
248
+ AgentCat is free for qualified open source projects. We believe in supporting the ecosystem that makes MCP possible. If you maintain an open source MCP server, you can access our full analytics platform at no cost.
249
+
250
+ **How to apply**: Email [hi@agentcat.com](mailto:hi@agentcat.com) with your repository link
251
+
252
+ _Already using AgentCat? We'll upgrade your account immediately._
253
+
254
+ ## Community Cats 🐱
255
+
256
+ Meet the cats behind AgentCat! Add your cat to our community by submitting a PR with your cat's photo in the `docs/cats/` directory.
257
+
258
+ <div align="left">
259
+ <img src="docs/cats/bibi.png" alt="bibi" width="80" height="80">
260
+ <img src="docs/cats/zelda.jpg" alt="zelda" width="80" height="80">
261
+ <img src="docs/cats/void.jpg" alt="void" width="80" height="80">
262
+ </div>
263
+
264
+ _Want to add your cat? Create a PR adding your cat's photo to_ `docs/cats/` _and update this section!_
@@ -0,0 +1,232 @@
1
+ <div align="center">
2
+ <img alt="AgentCat — see exactly how agents experience your product" src="docs/static/og-image.png" width="80%">
3
+ </div>
4
+ <h3 align="center">
5
+ <a href="#getting-started">Getting Started</a>
6
+ <span> · </span>
7
+ <a href="#why-use-agentcat-">Features</a>
8
+ <span> · </span>
9
+ <a href="https://docs.agentcat.com">Docs</a>
10
+ <span> · </span>
11
+ <a href="https://agentcat.com">Website</a>
12
+ <span> · </span>
13
+ <a href="#free-for-open-source">Open Source</a>
14
+ <span> · </span>
15
+ <a href="https://meet.agentcat.com/meet">Schedule a Demo</a>
16
+ </h3>
17
+ <p align="center">
18
+ <a href="https://badge.fury.io/py/agentcat"><img src="https://badge.fury.io/py/agentcat.svg" alt="PyPI version"></a>
19
+ <a href="https://pypi.org/project/agentcat/"><img src="https://img.shields.io/pypi/dm/agentcat.svg" alt="PyPI downloads"></a>
20
+ <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT"></a>
21
+ <a href="https://www.python.org/"><img src="https://img.shields.io/badge/python-3.10+-blue.svg" alt="Python"></a>
22
+ <a href="https://github.com/agentcathq/agentcat-python-sdk/issues"><img src="https://img.shields.io/github/issues/agentcathq/agentcat-python-sdk.svg" alt="GitHub issues"></a>
23
+ <a href="https://github.com/agentcathq/agentcat-python-sdk/actions"><img src="https://github.com/agentcathq/agentcat-python-sdk/workflows/MCP%20Version%20Compatibility%20Testing/badge.svg" alt="CI"></a>
24
+ </p>
25
+
26
+ > [!NOTE]
27
+ > AgentCat v2 introduces compatibility with the [MCP Protocol "Stateless" 2026-07-28 Update](https://blog.modelcontextprotocol.io/posts/2026-07-28/) and the coinciding [MCP Python SDK v2](https://github.com/modelcontextprotocol/python-sdk/releases) release that puts it into effect. The stateless transition has a massive impact on analytics, as sessions were a built-in concept tying related tool calls together. AgentCat has now migrated its session tracking under guidance of the MCP core team's recommendations of using [explicit handles (SEP-2567)](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2567).
28
+ >
29
+ > As a result AgentCat now injects a `session_id` on every MCP tool call to associate them under the same task umbrella. Our evals show much higher tool correlation accuracy at the cost of < 1% additional context pollution.
30
+
31
+ > [!IMPORTANT]
32
+ > **MCPcat is now AgentCat** 🐱 — same team, same product, new name. This package was previously published as [`mcpcat`](https://pypi.org/project/mcpcat/), which keeps working forever, but new features land here. Upgrading takes a few minutes — see the [migration guide](./MIGRATION.md).
33
+
34
+ AgentCat is an analytics platform for MCP server owners 🐱. It captures user intentions and behavior patterns to help you understand what AI users actually need from your tools — eliminating guesswork and accelerating product development all with one-line of code.
35
+
36
+ This SDK also provides a free and simple way to forward telemetry like logs, traces, and errors to any Open Telemetry collector or popular tools like Datadog and Sentry.
37
+
38
+ ```bash
39
+ # Basic installation (includes official MCP SDK)
40
+ pip install agentcat
41
+
42
+ # With community FastMCP support
43
+ pip install "agentcat[community]"
44
+ ```
45
+
46
+ To learn more about us, check us out [here](https://agentcat.com). For detailed guides visit our [documentation](https://docs.agentcat.com).
47
+
48
+ ## Why use AgentCat? 🤔
49
+
50
+ AgentCat helps builders of MCP servers, Claude Connectors, and ChatGPT Plugins learn how to improve them by capturing any agents goals and detecting when they get stuck.
51
+
52
+ Use AgentCat for:
53
+
54
+ - **Agent session replay** 🎬. Follow alongside your users and their agents to understand why they're using your MCP servers, what functionality you're missing, and what clients they're coming from.
55
+ - **Trace debugging** 🔍. See where your users are getting stuck, track and find when LLMs get confused by your API, and debug sessions across all deployments of your MCP server.
56
+ - **Existing platform support** 📊. Get logging and tracing out of the box for your existing observability platforms (OpenTelemetry, Datadog, Sentry) — eliminating the tedious work of implementing telemetry yourself.
57
+
58
+ <img alt="AgentCat architecture — the AgentCat SDK inside your MCP server sends analytics to your observability vendors and session replay to the AgentCat dashboard" src="docs/static/architecture.png" />
59
+
60
+ ## How it works
61
+
62
+ AgentCat works as a lightweight middleware inside your MCP server. When you call `track()`, it seamlessly modifies your registered tool schemas in place, following the MCP core team's [explicit handles (SEP-2567)](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2567) guidelines. Concretely, AgentCat adds the following to your server:
63
+
64
+ - **`session_id`** — a parameter injected into each tool's input schema. Agents echo it back on every call, letting AgentCat group related tool calls into one task even over stateless transports. Values are validated: anything AgentCat did not issue is rejected rather than adopted, and the agent is told to re-send the ID it was given.
65
+ - **`agent_id`** _(off by default)_ — enabled with `enable_agent_tracking=True`. Each agent self-generates its own ID, keeping parallel agents working the same task individually attributable.
66
+ - **`context`** — a parameter asking the agent to explain, in one sentence, why it is making this call. This is where intent data comes from.
67
+ - **`get_more_tools`** — an additional tool, prompt-engineered so that agents readily report the features and tools they looked for but couldn't find — surfacing your missing functionality directly from real usage.
68
+
69
+ Injected parameters are stripped from arguments before your tool handler runs, so your code never sees them. For tools that declare an output schema, issued IDs are also mirrored into `structuredContent` (as `_mcp_instructions`), so clients that only read structured results still receive them.
70
+
71
+ ## Getting Started
72
+
73
+ To get started with AgentCat, first create an account and obtain your project ID by signing up at [agentcat.com](https://agentcat.com). For detailed setup instructions visit our [documentation](https://docs.agentcat.com).
74
+
75
+ Once you have your project ID, integrate AgentCat into your MCP server:
76
+
77
+ ```python
78
+ import agentcat
79
+ from mcp.server.mcpserver import MCPServer
80
+
81
+ server = MCPServer("echo-mcp", version="0.1.0")
82
+
83
+ @server.tool(description="Echo a message")
84
+ def echo(msg: str) -> str:
85
+ return msg
86
+
87
+ # Track the server with AgentCat
88
+ agentcat.track(server, "proj_0000000")
89
+ ```
90
+
91
+ Stateless servers built on [MCP 2026-07-28](https://blog.modelcontextprotocol.io/posts/2026-07-28/) create a fresh server instance per worker or per tenant, serving each request with `stateless_http=True`. Call `track()` inside the factory so every instance is tracked:
92
+
93
+ ```python
94
+ import agentcat
95
+ from mcp.server.mcpserver import MCPServer
96
+
97
+ def create_server() -> MCPServer:
98
+ server = MCPServer("echo-mcp", version="0.1.0")
99
+ # register tools...
100
+ agentcat.track(server, "proj_0000000")
101
+ return server
102
+
103
+ server = create_server()
104
+ server.run(transport="streamable-http", stateless_http=True)
105
+ ```
106
+
107
+ Calling `track()` per instance is cheap — the event queue, telemetry exporters, and diagnostics are initialized once and shared across instances.
108
+
109
+ ### Identifying users
110
+
111
+ We strongly encourage identifying every actor. If you can't resolve a real user, return a stable anonymized ID instead — for example, a hash of the auth token or API key — so that all events from the same end user still roll up to one actor in your dashboard rather than scattering into anonymous one-off sessions.
112
+
113
+ `identify` (like every AgentCat hook) may be sync or async and runs on every tool call, ahead of your handler: a hook that fails outright — or returns anything that is not a `UserIdentity` — costs analytics data for that event, never the call itself. Every hook runs under a 5-second cap, and a slow lookup delays that call's response — so keep it cheap, and add your own caching if it does a database or API lookup.
114
+
115
+ The callback receives the tool call's `request` params (`.name` and `.arguments`, a plain dict) and the request context the SDK hands to handlers — the same `(request, extra)` shape on every supported server flavor. On HTTP transports, identity signals like headers and auth live on `extra.request`:
116
+
117
+ ```python
118
+ from agentcat import AgentCatOptions, UserIdentity
119
+
120
+ async def identify(request, extra):
121
+ http = getattr(extra, "request", None) # incoming HTTP request, when present
122
+ token = http.headers.get("authorization") if http else None
123
+ org_id = http.headers.get("x-org-id") if http else None
124
+ user = await myapi.get_user(token)
125
+ if not user:
126
+ return None
127
+ return UserIdentity(user_id=user.id, user_name=user.name, user_data={"org_id": org_id})
128
+
129
+ agentcat.track(server, "proj_0000000", AgentCatOptions(identify=identify))
130
+ ```
131
+
132
+ ### Redacting sensitive data
133
+
134
+ AgentCat redacts all data sent to its servers and encrypts at rest, but for additional security, it offers a hook to do your own redaction on all text data returned back to our servers.
135
+
136
+ ```python
137
+ from agentcat import AgentCatOptions
138
+
139
+ async def redact(text: str) -> str:
140
+ return await redactor(text)
141
+ # or a plain sync function — both are supported
142
+
143
+ agentcat.track(server, "proj_0000000", AgentCatOptions(redact_sensitive_information=redact))
144
+ ```
145
+
146
+ For redaction decisions that need more context than a single string — such as which tool was called or what type of event is being published — use the event-level `redact_event` hook. It receives the full event and returns a modified event, or `None` to drop the event entirely. It may be sync or async, runs before `redact_sensitive_information` (so it sees raw values), and can be combined with it.
147
+
148
+ Mutate the event you're given and return it, as in the example below — don't construct or return a different `Event`. The return value replaces the event's fields wholesale, not as a diff against the original, so returning a partial or freshly-built event will silently drop every field you didn't set.
149
+
150
+ ```python
151
+ from agentcat import AgentCatOptions
152
+
153
+ def redact_event(event):
154
+ # Drop events from tools that handle secrets entirely
155
+ if event.resource_name == "get_credentials":
156
+ return None
157
+ # Strip response payloads from a specific tool
158
+ if event.resource_name == "export_report":
159
+ event.response = None
160
+ return event
161
+
162
+ agentcat.track(server, "proj_0000000", AgentCatOptions(redact_event=redact_event))
163
+ ```
164
+
165
+ ### Vendor Support
166
+
167
+ AgentCat seamlessly integrates with your existing observability stack, providing automatic logging and tracing without the tedious setup typically required. Export telemetry data to multiple platforms simultaneously:
168
+
169
+ ```python
170
+ import os
171
+
172
+ from agentcat import AgentCatOptions
173
+
174
+ agentcat.track(
175
+ server,
176
+ "proj_0000", # Project ID can optionally be None if you just want to forward telemetry
177
+ AgentCatOptions(
178
+ exporters={
179
+ "otlp": {
180
+ "type": "otlp",
181
+ "endpoint": "http://localhost:4318/v1/traces",
182
+ },
183
+ "datadog": {
184
+ "type": "datadog",
185
+ "api_key": os.environ["DD_API_KEY"],
186
+ "site": "datadoghq.com",
187
+ "service": "my-mcp-server",
188
+ },
189
+ "sentry": {
190
+ "type": "sentry",
191
+ "dsn": os.environ["SENTRY_DSN"],
192
+ "environment": "production",
193
+ },
194
+ }
195
+ ),
196
+ )
197
+ ```
198
+
199
+ Learn more about our free and open source [telemetry integrations](https://docs.agentcat.com/telemetry/integrations).
200
+
201
+ ### Internal diagnostics
202
+
203
+ To help us catch and fix broken installs, the SDK sends AgentCat a small, anonymized
204
+ signal when setup or runtime errors occur — never your tool calls, your responses,
205
+ or anything about your users. Records carry only operational metadata, such as your
206
+ project ID (or an anonymous install ID when none is set). Your local `~/agentcat.log`
207
+ is unchanged.
208
+
209
+ Diagnostics are on by default and can be turned off completely with either:
210
+
211
+ - `track(server, project_id, AgentCatOptions(disable_diagnostics=True))`, or
212
+ - the `DISABLE_DIAGNOSTICS` environment variable.
213
+
214
+ ## Free for open source
215
+
216
+ AgentCat is free for qualified open source projects. We believe in supporting the ecosystem that makes MCP possible. If you maintain an open source MCP server, you can access our full analytics platform at no cost.
217
+
218
+ **How to apply**: Email [hi@agentcat.com](mailto:hi@agentcat.com) with your repository link
219
+
220
+ _Already using AgentCat? We'll upgrade your account immediately._
221
+
222
+ ## Community Cats 🐱
223
+
224
+ Meet the cats behind AgentCat! Add your cat to our community by submitting a PR with your cat's photo in the `docs/cats/` directory.
225
+
226
+ <div align="left">
227
+ <img src="docs/cats/bibi.png" alt="bibi" width="80" height="80">
228
+ <img src="docs/cats/zelda.jpg" alt="zelda" width="80" height="80">
229
+ <img src="docs/cats/void.jpg" alt="void" width="80" height="80">
230
+ </div>
231
+
232
+ _Want to add your cat? Create a PR adding your cat's photo to_ `docs/cats/` _and update this section!_
Binary file
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "agentcat"
3
- version = "2.0.0b5"
3
+ version = "2.0.2"
4
4
  description = "Analytics tool for MCP (Model Context Protocol) servers, Claude Connectors, and ChatGPT Plugins - tracks tool usage patterns and provides insights"
5
5
  authors = [
6
6
  { name = "AgentCat, Inc.", email = "support@agentcat.com" },
@@ -25,6 +25,7 @@ from .types import (
25
25
  EventPropertiesFunction,
26
26
  EventTagsFunction,
27
27
  IdentifyFunction,
28
+ RedactEventFunction,
28
29
  RedactionFunction,
29
30
  ResolveSessionIdFunction,
30
31
  UnredactedEvent,
@@ -449,8 +450,9 @@ __all__ = [
449
450
  # Types for identify functionality
450
451
  "UserIdentity",
451
452
  "IdentifyFunction",
452
- # Type for redaction functionality
453
+ # Types for redaction functionality
453
454
  "RedactionFunction",
455
+ "RedactEventFunction",
454
456
  # Types for event metadata callbacks
455
457
  "EventTagsFunction",
456
458
  "EventPropertiesFunction",