10xgraph 0.10.0__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 (268) hide show
  1. 10xgraph-0.10.0/10xgraph.egg-info/PKG-INFO +511 -0
  2. 10xgraph-0.10.0/10xgraph.egg-info/SOURCES.txt +266 -0
  3. 10xgraph-0.10.0/10xgraph.egg-info/dependency_links.txt +1 -0
  4. 10xgraph-0.10.0/10xgraph.egg-info/requires.txt +86 -0
  5. 10xgraph-0.10.0/10xgraph.egg-info/top_level.txt +2 -0
  6. 10xgraph-0.10.0/LICENSE +21 -0
  7. 10xgraph-0.10.0/MANIFEST.in +2 -0
  8. 10xgraph-0.10.0/PKG-INFO +511 -0
  9. 10xgraph-0.10.0/README.md +400 -0
  10. 10xgraph-0.10.0/agentflow/__init__.py +68 -0
  11. 10xgraph-0.10.0/pyproject.toml +432 -0
  12. 10xgraph-0.10.0/setup.cfg +4 -0
  13. 10xgraph-0.10.0/tenxgraph/__init__.py +65 -0
  14. 10xgraph-0.10.0/tenxgraph/core/__init__.py +184 -0
  15. 10xgraph-0.10.0/tenxgraph/core/authz.py +148 -0
  16. 10xgraph-0.10.0/tenxgraph/core/exceptions/__init__.py +43 -0
  17. 10xgraph-0.10.0/tenxgraph/core/exceptions/graph_error.py +82 -0
  18. 10xgraph-0.10.0/tenxgraph/core/exceptions/media_exceptions.py +115 -0
  19. 10xgraph-0.10.0/tenxgraph/core/exceptions/node_error.py +47 -0
  20. 10xgraph-0.10.0/tenxgraph/core/exceptions/recursion_error.py +47 -0
  21. 10xgraph-0.10.0/tenxgraph/core/exceptions/storage_exceptions.py +290 -0
  22. 10xgraph-0.10.0/tenxgraph/core/exceptions/timeout_error.py +60 -0
  23. 10xgraph-0.10.0/tenxgraph/core/graph/__init__.py +146 -0
  24. 10xgraph-0.10.0/tenxgraph/core/graph/agent.py +354 -0
  25. 10xgraph-0.10.0/tenxgraph/core/graph/agent_internal/__init__.py +23 -0
  26. 10xgraph-0.10.0/tenxgraph/core/graph/agent_internal/anthropic.py +236 -0
  27. 10xgraph-0.10.0/tenxgraph/core/graph/agent_internal/anthropic_request.py +401 -0
  28. 10xgraph-0.10.0/tenxgraph/core/graph/agent_internal/anthropic_server_tools.py +134 -0
  29. 10xgraph-0.10.0/tenxgraph/core/graph/agent_internal/circuit_breaker.py +95 -0
  30. 10xgraph-0.10.0/tenxgraph/core/graph/agent_internal/constants.py +96 -0
  31. 10xgraph-0.10.0/tenxgraph/core/graph/agent_internal/execution.py +930 -0
  32. 10xgraph-0.10.0/tenxgraph/core/graph/agent_internal/google.py +523 -0
  33. 10xgraph-0.10.0/tenxgraph/core/graph/agent_internal/memory.py +177 -0
  34. 10xgraph-0.10.0/tenxgraph/core/graph/agent_internal/openai.py +254 -0
  35. 10xgraph-0.10.0/tenxgraph/core/graph/agent_internal/providers.py +119 -0
  36. 10xgraph-0.10.0/tenxgraph/core/graph/agent_internal/skills.py +199 -0
  37. 10xgraph-0.10.0/tenxgraph/core/graph/base_agent.py +147 -0
  38. 10xgraph-0.10.0/tenxgraph/core/graph/compiled_graph.py +866 -0
  39. 10xgraph-0.10.0/tenxgraph/core/graph/edge.py +96 -0
  40. 10xgraph-0.10.0/tenxgraph/core/graph/node.py +209 -0
  41. 10xgraph-0.10.0/tenxgraph/core/graph/remote_tool.py +64 -0
  42. 10xgraph-0.10.0/tenxgraph/core/graph/state_graph.py +659 -0
  43. 10xgraph-0.10.0/tenxgraph/core/graph/tool_node/__init__.py +23 -0
  44. 10xgraph-0.10.0/tenxgraph/core/graph/tool_node/_helpers.py +133 -0
  45. 10xgraph-0.10.0/tenxgraph/core/graph/tool_node/base.py +615 -0
  46. 10xgraph-0.10.0/tenxgraph/core/graph/tool_node/coercion.py +177 -0
  47. 10xgraph-0.10.0/tenxgraph/core/graph/tool_node/constants.py +73 -0
  48. 10xgraph-0.10.0/tenxgraph/core/graph/tool_node/deps.py +66 -0
  49. 10xgraph-0.10.0/tenxgraph/core/graph/tool_node/executors.py +35 -0
  50. 10xgraph-0.10.0/tenxgraph/core/graph/tool_node/kwargs_resolver.py +84 -0
  51. 10xgraph-0.10.0/tenxgraph/core/graph/tool_node/local_exec.py +293 -0
  52. 10xgraph-0.10.0/tenxgraph/core/graph/tool_node/mcp_exec.py +264 -0
  53. 10xgraph-0.10.0/tenxgraph/core/graph/tool_node/run_tools.py +79 -0
  54. 10xgraph-0.10.0/tenxgraph/core/graph/tool_node/schema.py +549 -0
  55. 10xgraph-0.10.0/tenxgraph/core/graph/utils/__init__.py +0 -0
  56. 10xgraph-0.10.0/tenxgraph/core/graph/utils/guards.py +131 -0
  57. 10xgraph-0.10.0/tenxgraph/core/graph/utils/handler_mixins.py +150 -0
  58. 10xgraph-0.10.0/tenxgraph/core/graph/utils/handler_utils.py +372 -0
  59. 10xgraph-0.10.0/tenxgraph/core/graph/utils/invoke_handler.py +643 -0
  60. 10xgraph-0.10.0/tenxgraph/core/graph/utils/invoke_node_handler.py +1060 -0
  61. 10xgraph-0.10.0/tenxgraph/core/graph/utils/stream_handler.py +862 -0
  62. 10xgraph-0.10.0/tenxgraph/core/graph/utils/stream_node_handler.py +835 -0
  63. 10xgraph-0.10.0/tenxgraph/core/graph/utils/stream_utils.py +47 -0
  64. 10xgraph-0.10.0/tenxgraph/core/graph/utils/utils.py +683 -0
  65. 10xgraph-0.10.0/tenxgraph/core/llm/__init__.py +28 -0
  66. 10xgraph-0.10.0/tenxgraph/core/llm/anthropic_batch.py +185 -0
  67. 10xgraph-0.10.0/tenxgraph/core/llm/batch_common.py +31 -0
  68. 10xgraph-0.10.0/tenxgraph/core/llm/caller.py +359 -0
  69. 10xgraph-0.10.0/tenxgraph/core/llm/client_factory.py +433 -0
  70. 10xgraph-0.10.0/tenxgraph/core/llm/openai_batch.py +220 -0
  71. 10xgraph-0.10.0/tenxgraph/core/realtime/__init__.py +53 -0
  72. 10xgraph-0.10.0/tenxgraph/core/realtime/base.py +244 -0
  73. 10xgraph-0.10.0/tenxgraph/core/realtime/live_agent.py +737 -0
  74. 10xgraph-0.10.0/tenxgraph/core/realtime/providers/__init__.py +0 -0
  75. 10xgraph-0.10.0/tenxgraph/core/realtime/providers/gemini_live.py +372 -0
  76. 10xgraph-0.10.0/tenxgraph/core/realtime/queue.py +109 -0
  77. 10xgraph-0.10.0/tenxgraph/core/skills/__init__.py +62 -0
  78. 10xgraph-0.10.0/tenxgraph/core/skills/activation.py +286 -0
  79. 10xgraph-0.10.0/tenxgraph/core/skills/loader.py +489 -0
  80. 10xgraph-0.10.0/tenxgraph/core/skills/models.py +226 -0
  81. 10xgraph-0.10.0/tenxgraph/core/skills/registry.py +212 -0
  82. 10xgraph-0.10.0/tenxgraph/core/skills/validation.py +233 -0
  83. 10xgraph-0.10.0/tenxgraph/core/state/__init__.py +79 -0
  84. 10xgraph-0.10.0/tenxgraph/core/state/agent_state.py +138 -0
  85. 10xgraph-0.10.0/tenxgraph/core/state/base_context.py +54 -0
  86. 10xgraph-0.10.0/tenxgraph/core/state/execution_state.py +195 -0
  87. 10xgraph-0.10.0/tenxgraph/core/state/message.py +548 -0
  88. 10xgraph-0.10.0/tenxgraph/core/state/message_block.py +286 -0
  89. 10xgraph-0.10.0/tenxgraph/core/state/message_context_manager.py +155 -0
  90. 10xgraph-0.10.0/tenxgraph/core/state/reducers.py +176 -0
  91. 10xgraph-0.10.0/tenxgraph/core/state/stream_chunks.py +59 -0
  92. 10xgraph-0.10.0/tenxgraph/core/state/stream_emitter.py +148 -0
  93. 10xgraph-0.10.0/tenxgraph/core/state/summary_context_manager.py +266 -0
  94. 10xgraph-0.10.0/tenxgraph/core/state/tool_result.py +67 -0
  95. 10xgraph-0.10.0/tenxgraph/prebuilt/__init__.py +76 -0
  96. 10xgraph-0.10.0/tenxgraph/prebuilt/agent/__init__.py +23 -0
  97. 10xgraph-0.10.0/tenxgraph/prebuilt/agent/audio.py +128 -0
  98. 10xgraph-0.10.0/tenxgraph/prebuilt/agent/plan_act_reflect.py +471 -0
  99. 10xgraph-0.10.0/tenxgraph/prebuilt/agent/rag.py +485 -0
  100. 10xgraph-0.10.0/tenxgraph/prebuilt/agent/react.py +183 -0
  101. 10xgraph-0.10.0/tenxgraph/prebuilt/agent/structured_output.py +466 -0
  102. 10xgraph-0.10.0/tenxgraph/prebuilt/agent/supervisor_team.py +480 -0
  103. 10xgraph-0.10.0/tenxgraph/prebuilt/agent/swarm.py +412 -0
  104. 10xgraph-0.10.0/tenxgraph/prebuilt/tools/__init__.py +24 -0
  105. 10xgraph-0.10.0/tenxgraph/prebuilt/tools/calculator.py +92 -0
  106. 10xgraph-0.10.0/tenxgraph/prebuilt/tools/fetch.py +128 -0
  107. 10xgraph-0.10.0/tenxgraph/prebuilt/tools/files.py +293 -0
  108. 10xgraph-0.10.0/tenxgraph/prebuilt/tools/handoff.py +140 -0
  109. 10xgraph-0.10.0/tenxgraph/prebuilt/tools/memory.py +381 -0
  110. 10xgraph-0.10.0/tenxgraph/prebuilt/tools/search.py +155 -0
  111. 10xgraph-0.10.0/tenxgraph/py.typed +0 -0
  112. 10xgraph-0.10.0/tenxgraph/qa/__init__.py +188 -0
  113. 10xgraph-0.10.0/tenxgraph/qa/evaluation/__init__.py +247 -0
  114. 10xgraph-0.10.0/tenxgraph/qa/evaluation/collectors/__init__.py +40 -0
  115. 10xgraph-0.10.0/tenxgraph/qa/evaluation/collectors/event_collector.py +50 -0
  116. 10xgraph-0.10.0/tenxgraph/qa/evaluation/collectors/publisher_callback.py +166 -0
  117. 10xgraph-0.10.0/tenxgraph/qa/evaluation/collectors/trajectory_collector.py +327 -0
  118. 10xgraph-0.10.0/tenxgraph/qa/evaluation/config/__init__.py +48 -0
  119. 10xgraph-0.10.0/tenxgraph/qa/evaluation/config/criterion_config.py +237 -0
  120. 10xgraph-0.10.0/tenxgraph/qa/evaluation/config/eval_config.py +202 -0
  121. 10xgraph-0.10.0/tenxgraph/qa/evaluation/config/presets.py +330 -0
  122. 10xgraph-0.10.0/tenxgraph/qa/evaluation/config/reporter_config.py +69 -0
  123. 10xgraph-0.10.0/tenxgraph/qa/evaluation/config/types.py +29 -0
  124. 10xgraph-0.10.0/tenxgraph/qa/evaluation/criteria/__init__.py +108 -0
  125. 10xgraph-0.10.0/tenxgraph/qa/evaluation/criteria/base.py +306 -0
  126. 10xgraph-0.10.0/tenxgraph/qa/evaluation/criteria/factual_accuracy.py +82 -0
  127. 10xgraph-0.10.0/tenxgraph/qa/evaluation/criteria/hallucination.py +89 -0
  128. 10xgraph-0.10.0/tenxgraph/qa/evaluation/criteria/llm_base.py +149 -0
  129. 10xgraph-0.10.0/tenxgraph/qa/evaluation/criteria/llm_judge.py +78 -0
  130. 10xgraph-0.10.0/tenxgraph/qa/evaluation/criteria/llm_utils.py +117 -0
  131. 10xgraph-0.10.0/tenxgraph/qa/evaluation/criteria/response.py +151 -0
  132. 10xgraph-0.10.0/tenxgraph/qa/evaluation/criteria/rubric.py +70 -0
  133. 10xgraph-0.10.0/tenxgraph/qa/evaluation/criteria/safety.py +96 -0
  134. 10xgraph-0.10.0/tenxgraph/qa/evaluation/criteria/simulation_goals.py +97 -0
  135. 10xgraph-0.10.0/tenxgraph/qa/evaluation/criteria/trajectory.py +247 -0
  136. 10xgraph-0.10.0/tenxgraph/qa/evaluation/dataset/__init__.py +59 -0
  137. 10xgraph-0.10.0/tenxgraph/qa/evaluation/dataset/builder.py +229 -0
  138. 10xgraph-0.10.0/tenxgraph/qa/evaluation/dataset/eval_set.py +307 -0
  139. 10xgraph-0.10.0/tenxgraph/qa/evaluation/eval_result.py +480 -0
  140. 10xgraph-0.10.0/tenxgraph/qa/evaluation/evaluator.py +816 -0
  141. 10xgraph-0.10.0/tenxgraph/qa/evaluation/execution/__init__.py +6 -0
  142. 10xgraph-0.10.0/tenxgraph/qa/evaluation/execution/result.py +118 -0
  143. 10xgraph-0.10.0/tenxgraph/qa/evaluation/quick_eval.py +347 -0
  144. 10xgraph-0.10.0/tenxgraph/qa/evaluation/reporters/__init__.py +47 -0
  145. 10xgraph-0.10.0/tenxgraph/qa/evaluation/reporters/_html_css.py +608 -0
  146. 10xgraph-0.10.0/tenxgraph/qa/evaluation/reporters/_html_js.py +227 -0
  147. 10xgraph-0.10.0/tenxgraph/qa/evaluation/reporters/_html_render.py +614 -0
  148. 10xgraph-0.10.0/tenxgraph/qa/evaluation/reporters/_html_template.py +255 -0
  149. 10xgraph-0.10.0/tenxgraph/qa/evaluation/reporters/_utils.py +80 -0
  150. 10xgraph-0.10.0/tenxgraph/qa/evaluation/reporters/base.py +51 -0
  151. 10xgraph-0.10.0/tenxgraph/qa/evaluation/reporters/console.py +460 -0
  152. 10xgraph-0.10.0/tenxgraph/qa/evaluation/reporters/html.py +133 -0
  153. 10xgraph-0.10.0/tenxgraph/qa/evaluation/reporters/json.py +362 -0
  154. 10xgraph-0.10.0/tenxgraph/qa/evaluation/reporters/manager.py +259 -0
  155. 10xgraph-0.10.0/tenxgraph/qa/evaluation/simulators/__init__.py +21 -0
  156. 10xgraph-0.10.0/tenxgraph/qa/evaluation/simulators/user_simulator.py +634 -0
  157. 10xgraph-0.10.0/tenxgraph/qa/evaluation/testing.py +417 -0
  158. 10xgraph-0.10.0/tenxgraph/qa/evaluation/token_usage.py +59 -0
  159. 10xgraph-0.10.0/tenxgraph/qa/testing/__init__.py +194 -0
  160. 10xgraph-0.10.0/tenxgraph/qa/testing/in_memory_store.py +327 -0
  161. 10xgraph-0.10.0/tenxgraph/qa/testing/mock_mcp.py +212 -0
  162. 10xgraph-0.10.0/tenxgraph/qa/testing/mock_tools.py +237 -0
  163. 10xgraph-0.10.0/tenxgraph/qa/testing/quick_test.py +308 -0
  164. 10xgraph-0.10.0/tenxgraph/qa/testing/test_agent.py +292 -0
  165. 10xgraph-0.10.0/tenxgraph/qa/testing/test_result.py +89 -0
  166. 10xgraph-0.10.0/tenxgraph/runtime/__init__.py +55 -0
  167. 10xgraph-0.10.0/tenxgraph/runtime/adapters/__init__.py +24 -0
  168. 10xgraph-0.10.0/tenxgraph/runtime/adapters/llm/__init__.py +20 -0
  169. 10xgraph-0.10.0/tenxgraph/runtime/adapters/llm/anthropic_converter.py +444 -0
  170. 10xgraph-0.10.0/tenxgraph/runtime/adapters/llm/base_converter.py +83 -0
  171. 10xgraph-0.10.0/tenxgraph/runtime/adapters/llm/google_genai_converter.py +514 -0
  172. 10xgraph-0.10.0/tenxgraph/runtime/adapters/llm/model_response_converter.py +156 -0
  173. 10xgraph-0.10.0/tenxgraph/runtime/adapters/llm/openai_converter.py +625 -0
  174. 10xgraph-0.10.0/tenxgraph/runtime/adapters/llm/openai_responses_converter.py +579 -0
  175. 10xgraph-0.10.0/tenxgraph/runtime/adapters/llm/reasoning_utils.py +85 -0
  176. 10xgraph-0.10.0/tenxgraph/runtime/protocols/__init__.py +25 -0
  177. 10xgraph-0.10.0/tenxgraph/runtime/protocols/a2a/__init__.py +36 -0
  178. 10xgraph-0.10.0/tenxgraph/runtime/protocols/a2a/_optional.py +36 -0
  179. 10xgraph-0.10.0/tenxgraph/runtime/protocols/a2a/client.py +222 -0
  180. 10xgraph-0.10.0/tenxgraph/runtime/protocols/a2a/executor.py +224 -0
  181. 10xgraph-0.10.0/tenxgraph/runtime/protocols/a2a/server.py +172 -0
  182. 10xgraph-0.10.0/tenxgraph/runtime/protocols/acp.py +341 -0
  183. 10xgraph-0.10.0/tenxgraph/runtime/publisher/__init__.py +41 -0
  184. 10xgraph-0.10.0/tenxgraph/runtime/publisher/base_publisher.py +71 -0
  185. 10xgraph-0.10.0/tenxgraph/runtime/publisher/composite_publisher.py +40 -0
  186. 10xgraph-0.10.0/tenxgraph/runtime/publisher/console_publisher.py +100 -0
  187. 10xgraph-0.10.0/tenxgraph/runtime/publisher/events.py +253 -0
  188. 10xgraph-0.10.0/tenxgraph/runtime/publisher/exporters.py +327 -0
  189. 10xgraph-0.10.0/tenxgraph/runtime/publisher/kafka_publisher.py +161 -0
  190. 10xgraph-0.10.0/tenxgraph/runtime/publisher/langsmith_publisher.py +100 -0
  191. 10xgraph-0.10.0/tenxgraph/runtime/publisher/logfire_publisher.py +99 -0
  192. 10xgraph-0.10.0/tenxgraph/runtime/publisher/otel_attributes.py +75 -0
  193. 10xgraph-0.10.0/tenxgraph/runtime/publisher/otel_publisher.py +731 -0
  194. 10xgraph-0.10.0/tenxgraph/runtime/publisher/publish.py +54 -0
  195. 10xgraph-0.10.0/tenxgraph/runtime/publisher/rabbitmq_publisher.py +178 -0
  196. 10xgraph-0.10.0/tenxgraph/runtime/publisher/redis_publisher.py +186 -0
  197. 10xgraph-0.10.0/tenxgraph/storage/__init__.py +155 -0
  198. 10xgraph-0.10.0/tenxgraph/storage/checkpointer/__init__.py +30 -0
  199. 10xgraph-0.10.0/tenxgraph/storage/checkpointer/base_checkpointer.py +815 -0
  200. 10xgraph-0.10.0/tenxgraph/storage/checkpointer/in_memory_checkpointer.py +639 -0
  201. 10xgraph-0.10.0/tenxgraph/storage/checkpointer/pg_checkpointer.py +2410 -0
  202. 10xgraph-0.10.0/tenxgraph/storage/checkpointer/sqlite_checkpointer.py +636 -0
  203. 10xgraph-0.10.0/tenxgraph/storage/media/__init__.py +43 -0
  204. 10xgraph-0.10.0/tenxgraph/storage/media/capabilities.py +209 -0
  205. 10xgraph-0.10.0/tenxgraph/storage/media/config.py +49 -0
  206. 10xgraph-0.10.0/tenxgraph/storage/media/media_resolver.py +339 -0
  207. 10xgraph-0.10.0/tenxgraph/storage/media/offload.py +101 -0
  208. 10xgraph-0.10.0/tenxgraph/storage/media/processor.py +319 -0
  209. 10xgraph-0.10.0/tenxgraph/storage/media/provider_media.py +209 -0
  210. 10xgraph-0.10.0/tenxgraph/storage/media/resolver.py +475 -0
  211. 10xgraph-0.10.0/tenxgraph/storage/media/security.py +144 -0
  212. 10xgraph-0.10.0/tenxgraph/storage/media/storage/__init__.py +18 -0
  213. 10xgraph-0.10.0/tenxgraph/storage/media/storage/base.py +91 -0
  214. 10xgraph-0.10.0/tenxgraph/storage/media/storage/cloud_store.py +327 -0
  215. 10xgraph-0.10.0/tenxgraph/storage/media/storage/local_store.py +146 -0
  216. 10xgraph-0.10.0/tenxgraph/storage/media/storage/memory_store.py +58 -0
  217. 10xgraph-0.10.0/tenxgraph/storage/media/temp_cache.py +312 -0
  218. 10xgraph-0.10.0/tenxgraph/storage/store/__init__.py +77 -0
  219. 10xgraph-0.10.0/tenxgraph/storage/store/base_store.py +313 -0
  220. 10xgraph-0.10.0/tenxgraph/storage/store/embedding/__init__.py +10 -0
  221. 10xgraph-0.10.0/tenxgraph/storage/store/embedding/base_embedding.py +29 -0
  222. 10xgraph-0.10.0/tenxgraph/storage/store/embedding/google_embedding.py +109 -0
  223. 10xgraph-0.10.0/tenxgraph/storage/store/embedding/openai_embedding.py +78 -0
  224. 10xgraph-0.10.0/tenxgraph/storage/store/long_term_memory.py +678 -0
  225. 10xgraph-0.10.0/tenxgraph/storage/store/mem0_store.py +436 -0
  226. 10xgraph-0.10.0/tenxgraph/storage/store/memory_config.py +132 -0
  227. 10xgraph-0.10.0/tenxgraph/storage/store/qdrant_store.py +755 -0
  228. 10xgraph-0.10.0/tenxgraph/storage/store/store_schema.py +140 -0
  229. 10xgraph-0.10.0/tenxgraph/utils/__init__.py +139 -0
  230. 10xgraph-0.10.0/tenxgraph/utils/background_task_manager.py +392 -0
  231. 10xgraph-0.10.0/tenxgraph/utils/callable_utils.py +65 -0
  232. 10xgraph-0.10.0/tenxgraph/utils/callbacks.py +1018 -0
  233. 10xgraph-0.10.0/tenxgraph/utils/command.py +64 -0
  234. 10xgraph-0.10.0/tenxgraph/utils/constants.py +75 -0
  235. 10xgraph-0.10.0/tenxgraph/utils/converter.py +502 -0
  236. 10xgraph-0.10.0/tenxgraph/utils/decorators.py +239 -0
  237. 10xgraph-0.10.0/tenxgraph/utils/id_generator.py +234 -0
  238. 10xgraph-0.10.0/tenxgraph/utils/injection.py +47 -0
  239. 10xgraph-0.10.0/tenxgraph/utils/interrupt.py +241 -0
  240. 10xgraph-0.10.0/tenxgraph/utils/logging.py +354 -0
  241. 10xgraph-0.10.0/tenxgraph/utils/media_scheme.py +22 -0
  242. 10xgraph-0.10.0/tenxgraph/utils/metrics.py +227 -0
  243. 10xgraph-0.10.0/tenxgraph/utils/shutdown.py +344 -0
  244. 10xgraph-0.10.0/tenxgraph/utils/thread_info.py +39 -0
  245. 10xgraph-0.10.0/tenxgraph/utils/validators.py +475 -0
  246. 10xgraph-0.10.0/tests/test_agentflow_alias.py +83 -0
  247. 10xgraph-0.10.0/tests/test_authz.py +115 -0
  248. 10xgraph-0.10.0/tests/test_background_task_manager.py +479 -0
  249. 10xgraph-0.10.0/tests/test_base_context.py +203 -0
  250. 10xgraph-0.10.0/tests/test_base_converter.py +360 -0
  251. 10xgraph-0.10.0/tests/test_basic.py +16 -0
  252. 10xgraph-0.10.0/tests/test_checkpointer_integration.py +329 -0
  253. 10xgraph-0.10.0/tests/test_cloud_media_store.py +322 -0
  254. 10xgraph-0.10.0/tests/test_converter.py +386 -0
  255. 10xgraph-0.10.0/tests/test_docs_imports.py +115 -0
  256. 10xgraph-0.10.0/tests/test_import_order.py +66 -0
  257. 10xgraph-0.10.0/tests/test_memory_management.py +577 -0
  258. 10xgraph-0.10.0/tests/test_model_response_converter.py +547 -0
  259. 10xgraph-0.10.0/tests/test_multiagent.py +943 -0
  260. 10xgraph-0.10.0/tests/test_multimodal_e2e.py +1355 -0
  261. 10xgraph-0.10.0/tests/test_multimodal_sprint1.py +787 -0
  262. 10xgraph-0.10.0/tests/test_multimodal_sprint2.py +248 -0
  263. 10xgraph-0.10.0/tests/test_multimodal_sprint3.py +705 -0
  264. 10xgraph-0.10.0/tests/test_multimodal_sprint6.py +557 -0
  265. 10xgraph-0.10.0/tests/test_openai_multimodal.py +596 -0
  266. 10xgraph-0.10.0/tests/test_skills.py +863 -0
  267. 10xgraph-0.10.0/tests/test_skills_e2e.py +155 -0
  268. 10xgraph-0.10.0/tests/test_skills_session.py +410 -0
@@ -0,0 +1,511 @@
1
+ Metadata-Version: 2.4
2
+ Name: 10xgraph
3
+ Version: 0.10.0
4
+ Summary: 10xGraph (formerly Agentflow) is a Python framework for multi-agent AI systems that stay correct under failure: replay-safe tool calls that are not re-executed after a crash, versioned state writes, real node and tool timeouts, and two-tier Redis plus PostgreSQL checkpointing. MIT licensed, self-hosted, any model (OpenAI, Google Gemini, Anthropic). Pair it with 10xgraph-api to generate the production server around your graph.
5
+ Author-email: Shudipto Trafder <shudiptotrafder@gmail.com>
6
+ Maintainer-email: Shudipto Trafder <shudiptotrafder@gmail.com>, 10xScale <contact@10xscale.ai>
7
+ License: MIT License
8
+
9
+ Copyright (c) 2025 10xScale
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
28
+
29
+ Project-URL: Homepage, https://10xgraph.com
30
+ Project-URL: Repository, https://github.com/10xGraph/10xGraph
31
+ Project-URL: Issues, https://github.com/10xGraph/10xGraph/issues
32
+ Project-URL: Documentation, https://10xgraph.com
33
+ Project-URL: Changelog, https://github.com/10xGraph/10xGraph/blob/main/CHANGELOG.md
34
+ Keywords: agent,agents,ai-agents,multi-agent,multi-agent-systems,agentic-ai,agent-framework,agent-orchestration,workflow-engine,state-machine,stategraph,graph,llm,llm-framework,llm-orchestration,genai,generative-ai,production,self-hosted,fault-tolerance,idempotency,durable-state,checkpointing,human-in-the-loop,redis,postgresql,openai,anthropic,claude,gemini,google-genai,mcp,model-context-protocol,tool-use,function-calling,react-agent,rag,memory,vector-store,qdrant,mem0,a2a,realtime-audio,opentelemetry,kafka,10xgraph,agentflow
35
+ Classifier: Programming Language :: Python :: 3
36
+ Classifier: Programming Language :: Python :: 3.12
37
+ Classifier: Programming Language :: Python :: 3.13
38
+ Classifier: License :: OSI Approved :: MIT License
39
+ Classifier: Operating System :: OS Independent
40
+ Classifier: Intended Audience :: Developers
41
+ Classifier: Development Status :: 5 - Production/Stable
42
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
43
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
44
+ Requires-Python: >=3.12
45
+ Description-Content-Type: text/markdown
46
+ License-File: LICENSE
47
+ Requires-Dist: injectq<0.5,>=0.4.0
48
+ Requires-Dist: pillow>=12.2.0
49
+ Requires-Dist: pydantic<3,>=2.0
50
+ Requires-Dist: PyYAML>=6.0
51
+ Requires-Dist: python-dotenv>=1.0
52
+ Provides-Extra: google-genai
53
+ Requires-Dist: google-genai>=1.56.0; extra == "google-genai"
54
+ Provides-Extra: realtime
55
+ Requires-Dist: google-genai>=1.56.0; extra == "realtime"
56
+ Provides-Extra: openai
57
+ Requires-Dist: openai>=1.77.0; extra == "openai"
58
+ Provides-Extra: anthropic
59
+ Requires-Dist: anthropic<2,>=1.0.0; extra == "anthropic"
60
+ Provides-Extra: anthropic-vertex
61
+ Requires-Dist: anthropic[vertex]<2,>=1.0.0; extra == "anthropic-vertex"
62
+ Provides-Extra: anthropic-bedrock
63
+ Requires-Dist: anthropic[bedrock]<2,>=1.0.0; extra == "anthropic-bedrock"
64
+ Provides-Extra: pg-checkpoint
65
+ Requires-Dist: asyncpg>=0.29.0; extra == "pg-checkpoint"
66
+ Requires-Dist: redis>=4.2; extra == "pg-checkpoint"
67
+ Provides-Extra: sqlite-checkpoint
68
+ Requires-Dist: aiosqlite>=0.19.0; extra == "sqlite-checkpoint"
69
+ Provides-Extra: mcp
70
+ Requires-Dist: fastmcp>=2.11.3; extra == "mcp"
71
+ Requires-Dist: mcp>=1.13.0; extra == "mcp"
72
+ Provides-Extra: images
73
+ Requires-Dist: Pillow>=10.0.0; extra == "images"
74
+ Provides-Extra: cloud-storage
75
+ Requires-Dist: cloud-storage-manager>=0.1.2; extra == "cloud-storage"
76
+ Provides-Extra: redis
77
+ Requires-Dist: redis>=4.2; extra == "redis"
78
+ Provides-Extra: kafka
79
+ Requires-Dist: aiokafka>=0.8.0; extra == "kafka"
80
+ Provides-Extra: rabbitmq
81
+ Requires-Dist: aio-pika>=9.0.0; extra == "rabbitmq"
82
+ Provides-Extra: qdrant
83
+ Requires-Dist: qdrant-client>=1.7.0; extra == "qdrant"
84
+ Provides-Extra: mem0
85
+ Requires-Dist: mem0ai>=0.1.117; extra == "mem0"
86
+ Provides-Extra: a2a-sdk
87
+ Requires-Dist: a2a-sdk>=0.2.7; extra == "a2a-sdk"
88
+ Provides-Extra: otel
89
+ Requires-Dist: opentelemetry-api>=1.20.0; extra == "otel"
90
+ Requires-Dist: opentelemetry-sdk>=1.20.0; extra == "otel"
91
+ Provides-Extra: logfire
92
+ Requires-Dist: logfire>=3.0.0; extra == "logfire"
93
+ Provides-Extra: langsmith
94
+ Requires-Dist: opentelemetry-api>=1.20.0; extra == "langsmith"
95
+ Requires-Dist: opentelemetry-sdk>=1.20.0; extra == "langsmith"
96
+ Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.20.0; extra == "langsmith"
97
+ Provides-Extra: observability
98
+ Requires-Dist: 10xgraph[langsmith,logfire,otel]; extra == "observability"
99
+ Provides-Extra: all-publishers
100
+ Requires-Dist: redis>=4.2; extra == "all-publishers"
101
+ Requires-Dist: aiokafka>=0.8.0; extra == "all-publishers"
102
+ Requires-Dist: aio-pika>=9.0.0; extra == "all-publishers"
103
+ Provides-Extra: all
104
+ Requires-Dist: 10xgraph[google-genai,mcp,openai,realtime]; extra == "all"
105
+ Requires-Dist: 10xgraph[anthropic,anthropic-bedrock,anthropic-vertex]; extra == "all"
106
+ Requires-Dist: 10xgraph[pg_checkpoint,sqlite_checkpoint]; extra == "all"
107
+ Requires-Dist: 10xgraph[mem0,qdrant]; extra == "all"
108
+ Requires-Dist: 10xgraph[all_publishers,observability]; extra == "all"
109
+ Requires-Dist: 10xgraph[a2a_sdk,cloud-storage,images]; extra == "all"
110
+ Dynamic: license-file
111
+
112
+ # 10xGraph
113
+
114
+ *Formerly Agentflow.* 10xGraph by 10xScale: graph engineering for production AI agents.
115
+
116
+ [![CI](https://github.com/10xGraph/10xGraph/actions/workflows/ci.yml/badge.svg)](https://github.com/10xGraph/10xGraph/actions/workflows/ci.yml)
117
+ [![Release](https://github.com/10xGraph/10xGraph/actions/workflows/release.yml/badge.svg)](https://github.com/10xGraph/10xGraph/actions/workflows/release.yml)
118
+ [![PyPI](https://img.shields.io/pypi/v/10xgraph?color=blue)](https://pypi.org/project/10xgraph/)
119
+ [![Python](https://img.shields.io/pypi/pyversions/10xgraph)](https://pypi.org/project/10xgraph/)
120
+ [![License](https://img.shields.io/github/license/10xGraph/10xGraph)](https://github.com/10xGraph/10xGraph/blob/main/LICENSE)
121
+
122
+ 10xGraph is an open-source Python framework for building multi-agent AI systems and running them in production. You write the agent as a graph of nodes and tools. 10xGraph keeps tool calls from running twice after a crash, guards state writes, enforces timeouts, and, with the `10xgraph-api` package, generates the API server around the graph.
123
+
124
+ This repository is the core engine (PyPI `10xgraph`, import `tenxgraph`). The docs live at [10xgraph.com](https://10xgraph.com).
125
+
126
+ ---
127
+
128
+ ## What it gives you
129
+
130
+ **1. Correct under failure (this package)**
131
+
132
+ - **Replay-safe tools.** The run loop persists the current node before running it, so a process killed mid-node re-runs that node on resume. Before calling a tool, 10xGraph checks the checkpointer's tool ledger and records each completed call as soon as it returns. A tool that already ran is not executed again: no double charge, no duplicate email. Requires a checkpointer.
133
+ - **Versioned state writes.** Durable writes use optimistic compare-and-swap, so two runs on one thread cannot overwrite each other. The Redis cache write is version-guarded too.
134
+ - **Real node and tool timeouts.** Set `node_timeout` and `tool_timeout` in the run config (defaults 900 s and 300 s), so a hung tool cannot hold a worker forever.
135
+ - **Human approval inside a tool.** `interrupt()` pauses the run and saves the thread; resume with the decision.
136
+
137
+ **2. The production server ships in the box (`10xgraph-api`, MIT)**
138
+
139
+ `10xgraph-api` generates the production server around your compiled graph: REST, SSE streaming, WebSocket and realtime-audio endpoints; JWT or custom auth; scoped authorization on every endpoint; thread ownership isolation; rate limiting; and Docker Compose and Kubernetes files. You drive it with the `10xgraph` command (`10xgraph init`, `10xgraph api`, `10xgraph build`). See [the ecosystem table](#ecosystem).
140
+
141
+ **3. Built to scale**
142
+
143
+ - **Two-tier persistence.** `PgCheckpointer` caches active thread state in Redis and reads it first (default TTL 24 hours); PostgreSQL holds the durable history with versioned writes. Threads survive restarts and cache expiry. `SqliteCheckpointer` covers local work.
144
+ - **Event publishing** to Kafka, Redis Pub/Sub, RabbitMQ and OpenTelemetry.
145
+ - **Long-term memory** in Qdrant or Mem0.
146
+
147
+ **4. One stack, backend to frontend**
148
+
149
+ - **Remote tools.** The model can call tools that run in the user's browser or client. Declare them on the graph or pass them per run in `config["remote_tools"]`; the run pauses until the client returns the result.
150
+ - **Typed TypeScript client** (`10xgraph-client`) for invoke, stream, threads, memory and files, plus a React playground (`10xgraph play`).
151
+
152
+ **5. You own it**
153
+
154
+ - MIT licensed and self-hosted. The server layer is part of the same open-source project, not a paid platform.
155
+ - No LangChain dependency. Core requires InjectQ, Pydantic, Pillow, PyYAML and python-dotenv; everything else is an optional extra.
156
+ - Any model: OpenAI and OpenAI-compatible endpoints, Google Gemini (including Vertex AI), Anthropic (direct, Vertex AI or Bedrock). Changing the model string does not change the graph or the tools.
157
+ - Built and run in production by 10xScale for its own AI products.
158
+
159
+ **Also included** (standard for agent frameworks, listed as facts): graph orchestration and the ReAct tool-calling loop, parallel tool execution, OpenAI, Google Gemini and Anthropic support, MCP tools, streaming, and checkpointing to a database.
160
+
161
+ ---
162
+
163
+ ## When it fits
164
+
165
+ | You are | The problem | What 10xGraph does |
166
+ |---|---|---|
167
+ | A Python team taking an agent to production | Server, auth, persistence and deployment all have to be built around the agent | `10xgraph-api` generates them from the graph |
168
+ | Running agents with side effects (payments, email, tickets) | A retry or crash repeats an action | Tool ledger: a completed tool call is replayed from the checkpointer, not re-run |
169
+ | Building a multi-user product | Users must not see each other's threads | Thread ownership isolation and scoped authorization on every endpoint |
170
+ | Required to self-host | Paid platforms, data residency, lock-in | MIT, self-hosted, any model |
171
+ | A Python backend with a TypeScript frontend | Hand-written SSE and client glue | Typed client and remote tools |
172
+
173
+ ---
174
+
175
+ ## Install
176
+
177
+ ```bash
178
+ pip install 10xgraph
179
+ ```
180
+
181
+ Provider SDKs and infrastructure integrations are optional extras. Install only what you use:
182
+
183
+ | Extra | Adds |
184
+ |---|---|
185
+ | `google-genai`, `openai`, `anthropic` | Provider SDK adapters |
186
+ | `anthropic-vertex`, `anthropic-bedrock` | Claude on Vertex AI or Amazon Bedrock |
187
+ | `realtime` | Audio-to-audio agents over Gemini Live |
188
+ | `mcp` | Model Context Protocol client and tools |
189
+ | `pg_checkpoint`, `sqlite_checkpoint` | Durable checkpointing (Postgres + Redis, or SQLite) |
190
+ | `qdrant`, `mem0` | Long-term vector memory stores |
191
+ | `redis`, `kafka`, `rabbitmq`, `otel` | Event publishers and tracing |
192
+ | `images`, `cloud-storage` | Multimodal media handling and offload |
193
+ | `all` | Every extra above at once, for development and CI |
194
+
195
+ ```bash
196
+ pip install "10xgraph[google-genai,openai,anthropic,mcp,pg_checkpoint]"
197
+ ```
198
+
199
+ Then set your provider key. A `.env` file in the working directory is loaded automatically.
200
+
201
+ ```bash
202
+ export GEMINI_API_KEY=... # Google Gemini
203
+ export OPENAI_API_KEY=sk-... # OpenAI, or any OpenAI-compatible endpoint
204
+ export ANTHROPIC_API_KEY=sk-... # Anthropic Claude
205
+ ```
206
+
207
+ Requires Python 3.12 or newer.
208
+
209
+ ---
210
+
211
+ ## Quick start: a support agent with an approval step
212
+
213
+ `lookup_order` reads data. `refund_order` moves money, so it pauses for a human decision with `interrupt()` before it acts. With a checkpointer, a crash or retry after the refund does not issue it twice.
214
+
215
+ ```python
216
+ from tenxgraph.core.state import Message
217
+ from tenxgraph.prebuilt.agent import ReactAgent
218
+ from tenxgraph.storage.checkpointer import InMemoryCheckpointer
219
+ from tenxgraph.utils import interrupt
220
+
221
+
222
+ def lookup_order(order_id: str) -> dict:
223
+ """Look up an order by id."""
224
+ return {"order_id": order_id, "status": "delivered", "total": 42.00}
225
+
226
+
227
+ def refund_order(order_id: str, amount: float) -> str:
228
+ """Refund an order. Requires approval."""
229
+ decision = interrupt({"amount": amount}, message=f"Refund ${amount}?")
230
+ if not decision.get("approved"):
231
+ return "Refund declined by reviewer."
232
+ return f"Refunded ${amount} for order {order_id}."
233
+
234
+
235
+ app = ReactAgent(
236
+ model="gemini/gemini-2.5-flash",
237
+ system_prompt=[{"role": "system", "content": "You are a support agent for an online store."}],
238
+ tools=[lookup_order, refund_order],
239
+ ).compile(checkpointer=InMemoryCheckpointer())
240
+
241
+ config = {"thread_id": "1"}
242
+ result = app.invoke(
243
+ {"messages": [Message.text_message("Order A-1001 arrived broken, please refund it.")]},
244
+ config=config,
245
+ )
246
+
247
+ # The run pauses inside refund_order. After a reviewer approves:
248
+ result = app.invoke({"resume": {"approved": True}}, config)
249
+ ```
250
+
251
+ Swap `ReactAgent` for `RAGAgent`, `SwarmAgent`, `SupervisorTeamAgent` or `PlanActReflectAgent` and the shape stays the same. Use `PgCheckpointer` (Postgres plus Redis) in production, or `SqliteCheckpointer` for local work.
252
+
253
+ **Stream it:**
254
+
255
+ ```python
256
+ async for chunk in app.astream(
257
+ {"messages": [Message.text_message("Where is order A-1001?")]},
258
+ config={"thread_id": "2"},
259
+ ):
260
+ print(chunk.model_dump())
261
+ ```
262
+
263
+ **Add MCP tools** by passing a `fastmcp` client; remote tools join your local ones:
264
+
265
+ ```python
266
+ from fastmcp import Client
267
+
268
+ mcp_client = Client({
269
+ "mcpServers": {
270
+ "orders": {"url": "http://127.0.0.1:8000/mcp", "transport": "streamable-http"},
271
+ }
272
+ })
273
+
274
+ app = ReactAgent(
275
+ model="gemini/gemini-2.5-flash",
276
+ tools=[lookup_order],
277
+ client=mcp_client,
278
+ ).compile()
279
+ ```
280
+
281
+ ---
282
+
283
+ ## Building your own graph
284
+
285
+ Prebuilt agents are graphs. When you need custom control flow, build one directly:
286
+
287
+ ```python
288
+ from tenxgraph.core.graph import Agent, StateGraph, ToolNode
289
+ from tenxgraph.core.state import AgentState
290
+ from tenxgraph.utils.constants import END
291
+
292
+ graph = StateGraph()
293
+ graph.add_node("MAIN", Agent(
294
+ model="gemini/gemini-2.5-flash",
295
+ system_prompt=[{"role": "system", "content": "You are a support agent."}],
296
+ tool_node="TOOL",
297
+ ))
298
+ graph.add_node("TOOL", ToolNode([lookup_order, refund_order]))
299
+
300
+
301
+ def route(state: AgentState) -> str:
302
+ if state.context and state.context[-1].tools_calls:
303
+ return "TOOL"
304
+ return END
305
+
306
+
307
+ graph.add_conditional_edges("MAIN", route, {"TOOL": "TOOL", END: END})
308
+ graph.add_edge("TOOL", "MAIN")
309
+ graph.set_entry_point("MAIN")
310
+
311
+ app = graph.compile()
312
+ ```
313
+
314
+ Nodes can be plain functions too, so you can call a provider SDK directly. See [`examples/react/`](https://github.com/10xGraph/10xGraph/tree/main/examples/react).
315
+
316
+ ---
317
+
318
+ ## Realtime Audio Agents
319
+
320
+ Live audio-to-audio sessions over Gemini Live. The provider owns the turn loop, so the session runs
321
+ through `arealtime`: you push into an input queue and consume normalized events.
322
+
323
+ ```python
324
+ from tenxgraph.prebuilt.agent import AudioAgent
325
+ from tenxgraph.core.realtime import LiveInputQueue, RealtimeConfig
326
+
327
+ app = AudioAgent(
328
+ "gemini-live-2.5-flash-preview",
329
+ realtime_config=RealtimeConfig(model="gemini-live-2.5-flash-preview", voice="Puck"),
330
+ tools=[lookup_order],
331
+ ).compile()
332
+
333
+ queue = LiveInputQueue()
334
+ queue.send_audio(pcm16_bytes) # non-blocking, safe to call from an audio callback
335
+
336
+ async for event in app.arealtime(queue, {"thread_id": "t1"}):
337
+ ... # AudioDeltaEvent / transcripts / ToolCallEvent / ...
338
+
339
+ queue.close()
340
+ ```
341
+
342
+ Barge-in, persisted transcripts (raw audio is never stored), automatic reconnect with session
343
+ resumption, and image/video frame input are handled for you. `system_prompt`, `skills`, and `memory`
344
+ work as they do on any other agent. Needs ``pip install "10xgraph[realtime]"``.
345
+
346
+ ---
347
+
348
+ ## Prebuilt agents and patterns
349
+
350
+ - **Agents:** React, RAG, Guarded, Plan-Act-Reflect, Audio, Swarm, SupervisorTeam, StructuredOutput
351
+ - **Orchestration:** Router, MapReduce, Sequential, Branch-Join
352
+ - **Other:** dependency injection through InjectQ, skills (Agent Skills spec), 3-layer memory (working state, checkpointer, vector stores such as Qdrant and Mem0), publishers (Console, Redis, Kafka, RabbitMQ, OpenTelemetry), evaluation and testing helpers
353
+
354
+ ---
355
+
356
+ ## Moving from Agentflow
357
+
358
+ 10xGraph is the new name of Agentflow. The framework, license and maintainers are the same. `10xscale-agentflow` 0.10.1 is its last release.
359
+
360
+ ```bash
361
+ pip uninstall 10xscale-agentflow
362
+ pip install 10xgraph
363
+ ```
364
+
365
+ Uninstall first: both distributions provide the `agentflow` module and must not be installed side by side.
366
+
367
+ ```python
368
+ # before
369
+ from agentflow.core.graph import StateGraph
370
+ # after
371
+ from tenxgraph import StateGraph
372
+ ```
373
+
374
+ The import name is `tenxgraph` because a Python identifier cannot start with a digit. All canonical paths are the old ones with `agentflow` replaced by `tenxgraph` (for example `tenxgraph.core.graph`, `tenxgraph.storage.checkpointer`, `tenxgraph.prebuilt.agent`). `import agentflow` keeps working as a deprecated alias until 2.0, with one `DeprecationWarning`.
375
+
376
+ Other renamed identifiers (old values still work where noted):
377
+
378
+ | Item | Old | New |
379
+ |---|---|---|
380
+ | OpenTelemetry tracer and meter name, `GEN_AI_SYSTEM` | `agentflow` | `10xgraph` |
381
+ | Logger names | `agentflow.*` | `tenxgraph.*` |
382
+ | Media URI scheme | `agentflow://media/` | `graph://media/` (old URIs still read) |
383
+ | Default home directory | `~/.agentflow` | `~/.10xgraph` (falls back to `~/.agentflow` if only that exists) |
384
+ | Cloud media prefix | `agentflow-media` | `10xgraph-media` (old objects still read) |
385
+ | Prebuilt tools user-agent | `agentflow-prebuilt-tools` | `10xgraph-prebuilt-tools/1.0` |
386
+ | Server config file | `agentflow.json` | `10xgraph.json` (the CLI falls back to `agentflow.json`) |
387
+ | CLI command | `agentflow` | `10xgraph` (`agentflow` stays as a deprecated alias until 2.0) |
388
+
389
+ ---
390
+
391
+ ## Ecosystem
392
+
393
+ | Package | What it does | Install | Source |
394
+ |---|---|---|---|
395
+ | Core framework, `10xgraph` | Graph engine, state and checkpointing, memory, tools, MCP, publishers, evaluation | `pip install 10xgraph` | this repository |
396
+ | API server, `10xgraph-api` (formerly `10xscale-agentflow-cli`) | Generates the production server around your graph: REST, SSE, WebSocket, JWT auth, scoped authorization, rate limiting, Docker and Kubernetes files | `pip install 10xgraph-api` | [10xGraph/10xgraph-api](https://github.com/10xGraph/10xgraph-api) |
397
+ | TypeScript client, `10xgraph-client` (formerly `@10xscale/agentflow-client`) | Typed client for every endpoint, React streaming hooks, client-side tools | `npm install 10xgraph-client` | [10xGraph/10xgraph-client](https://github.com/10xGraph/10xgraph-client) |
398
+ | Playground | React UI to chat with agents and inspect graphs, threads and state | `10xgraph play` | [10xHub/agentflow-playground](https://github.com/10xHub/agentflow-playground) |
399
+ | Documentation | Tutorials, guides, concepts, reference | [10xgraph.com](https://10xgraph.com) | [10xGraph/10xgraph-docs](https://github.com/10xGraph/10xgraph-docs) |
400
+
401
+ From install to a running service:
402
+
403
+ ```bash
404
+ pip install 10xgraph-api # pulls in 10xgraph
405
+ 10xgraph init --path my-agent && cd my-agent
406
+ 10xgraph api # REST and WebSocket API on :8000
407
+ 10xgraph play # server plus playground
408
+ 10xgraph build --docker-compose --k8s
409
+ ```
410
+
411
+ A production scaffold with JWT auth and Redis rate limiting:
412
+
413
+ ```bash
414
+ 10xgraph init --path my-agent --yes --template production --auth jwt --rate-limit redis
415
+ ```
416
+
417
+ ---
418
+
419
+ ## Examples
420
+
421
+ Runnable scripts in [`examples/`](https://github.com/10xGraph/10xGraph/tree/main/examples):
422
+
423
+ | Topic | Directory |
424
+ |---|---|
425
+ | React agents, sync and class-based | [`react/`](https://github.com/10xGraph/10xGraph/tree/main/examples/react), [`react-injection/`](https://github.com/10xGraph/10xGraph/tree/main/examples/react-injection), [`agent-class/`](https://github.com/10xGraph/10xGraph/tree/main/examples/agent-class), [`tool-decorator/`](https://github.com/10xGraph/10xGraph/tree/main/examples/tool-decorator) |
426
+ | Streaming and stop/resume | [`react_stream/`](https://github.com/10xGraph/10xGraph/tree/main/examples/react_stream) |
427
+ | MCP servers and tools | [`react-mcp/`](https://github.com/10xGraph/10xGraph/tree/main/examples/react-mcp), [`github-mcp/`](https://github.com/10xGraph/10xGraph/tree/main/examples/github-mcp), [`xquik-mcp/`](https://github.com/10xGraph/10xGraph/tree/main/examples/xquik-mcp) |
428
+ | RAG, memory, and vector stores | [`rag/`](https://github.com/10xGraph/10xGraph/tree/main/examples/rag), [`memory/`](https://github.com/10xGraph/10xGraph/tree/main/examples/memory), [`store/`](https://github.com/10xGraph/10xGraph/tree/main/examples/store) |
429
+ | Multi-agent: swarm, supervisor, handoff, plan-act-reflect | [`swarm/`](https://github.com/10xGraph/10xGraph/tree/main/examples/swarm), [`supervisor_team/`](https://github.com/10xGraph/10xGraph/tree/main/examples/supervisor_team), [`handoff/`](https://github.com/10xGraph/10xGraph/tree/main/examples/handoff), [`multiagent/`](https://github.com/10xGraph/10xGraph/tree/main/examples/multiagent), [`plan_act_reflect/`](https://github.com/10xGraph/10xGraph/tree/main/examples/plan_act_reflect) |
430
+ | Realtime audio, multimodal | [`realtime/`](https://github.com/10xGraph/10xGraph/tree/main/examples/realtime), [`multimodal/`](https://github.com/10xGraph/10xGraph/tree/main/examples/multimodal) |
431
+ | Structured output, skills, custom state | [`structured_output/`](https://github.com/10xGraph/10xGraph/tree/main/examples/structured_output), [`skills/`](https://github.com/10xGraph/10xGraph/tree/main/examples/skills), [`custom-state/`](https://github.com/10xGraph/10xGraph/tree/main/examples/custom-state) |
432
+ | Providers and A2A | [`providers/`](https://github.com/10xGraph/10xGraph/tree/main/examples/providers), [`a2a_sdk/`](https://github.com/10xGraph/10xGraph/tree/main/examples/a2a_sdk) |
433
+ | Checkpointing, graceful shutdown | [`checkpointer/`](https://github.com/10xGraph/10xGraph/tree/main/examples/checkpointer), [`graceful_shutdown/`](https://github.com/10xGraph/10xGraph/tree/main/examples/graceful_shutdown) |
434
+ | Evaluation and testing | [`evaluation/`](https://github.com/10xGraph/10xGraph/tree/main/examples/evaluation), [`testing/`](https://github.com/10xGraph/10xGraph/tree/main/examples/testing) |
435
+
436
+ Run one:
437
+
438
+ ```bash
439
+ export GEMINI_API_KEY=... # or OPENAI_API_KEY
440
+ python examples/react/react_single_class.py
441
+ ```
442
+
443
+ Some examples still use pre-rename import paths; the canonical paths are listed in [CLAUDE.md](https://github.com/10xGraph/10xGraph/blob/main/CLAUDE.md).
444
+
445
+ ---
446
+
447
+ ## Limitations
448
+
449
+ - Smaller community and fewer integrations than LangGraph or CrewAI.
450
+ - Pre-1.0 (current release line 0.10.x): pin versions and read the changelog.
451
+ - The rename from Agentflow resets brand recognition; "10xGraph" has no search history yet.
452
+ - LangGraph has stronger visual tooling (Studio, LangSmith observability).
453
+ - Requires Python 3.12 or newer. Code-first, not a no-code builder.
454
+ - Automatic per-tool permissions (user A may call `refund`, user B may not) are not built in. Tools can check the caller's verified scopes with `tenxgraph.core.authz.has_scope`.
455
+
456
+ ---
457
+
458
+ ## Roadmap
459
+
460
+ - Done: Core graph engine with nodes and edges
461
+ - Done: State management and checkpointing
462
+ - Done: Tool integration (MCP, custom tools, parallel execution)
463
+ - Done: Streaming and event publishing
464
+ - Done: Human-in-the-loop support
465
+ - Done: Prebuilt agent patterns
466
+ - Done: Agent-to-Agent (A2A) communication protocols
467
+ - Done: Observability and tracing (OpenTelemetry)
468
+ - Done: Realtime audio-to-audio agents (Gemini Live)
469
+ - Planned: Remote node execution for distributed processing
470
+ - Planned: More persistence backends (Redis, DynamoDB)
471
+ - Planned: Parallel/branching strategies
472
+ - Planned: Visual graph editor
473
+
474
+ ---
475
+
476
+ ## Contributing
477
+
478
+ 10xGraph is built in the open and contributions are welcome: bug reports with a clean reproduction, docs and examples, provider coverage, persistence backends, and typing (removing a module from the `mypy` ignore list is a welcome pull request).
479
+
480
+ ```bash
481
+ git clone https://github.com/10xGraph/10xGraph.git
482
+ cd 10xGraph
483
+ uv sync --dev
484
+ uv run pytest
485
+ uv run ruff check .
486
+ uv run mypy tenxgraph/
487
+ ```
488
+
489
+ Read [CONTRIBUTING.md](https://github.com/10xGraph/10xGraph/blob/main/CONTRIBUTING.md) for the full workflow and the [Code of Conduct](https://github.com/10xGraph/10xGraph/blob/main/CODE_OF_CONDUCT.md). Questions and ideas go to [Discussions](https://github.com/10xGraph/10xGraph/discussions).
490
+
491
+ ---
492
+
493
+ ## Security
494
+
495
+ Found a vulnerability? Do not open a public issue. Follow the process in [SECURITY.md](https://github.com/10xGraph/10xGraph/blob/main/SECURITY.md).
496
+
497
+ ---
498
+
499
+ ## License
500
+
501
+ 10xGraph is [MIT licensed](https://github.com/10xGraph/10xGraph/blob/main/LICENSE) and made by [10xScale](https://10xscale.ai). Copyright 10xScale. Contributions are accepted under the same license.
502
+
503
+ ---
504
+
505
+ ## Links
506
+
507
+ - Documentation: [10xgraph.com](https://10xgraph.com)
508
+ - PyPI: [`10xgraph`](https://pypi.org/project/10xgraph/)
509
+ - [Issues](https://github.com/10xGraph/10xGraph/issues) and [Discussions](https://github.com/10xGraph/10xGraph/discussions)
510
+ - [Changelog](https://github.com/10xGraph/10xGraph/blob/main/CHANGELOG.md)
511
+ - [Examples](https://github.com/10xGraph/10xGraph/tree/main/examples)