agentcat 2.0.0b3__tar.gz → 2.0.1__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 (153) hide show
  1. {agentcat-2.0.0b3 → agentcat-2.0.1}/.gitignore +1 -0
  2. agentcat-2.0.1/PKG-INFO +245 -0
  3. agentcat-2.0.1/README.md +213 -0
  4. agentcat-2.0.1/docs/cats/void.jpg +0 -0
  5. {agentcat-2.0.0b3 → agentcat-2.0.1}/pyproject.toml +3 -3
  6. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/__init__.py +8 -3
  7. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/adapters/community.py +252 -95
  8. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/adapters/lowlevel_v1.py +40 -19
  9. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/adapters/lowlevel_v2.py +56 -14
  10. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/callpath.py +12 -6
  11. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/constants.py +4 -0
  12. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/diagnostics.py +24 -3
  13. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/event_queue.py +148 -82
  14. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/exceptions.py +124 -65
  15. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/exporters/otlp.py +24 -1
  16. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/handles.py +6 -2
  17. agentcat-2.0.1/src/agentcat/modules/hooks.py +233 -0
  18. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/identify.py +2 -4
  19. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/injection.py +42 -7
  20. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/internal.py +3 -3
  21. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/logging.py +29 -8
  22. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/types.py +3 -1
  23. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/utils.py +17 -0
  24. agentcat-2.0.1/tests/community/test_community_v3_nested_calls.py +403 -0
  25. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/conftest.py +1 -0
  26. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/conftest.py +1 -1
  27. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_async_hooks.py +10 -2
  28. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_callpath.py +31 -5
  29. agentcat-2.0.1/tests/test_community_v4_nested_calls.py +109 -0
  30. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_diagnostics_attributes.py +16 -0
  31. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_diagnostics_export.py +61 -0
  32. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_diagnostics_sink.py +2 -1
  33. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_event_capture_completeness.py +11 -11
  34. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_event_queue.py +142 -113
  35. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_event_tags_properties.py +3 -3
  36. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_exceptions.py +141 -1
  37. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_exporter_sdk_version.py +62 -0
  38. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_handles.py +10 -0
  39. agentcat-2.0.1/tests/test_hook_offload.py +207 -0
  40. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_injection.py +58 -8
  41. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_logging.py +162 -2
  42. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_lowlevel_v1_handles.py +48 -0
  43. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_lowlevel_v2_handles.py +48 -0
  44. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_multiple_servers.py +4 -4
  45. agentcat-2.0.1/tests/test_process_safety.py +265 -0
  46. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_rebuild_on_demand.py +79 -0
  47. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_request_extra.py +3 -3
  48. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_tool_context.py +1 -1
  49. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_truncation.py +1 -1
  50. agentcat-2.0.1/tests/test_utils/community_catalog_server.py +180 -0
  51. agentcat-2.0.0b3/PKG-INFO +0 -345
  52. agentcat-2.0.0b3/README.md +0 -313
  53. agentcat-2.0.0b3/src/agentcat/modules/hooks.py +0 -118
  54. {agentcat-2.0.0b3 → agentcat-2.0.1}/CONTRIBUTING.md +0 -0
  55. {agentcat-2.0.0b3 → agentcat-2.0.1}/LICENSE +0 -0
  56. {agentcat-2.0.0b3 → agentcat-2.0.1}/docs/cats/bibi.png +0 -0
  57. {agentcat-2.0.0b3 → agentcat-2.0.1}/docs/cats/zelda.jpg +0 -0
  58. {agentcat-2.0.0b3 → agentcat-2.0.1}/docs/static/architecture.png +0 -0
  59. {agentcat-2.0.0b3 → agentcat-2.0.1}/docs/static/og-image.png +0 -0
  60. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/__init__.py +0 -0
  61. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/adapters/__init__.py +0 -0
  62. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/adapters/_common.py +0 -0
  63. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/adapters/_inner_tap.py +0 -0
  64. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/client_identity.py +0 -0
  65. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/detection.py +0 -0
  66. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/exporters/__init__.py +0 -0
  67. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/exporters/datadog.py +0 -0
  68. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/exporters/sentry.py +0 -0
  69. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/exporters/trace_context.py +0 -0
  70. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/redaction.py +0 -0
  71. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/request_extra.py +0 -0
  72. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/sanitization.py +0 -0
  73. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/telemetry.py +0 -0
  74. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/tools.py +0 -0
  75. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/truncation.py +0 -0
  76. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/modules/validation.py +0 -0
  77. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/thirdparty/__init__.py +0 -0
  78. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/thirdparty/ksuid/__init__.py +0 -0
  79. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/thirdparty/ksuid/baseconv.py +0 -0
  80. {agentcat-2.0.0b3 → agentcat-2.0.1}/src/agentcat/thirdparty/ksuid/ksuid.py +0 -0
  81. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/__init__.py +0 -0
  82. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/community/__init__.py +0 -0
  83. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/community/test_community_v3_event_serialization.py +0 -0
  84. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/community/test_community_v3_handles.py +0 -0
  85. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/community/test_community_v3_inject_context.py +0 -0
  86. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/community/test_community_v3_openapi.py +0 -0
  87. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/community/test_community_v3_runtime_state_tools.py +0 -0
  88. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/__init__.py +0 -0
  89. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/_helpers.py +0 -0
  90. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/community_v3/__init__.py +0 -0
  91. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/community_v3/conftest.py +0 -0
  92. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/community_v3/test_agent_handle_http.py +0 -0
  93. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/community_v3/test_event_capture_http.py +0 -0
  94. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/community_v3/test_identify_http.py +0 -0
  95. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/community_v3/test_request_extra_http.py +0 -0
  96. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/community_v3/test_stateless_http.py +0 -0
  97. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/community_v4/__init__.py +0 -0
  98. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/community_v4/conftest.py +0 -0
  99. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/community_v4/test_agent_handle_http.py +0 -0
  100. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/community_v4/test_identify_http.py +0 -0
  101. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/community_v4/test_session_http.py +0 -0
  102. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/community_v4/test_stateless_http.py +0 -0
  103. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/official/__init__.py +0 -0
  104. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/official/conftest.py +0 -0
  105. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/official/test_agent_handle_http.py +0 -0
  106. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/official/test_event_capture_http.py +0 -0
  107. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/official/test_identify_http.py +0 -0
  108. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/official/test_redaction_http.py +0 -0
  109. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/official/test_request_extra_http.py +0 -0
  110. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/official/test_session_http.py +0 -0
  111. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/official/test_stateless_http.py +0 -0
  112. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/official_modern/__init__.py +0 -0
  113. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/official_modern/conftest.py +0 -0
  114. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/official_modern/test_agent_handle_http.py +0 -0
  115. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/official_modern/test_identify_http.py +0 -0
  116. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/official_modern/test_mcpserver_http.py +0 -0
  117. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/official_modern/test_session_http.py +0 -0
  118. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/e2e/official_modern/test_stateless_http.py +0 -0
  119. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_api_base_url.py +0 -0
  120. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_client_identity.py +0 -0
  121. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_community_v4_handles.py +0 -0
  122. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_concurrency_handles.py +0 -0
  123. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_constants_copy.py +0 -0
  124. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_customer_owned_parameters.py +0 -0
  125. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_detection.py +0 -0
  126. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_diagnostics_auth.py +0 -0
  127. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_diagnostics_integration.py +0 -0
  128. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_diagnostics_no_payload.py +0 -0
  129. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_diagnostics_optout.py +0 -0
  130. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_diagnostics_record.py +0 -0
  131. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_diagnostics_test_env.py +0 -0
  132. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_dynamic_tracking.py +0 -0
  133. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_identify_shape.py +0 -0
  134. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_inner_tap.py +0 -0
  135. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_options_v2.py +0 -0
  136. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_publish_custom_event.py +0 -0
  137. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_redaction.py +0 -0
  138. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_removed_events.py +0 -0
  139. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_report_missing.py +0 -0
  140. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_response_shape.py +0 -0
  141. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_sanitization.py +0 -0
  142. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_session_id_validation.py +0 -0
  143. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_tag_validation.py +0 -0
  144. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_truncation_json_safe.py +0 -0
  145. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_utils/__init__.py +0 -0
  146. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_utils/client.py +0 -0
  147. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_utils/community_client.py +0 -0
  148. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_utils/community_openapi_server.py +0 -0
  149. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_utils/community_todo_server.py +0 -0
  150. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_utils/delivery.py +0 -0
  151. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_utils/flavors.py +0 -0
  152. {agentcat-2.0.0b3 → agentcat-2.0.1}/tests/test_utils/modern_server.py +0 -0
  153. {agentcat-2.0.0b3 → agentcat-2.0.1}/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,245 @@
1
+ Metadata-Version: 2.4
2
+ Name: agentcat
3
+ Version: 2.0.1
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
+ ### Vendor Support
179
+
180
+ 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:
181
+
182
+ ```python
183
+ import os
184
+
185
+ from agentcat import AgentCatOptions
186
+
187
+ agentcat.track(
188
+ server,
189
+ "proj_0000", # Project ID can optionally be None if you just want to forward telemetry
190
+ AgentCatOptions(
191
+ exporters={
192
+ "otlp": {
193
+ "type": "otlp",
194
+ "endpoint": "http://localhost:4318/v1/traces",
195
+ },
196
+ "datadog": {
197
+ "type": "datadog",
198
+ "api_key": os.environ["DD_API_KEY"],
199
+ "site": "datadoghq.com",
200
+ "service": "my-mcp-server",
201
+ },
202
+ "sentry": {
203
+ "type": "sentry",
204
+ "dsn": os.environ["SENTRY_DSN"],
205
+ "environment": "production",
206
+ },
207
+ }
208
+ ),
209
+ )
210
+ ```
211
+
212
+ Learn more about our free and open source [telemetry integrations](https://docs.agentcat.com/telemetry/integrations).
213
+
214
+ ### Internal diagnostics
215
+
216
+ To help us catch and fix broken installs, the SDK sends AgentCat a small, anonymized
217
+ signal when setup or runtime errors occur — never your tool calls, your responses,
218
+ or anything about your users. Records carry only operational metadata, such as your
219
+ project ID (or an anonymous install ID when none is set). Your local `~/agentcat.log`
220
+ is unchanged.
221
+
222
+ Diagnostics are on by default and can be turned off completely with either:
223
+
224
+ - `track(server, project_id, AgentCatOptions(disable_diagnostics=True))`, or
225
+ - the `DISABLE_DIAGNOSTICS` environment variable.
226
+
227
+ ## Free for open source
228
+
229
+ 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.
230
+
231
+ **How to apply**: Email [hi@agentcat.com](mailto:hi@agentcat.com) with your repository link
232
+
233
+ _Already using AgentCat? We'll upgrade your account immediately._
234
+
235
+ ## Community Cats 🐱
236
+
237
+ 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.
238
+
239
+ <div align="left">
240
+ <img src="docs/cats/bibi.png" alt="bibi" width="80" height="80">
241
+ <img src="docs/cats/zelda.jpg" alt="zelda" width="80" height="80">
242
+ <img src="docs/cats/void.jpg" alt="void" width="80" height="80">
243
+ </div>
244
+
245
+ _Want to add your cat? Create a PR adding your cat's photo to_ `docs/cats/` _and update this section!_
@@ -0,0 +1,213 @@
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
+ ### Vendor Support
147
+
148
+ 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:
149
+
150
+ ```python
151
+ import os
152
+
153
+ from agentcat import AgentCatOptions
154
+
155
+ agentcat.track(
156
+ server,
157
+ "proj_0000", # Project ID can optionally be None if you just want to forward telemetry
158
+ AgentCatOptions(
159
+ exporters={
160
+ "otlp": {
161
+ "type": "otlp",
162
+ "endpoint": "http://localhost:4318/v1/traces",
163
+ },
164
+ "datadog": {
165
+ "type": "datadog",
166
+ "api_key": os.environ["DD_API_KEY"],
167
+ "site": "datadoghq.com",
168
+ "service": "my-mcp-server",
169
+ },
170
+ "sentry": {
171
+ "type": "sentry",
172
+ "dsn": os.environ["SENTRY_DSN"],
173
+ "environment": "production",
174
+ },
175
+ }
176
+ ),
177
+ )
178
+ ```
179
+
180
+ Learn more about our free and open source [telemetry integrations](https://docs.agentcat.com/telemetry/integrations).
181
+
182
+ ### Internal diagnostics
183
+
184
+ To help us catch and fix broken installs, the SDK sends AgentCat a small, anonymized
185
+ signal when setup or runtime errors occur — never your tool calls, your responses,
186
+ or anything about your users. Records carry only operational metadata, such as your
187
+ project ID (or an anonymous install ID when none is set). Your local `~/agentcat.log`
188
+ is unchanged.
189
+
190
+ Diagnostics are on by default and can be turned off completely with either:
191
+
192
+ - `track(server, project_id, AgentCatOptions(disable_diagnostics=True))`, or
193
+ - the `DISABLE_DIAGNOSTICS` environment variable.
194
+
195
+ ## Free for open source
196
+
197
+ 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.
198
+
199
+ **How to apply**: Email [hi@agentcat.com](mailto:hi@agentcat.com) with your repository link
200
+
201
+ _Already using AgentCat? We'll upgrade your account immediately._
202
+
203
+ ## Community Cats 🐱
204
+
205
+ 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.
206
+
207
+ <div align="left">
208
+ <img src="docs/cats/bibi.png" alt="bibi" width="80" height="80">
209
+ <img src="docs/cats/zelda.jpg" alt="zelda" width="80" height="80">
210
+ <img src="docs/cats/void.jpg" alt="void" width="80" height="80">
211
+ </div>
212
+
213
+ _Want to add your cat? Create a PR adding your cat's photo to_ `docs/cats/` _and update this section!_
Binary file
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "agentcat"
3
- version = "2.0.0b3"
4
- description = "Analytics tool for MCP (Model Context Protocol) servers and AI agents - tracks tool usage patterns and provides insights"
3
+ version = "2.0.1"
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" },
7
7
  ]
@@ -9,7 +9,7 @@ readme = "README.md"
9
9
  license = { text = "MIT" }
10
10
  requires-python = ">=3.10"
11
11
  classifiers = [
12
- "Development Status :: 4 - Beta",
12
+ "Development Status :: 5 - Production/Stable",
13
13
  "Intended Audience :: Developers",
14
14
  "License :: OSI Approved :: MIT License",
15
15
  "Programming Language :: Python :: 3",
@@ -3,10 +3,14 @@
3
3
  import os
4
4
  from collections.abc import Mapping
5
5
  from datetime import datetime, timezone
6
- from importlib.metadata import version
7
6
  from typing import Any
8
7
 
9
- __version__ = version("agentcat")
8
+ from .utils import get_agentcat_version
9
+
10
+ # Guarded: on installs without distribution metadata (vendored source trees,
11
+ # PYTHONPATH, PyInstaller bundles) the lookup fails — that must degrade the
12
+ # version string, never crash the customer's import.
13
+ __version__ = get_agentcat_version() or "0.0.0"
10
14
 
11
15
  from .modules.constants import AGENTCAT_CUSTOM_EVENT_TYPE
12
16
  from .modules.detection import Detection, ServerFlavor, detect_server
@@ -85,7 +89,8 @@ def track(
85
89
  if options is None:
86
90
  options = AgentCatOptions()
87
91
 
88
- set_debug_mode(options.debug_mode)
92
+ if options.debug_mode is not None:
93
+ set_debug_mode(options.debug_mode)
89
94
 
90
95
  # Initialize internal diagnostics before anything can fail, so even an
91
96
  # invalid setup still emits a failure beacon. Never throws into the host.