XoneAI 1.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 (658) hide show
  1. xoneai-1.0.1/PKG-INFO +3548 -0
  2. xoneai-1.0.1/README.md +3424 -0
  3. xoneai-1.0.1/XoneAI.egg-info/PKG-INFO +3548 -0
  4. xoneai-1.0.1/XoneAI.egg-info/SOURCES.txt +656 -0
  5. xoneai-1.0.1/XoneAI.egg-info/dependency_links.txt +1 -0
  6. xoneai-1.0.1/XoneAI.egg-info/entry_points.txt +4 -0
  7. xoneai-1.0.1/XoneAI.egg-info/requires.txt +132 -0
  8. xoneai-1.0.1/XoneAI.egg-info/top_level.txt +1 -0
  9. xoneai-1.0.1/pyproject.toml +163 -0
  10. xoneai-1.0.1/setup.cfg +4 -0
  11. xoneai-1.0.1/tests/test.py +108 -0
  12. xoneai-1.0.1/tests/test_agents_playbook.py +36 -0
  13. xoneai-1.0.1/tests/test_approval_system.py +223 -0
  14. xoneai-1.0.1/tests/test_basic.py +32 -0
  15. xoneai-1.0.1/tests/test_cli_features.py +179 -0
  16. xoneai-1.0.1/tests/test_custom_tools_fix.py +83 -0
  17. xoneai-1.0.1/tests/test_double_api_fix.py +187 -0
  18. xoneai-1.0.1/tests/test_n8n_integration.py +246 -0
  19. xoneai-1.0.1/tests/test_phase2_refactor.py +160 -0
  20. xoneai-1.0.1/tests/test_recipe.py +471 -0
  21. xoneai-1.0.1/tests/test_registry.py +568 -0
  22. xoneai-1.0.1/tests/test_runner.py +363 -0
  23. xoneai-1.0.1/tests/test_serve_features.py +519 -0
  24. xoneai-1.0.1/xoneai/__init__.py +86 -0
  25. xoneai-1.0.1/xoneai/__main__.py +15 -0
  26. xoneai-1.0.1/xoneai/_dev/__init__.py +17 -0
  27. xoneai-1.0.1/xoneai/_dev/api_md.py +1024 -0
  28. xoneai-1.0.1/xoneai/_dev/parity/__init__.py +42 -0
  29. xoneai-1.0.1/xoneai/_dev/parity/docs_extractor.py +183 -0
  30. xoneai-1.0.1/xoneai/_dev/parity/docs_generator.py +981 -0
  31. xoneai-1.0.1/xoneai/_dev/parity/generator.py +785 -0
  32. xoneai-1.0.1/xoneai/_dev/parity/python_docs_extractor.py +167 -0
  33. xoneai-1.0.1/xoneai/_dev/parity/python_extractor.py +252 -0
  34. xoneai-1.0.1/xoneai/_dev/parity/rust_docs_extractor.py +55 -0
  35. xoneai-1.0.1/xoneai/_dev/parity/rust_extractor.py +332 -0
  36. xoneai-1.0.1/xoneai/_dev/parity/topic_normalizer.py +170 -0
  37. xoneai-1.0.1/xoneai/_dev/parity/ts_docs_extractor.py +55 -0
  38. xoneai-1.0.1/xoneai/_dev/parity/typescript_extractor.py +219 -0
  39. xoneai-1.0.1/xoneai/acp/__init__.py +54 -0
  40. xoneai-1.0.1/xoneai/acp/config.py +159 -0
  41. xoneai-1.0.1/xoneai/acp/safe_edit.py +442 -0
  42. xoneai-1.0.1/xoneai/acp/server.py +587 -0
  43. xoneai-1.0.1/xoneai/acp/session.py +219 -0
  44. xoneai-1.0.1/xoneai/adapters/__init__.py +50 -0
  45. xoneai-1.0.1/xoneai/adapters/readers.py +395 -0
  46. xoneai-1.0.1/xoneai/adapters/rerankers.py +315 -0
  47. xoneai-1.0.1/xoneai/adapters/retrievers.py +568 -0
  48. xoneai-1.0.1/xoneai/adapters/vector_stores.py +409 -0
  49. xoneai-1.0.1/xoneai/agent_scheduler.py +337 -0
  50. xoneai-1.0.1/xoneai/agents_generator.py +1004 -0
  51. xoneai-1.0.1/xoneai/api/call.py +292 -0
  52. xoneai-1.0.1/xoneai/app/__init__.py +24 -0
  53. xoneai-1.0.1/xoneai/app/agentos.py +243 -0
  54. xoneai-1.0.1/xoneai/audit/__init__.py +23 -0
  55. xoneai-1.0.1/xoneai/audit/agent_centric.py +580 -0
  56. xoneai-1.0.1/xoneai/auto.py +1380 -0
  57. xoneai-1.0.1/xoneai/bots/__init__.py +65 -0
  58. xoneai-1.0.1/xoneai/bots/_ack.py +99 -0
  59. xoneai-1.0.1/xoneai/bots/_approval.py +149 -0
  60. xoneai-1.0.1/xoneai/bots/_approval_base.py +139 -0
  61. xoneai-1.0.1/xoneai/bots/_chunk.py +127 -0
  62. xoneai-1.0.1/xoneai/bots/_commands.py +74 -0
  63. xoneai-1.0.1/xoneai/bots/_config_schema.py +152 -0
  64. xoneai-1.0.1/xoneai/bots/_debounce.py +122 -0
  65. xoneai-1.0.1/xoneai/bots/_discord_approval.py +372 -0
  66. xoneai-1.0.1/xoneai/bots/_http_approval.py +255 -0
  67. xoneai-1.0.1/xoneai/bots/_protocol_mixin.py +235 -0
  68. xoneai-1.0.1/xoneai/bots/_registry.py +84 -0
  69. xoneai-1.0.1/xoneai/bots/_resilience.py +252 -0
  70. xoneai-1.0.1/xoneai/bots/_session.py +237 -0
  71. xoneai-1.0.1/xoneai/bots/_slack_approval.py +399 -0
  72. xoneai-1.0.1/xoneai/bots/_telegram_approval.py +373 -0
  73. xoneai-1.0.1/xoneai/bots/_webhook_approval.py +254 -0
  74. xoneai-1.0.1/xoneai/bots/_whatsapp_web_adapter.py +333 -0
  75. xoneai-1.0.1/xoneai/bots/bot.py +313 -0
  76. xoneai-1.0.1/xoneai/bots/botos.py +320 -0
  77. xoneai-1.0.1/xoneai/bots/discord.py +462 -0
  78. xoneai-1.0.1/xoneai/bots/media.py +78 -0
  79. xoneai-1.0.1/xoneai/bots/slack.py +555 -0
  80. xoneai-1.0.1/xoneai/bots/telegram.py +711 -0
  81. xoneai-1.0.1/xoneai/bots/whatsapp.py +913 -0
  82. xoneai-1.0.1/xoneai/browser/__init__.py +50 -0
  83. xoneai-1.0.1/xoneai/browser/agent.py +827 -0
  84. xoneai-1.0.1/xoneai/browser/benchmark.py +952 -0
  85. xoneai-1.0.1/xoneai/browser/cdp_agent.py +1617 -0
  86. xoneai-1.0.1/xoneai/browser/cdp_utils.py +367 -0
  87. xoneai-1.0.1/xoneai/browser/cli.py +3161 -0
  88. xoneai-1.0.1/xoneai/browser/diagnostics.py +609 -0
  89. xoneai-1.0.1/xoneai/browser/launcher.py +363 -0
  90. xoneai-1.0.1/xoneai/browser/playwright_agent.py +271 -0
  91. xoneai-1.0.1/xoneai/browser/profiling.py +305 -0
  92. xoneai-1.0.1/xoneai/browser/protocol.py +108 -0
  93. xoneai-1.0.1/xoneai/browser/report.py +137 -0
  94. xoneai-1.0.1/xoneai/browser/server.py +1035 -0
  95. xoneai-1.0.1/xoneai/browser/sessions.py +386 -0
  96. xoneai-1.0.1/xoneai/browser/video.py +333 -0
  97. xoneai-1.0.1/xoneai/capabilities/__init__.py +278 -0
  98. xoneai-1.0.1/xoneai/capabilities/a2a.py +140 -0
  99. xoneai-1.0.1/xoneai/capabilities/assistants.py +283 -0
  100. xoneai-1.0.1/xoneai/capabilities/audio.py +320 -0
  101. xoneai-1.0.1/xoneai/capabilities/batches.py +469 -0
  102. xoneai-1.0.1/xoneai/capabilities/completions.py +336 -0
  103. xoneai-1.0.1/xoneai/capabilities/container_files.py +155 -0
  104. xoneai-1.0.1/xoneai/capabilities/containers.py +93 -0
  105. xoneai-1.0.1/xoneai/capabilities/embeddings.py +168 -0
  106. xoneai-1.0.1/xoneai/capabilities/files.py +467 -0
  107. xoneai-1.0.1/xoneai/capabilities/fine_tuning.py +293 -0
  108. xoneai-1.0.1/xoneai/capabilities/guardrails.py +182 -0
  109. xoneai-1.0.1/xoneai/capabilities/images.py +330 -0
  110. xoneai-1.0.1/xoneai/capabilities/mcp.py +190 -0
  111. xoneai-1.0.1/xoneai/capabilities/messages.py +270 -0
  112. xoneai-1.0.1/xoneai/capabilities/moderations.py +154 -0
  113. xoneai-1.0.1/xoneai/capabilities/ocr.py +217 -0
  114. xoneai-1.0.1/xoneai/capabilities/passthrough.py +204 -0
  115. xoneai-1.0.1/xoneai/capabilities/rag.py +207 -0
  116. xoneai-1.0.1/xoneai/capabilities/realtime.py +160 -0
  117. xoneai-1.0.1/xoneai/capabilities/rerank.py +165 -0
  118. xoneai-1.0.1/xoneai/capabilities/responses.py +266 -0
  119. xoneai-1.0.1/xoneai/capabilities/search.py +109 -0
  120. xoneai-1.0.1/xoneai/capabilities/skills.py +133 -0
  121. xoneai-1.0.1/xoneai/capabilities/vector_store_files.py +334 -0
  122. xoneai-1.0.1/xoneai/capabilities/vector_stores.py +304 -0
  123. xoneai-1.0.1/xoneai/capabilities/videos.py +141 -0
  124. xoneai-1.0.1/xoneai/chainlit_ui.py +304 -0
  125. xoneai-1.0.1/xoneai/chat/__init__.py +106 -0
  126. xoneai-1.0.1/xoneai/chat/app.py +125 -0
  127. xoneai-1.0.1/xoneai/cli/__init__.py +26 -0
  128. xoneai-1.0.1/xoneai/cli/app.py +525 -0
  129. xoneai-1.0.1/xoneai/cli/branding.py +98 -0
  130. xoneai-1.0.1/xoneai/cli/commands/__init__.py +91 -0
  131. xoneai-1.0.1/xoneai/cli/commands/acp.py +80 -0
  132. xoneai-1.0.1/xoneai/cli/commands/agents.py +80 -0
  133. xoneai-1.0.1/xoneai/cli/commands/app.py +139 -0
  134. xoneai-1.0.1/xoneai/cli/commands/audit.py +102 -0
  135. xoneai-1.0.1/xoneai/cli/commands/batch.py +848 -0
  136. xoneai-1.0.1/xoneai/cli/commands/benchmark.py +286 -0
  137. xoneai-1.0.1/xoneai/cli/commands/bot.py +403 -0
  138. xoneai-1.0.1/xoneai/cli/commands/browser.py +299 -0
  139. xoneai-1.0.1/xoneai/cli/commands/call.py +45 -0
  140. xoneai-1.0.1/xoneai/cli/commands/chat.py +319 -0
  141. xoneai-1.0.1/xoneai/cli/commands/code.py +156 -0
  142. xoneai-1.0.1/xoneai/cli/commands/commit.py +47 -0
  143. xoneai-1.0.1/xoneai/cli/commands/completion.py +333 -0
  144. xoneai-1.0.1/xoneai/cli/commands/config.py +166 -0
  145. xoneai-1.0.1/xoneai/cli/commands/context.py +414 -0
  146. xoneai-1.0.1/xoneai/cli/commands/debug.py +142 -0
  147. xoneai-1.0.1/xoneai/cli/commands/deploy.py +109 -0
  148. xoneai-1.0.1/xoneai/cli/commands/diag.py +55 -0
  149. xoneai-1.0.1/xoneai/cli/commands/docs.py +1572 -0
  150. xoneai-1.0.1/xoneai/cli/commands/doctor.py +334 -0
  151. xoneai-1.0.1/xoneai/cli/commands/endpoints.py +51 -0
  152. xoneai-1.0.1/xoneai/cli/commands/environment.py +179 -0
  153. xoneai-1.0.1/xoneai/cli/commands/eval.py +131 -0
  154. xoneai-1.0.1/xoneai/cli/commands/examples.py +826 -0
  155. xoneai-1.0.1/xoneai/cli/commands/gateway.py +83 -0
  156. xoneai-1.0.1/xoneai/cli/commands/hooks.py +74 -0
  157. xoneai-1.0.1/xoneai/cli/commands/knowledge.py +440 -0
  158. xoneai-1.0.1/xoneai/cli/commands/loop.py +211 -0
  159. xoneai-1.0.1/xoneai/cli/commands/lsp.py +112 -0
  160. xoneai-1.0.1/xoneai/cli/commands/mcp.py +700 -0
  161. xoneai-1.0.1/xoneai/cli/commands/memory.py +298 -0
  162. xoneai-1.0.1/xoneai/cli/commands/obs.py +19 -0
  163. xoneai-1.0.1/xoneai/cli/commands/package.py +76 -0
  164. xoneai-1.0.1/xoneai/cli/commands/plugins.py +609 -0
  165. xoneai-1.0.1/xoneai/cli/commands/profile.py +466 -0
  166. xoneai-1.0.1/xoneai/cli/commands/rag.py +913 -0
  167. xoneai-1.0.1/xoneai/cli/commands/realtime.py +45 -0
  168. xoneai-1.0.1/xoneai/cli/commands/recipe.py +675 -0
  169. xoneai-1.0.1/xoneai/cli/commands/registry.py +59 -0
  170. xoneai-1.0.1/xoneai/cli/commands/replay.py +830 -0
  171. xoneai-1.0.1/xoneai/cli/commands/research.py +49 -0
  172. xoneai-1.0.1/xoneai/cli/commands/retrieval.py +377 -0
  173. xoneai-1.0.1/xoneai/cli/commands/rules.py +71 -0
  174. xoneai-1.0.1/xoneai/cli/commands/run.py +411 -0
  175. xoneai-1.0.1/xoneai/cli/commands/sandbox.py +371 -0
  176. xoneai-1.0.1/xoneai/cli/commands/schedule.py +150 -0
  177. xoneai-1.0.1/xoneai/cli/commands/serve.py +579 -0
  178. xoneai-1.0.1/xoneai/cli/commands/session.py +284 -0
  179. xoneai-1.0.1/xoneai/cli/commands/skills.py +370 -0
  180. xoneai-1.0.1/xoneai/cli/commands/standardise.py +694 -0
  181. xoneai-1.0.1/xoneai/cli/commands/templates.py +54 -0
  182. xoneai-1.0.1/xoneai/cli/commands/test.py +558 -0
  183. xoneai-1.0.1/xoneai/cli/commands/todo.py +74 -0
  184. xoneai-1.0.1/xoneai/cli/commands/tools.py +204 -0
  185. xoneai-1.0.1/xoneai/cli/commands/traces.py +145 -0
  186. xoneai-1.0.1/xoneai/cli/commands/tracker.py +852 -0
  187. xoneai-1.0.1/xoneai/cli/commands/train.py +613 -0
  188. xoneai-1.0.1/xoneai/cli/commands/ui.py +242 -0
  189. xoneai-1.0.1/xoneai/cli/commands/version.py +101 -0
  190. xoneai-1.0.1/xoneai/cli/commands/workflow.py +91 -0
  191. xoneai-1.0.1/xoneai/cli/config_loader.py +298 -0
  192. xoneai-1.0.1/xoneai/cli/configuration/__init__.py +18 -0
  193. xoneai-1.0.1/xoneai/cli/configuration/loader.py +353 -0
  194. xoneai-1.0.1/xoneai/cli/configuration/paths.py +114 -0
  195. xoneai-1.0.1/xoneai/cli/configuration/schema.py +233 -0
  196. xoneai-1.0.1/xoneai/cli/execution/__init__.py +99 -0
  197. xoneai-1.0.1/xoneai/cli/execution/core.py +210 -0
  198. xoneai-1.0.1/xoneai/cli/execution/profiler.py +898 -0
  199. xoneai-1.0.1/xoneai/cli/execution/request.py +85 -0
  200. xoneai-1.0.1/xoneai/cli/execution/result.py +74 -0
  201. xoneai-1.0.1/xoneai/cli/features/__init__.py +273 -0
  202. xoneai-1.0.1/xoneai/cli/features/acp.py +236 -0
  203. xoneai-1.0.1/xoneai/cli/features/action_orchestrator.py +554 -0
  204. xoneai-1.0.1/xoneai/cli/features/agent_scheduler.py +773 -0
  205. xoneai-1.0.1/xoneai/cli/features/agent_tools.py +474 -0
  206. xoneai-1.0.1/xoneai/cli/features/agents.py +375 -0
  207. xoneai-1.0.1/xoneai/cli/features/approval.py +139 -0
  208. xoneai-1.0.1/xoneai/cli/features/at_mentions.py +471 -0
  209. xoneai-1.0.1/xoneai/cli/features/audit_cli.py +270 -0
  210. xoneai-1.0.1/xoneai/cli/features/auto_memory.py +182 -0
  211. xoneai-1.0.1/xoneai/cli/features/auto_mode.py +552 -0
  212. xoneai-1.0.1/xoneai/cli/features/autonomy_mode.py +546 -0
  213. xoneai-1.0.1/xoneai/cli/features/background.py +356 -0
  214. xoneai-1.0.1/xoneai/cli/features/base.py +168 -0
  215. xoneai-1.0.1/xoneai/cli/features/benchmark.py +1462 -0
  216. xoneai-1.0.1/xoneai/cli/features/bots_cli.py +1133 -0
  217. xoneai-1.0.1/xoneai/cli/features/capabilities.py +1326 -0
  218. xoneai-1.0.1/xoneai/cli/features/checkpoints.py +338 -0
  219. xoneai-1.0.1/xoneai/cli/features/cli_profiler.py +335 -0
  220. xoneai-1.0.1/xoneai/cli/features/code_intelligence.py +666 -0
  221. xoneai-1.0.1/xoneai/cli/features/compaction.py +294 -0
  222. xoneai-1.0.1/xoneai/cli/features/compare.py +534 -0
  223. xoneai-1.0.1/xoneai/cli/features/config_hierarchy.py +318 -0
  224. xoneai-1.0.1/xoneai/cli/features/context_manager.py +597 -0
  225. xoneai-1.0.1/xoneai/cli/features/cost_tracker.py +514 -0
  226. xoneai-1.0.1/xoneai/cli/features/csv_test_runner.py +736 -0
  227. xoneai-1.0.1/xoneai/cli/features/debug.py +810 -0
  228. xoneai-1.0.1/xoneai/cli/features/deploy.py +517 -0
  229. xoneai-1.0.1/xoneai/cli/features/diag.py +289 -0
  230. xoneai-1.0.1/xoneai/cli/features/doctor/__init__.py +63 -0
  231. xoneai-1.0.1/xoneai/cli/features/doctor/checks/__init__.py +24 -0
  232. xoneai-1.0.1/xoneai/cli/features/doctor/checks/acp_checks.py +220 -0
  233. xoneai-1.0.1/xoneai/cli/features/doctor/checks/bot_checks.py +88 -0
  234. xoneai-1.0.1/xoneai/cli/features/doctor/checks/config_checks.py +366 -0
  235. xoneai-1.0.1/xoneai/cli/features/doctor/checks/db_checks.py +366 -0
  236. xoneai-1.0.1/xoneai/cli/features/doctor/checks/env_checks.py +628 -0
  237. xoneai-1.0.1/xoneai/cli/features/doctor/checks/lsp_checks.py +231 -0
  238. xoneai-1.0.1/xoneai/cli/features/doctor/checks/mcp_checks.py +349 -0
  239. xoneai-1.0.1/xoneai/cli/features/doctor/checks/memory_checks.py +268 -0
  240. xoneai-1.0.1/xoneai/cli/features/doctor/checks/network_checks.py +251 -0
  241. xoneai-1.0.1/xoneai/cli/features/doctor/checks/obs_checks.py +328 -0
  242. xoneai-1.0.1/xoneai/cli/features/doctor/checks/performance_checks.py +235 -0
  243. xoneai-1.0.1/xoneai/cli/features/doctor/checks/permissions_checks.py +259 -0
  244. xoneai-1.0.1/xoneai/cli/features/doctor/checks/selftest_checks.py +322 -0
  245. xoneai-1.0.1/xoneai/cli/features/doctor/checks/serve_checks.py +426 -0
  246. xoneai-1.0.1/xoneai/cli/features/doctor/checks/skills_checks.py +231 -0
  247. xoneai-1.0.1/xoneai/cli/features/doctor/checks/tools_checks.py +371 -0
  248. xoneai-1.0.1/xoneai/cli/features/doctor/engine.py +266 -0
  249. xoneai-1.0.1/xoneai/cli/features/doctor/formatters.py +310 -0
  250. xoneai-1.0.1/xoneai/cli/features/doctor/handler.py +397 -0
  251. xoneai-1.0.1/xoneai/cli/features/doctor/models.py +265 -0
  252. xoneai-1.0.1/xoneai/cli/features/doctor/registry.py +239 -0
  253. xoneai-1.0.1/xoneai/cli/features/endpoints.py +1019 -0
  254. xoneai-1.0.1/xoneai/cli/features/eval.py +559 -0
  255. xoneai-1.0.1/xoneai/cli/features/examples.py +707 -0
  256. xoneai-1.0.1/xoneai/cli/features/external_agents.py +231 -0
  257. xoneai-1.0.1/xoneai/cli/features/fast_context.py +410 -0
  258. xoneai-1.0.1/xoneai/cli/features/file_history.py +320 -0
  259. xoneai-1.0.1/xoneai/cli/features/flow_display.py +566 -0
  260. xoneai-1.0.1/xoneai/cli/features/gateway.py +238 -0
  261. xoneai-1.0.1/xoneai/cli/features/git_attribution.py +159 -0
  262. xoneai-1.0.1/xoneai/cli/features/git_integration.py +651 -0
  263. xoneai-1.0.1/xoneai/cli/features/guardrail.py +171 -0
  264. xoneai-1.0.1/xoneai/cli/features/handoff.py +252 -0
  265. xoneai-1.0.1/xoneai/cli/features/hooks.py +583 -0
  266. xoneai-1.0.1/xoneai/cli/features/image.py +384 -0
  267. xoneai-1.0.1/xoneai/cli/features/interactive_core_headless.py +450 -0
  268. xoneai-1.0.1/xoneai/cli/features/interactive_runtime.py +600 -0
  269. xoneai-1.0.1/xoneai/cli/features/interactive_test_harness.py +537 -0
  270. xoneai-1.0.1/xoneai/cli/features/interactive_tools.py +408 -0
  271. xoneai-1.0.1/xoneai/cli/features/interactive_tui.py +603 -0
  272. xoneai-1.0.1/xoneai/cli/features/jobs.py +632 -0
  273. xoneai-1.0.1/xoneai/cli/features/knowledge.py +531 -0
  274. xoneai-1.0.1/xoneai/cli/features/knowledge_cli.py +438 -0
  275. xoneai-1.0.1/xoneai/cli/features/lite.py +244 -0
  276. xoneai-1.0.1/xoneai/cli/features/logs.py +200 -0
  277. xoneai-1.0.1/xoneai/cli/features/lsp_cli.py +225 -0
  278. xoneai-1.0.1/xoneai/cli/features/lsp_diagnostics.py +185 -0
  279. xoneai-1.0.1/xoneai/cli/features/mcp.py +169 -0
  280. xoneai-1.0.1/xoneai/cli/features/message_queue.py +587 -0
  281. xoneai-1.0.1/xoneai/cli/features/metrics.py +211 -0
  282. xoneai-1.0.1/xoneai/cli/features/migrate.py +1297 -0
  283. xoneai-1.0.1/xoneai/cli/features/migration_flow.py +463 -0
  284. xoneai-1.0.1/xoneai/cli/features/migration_spec.py +276 -0
  285. xoneai-1.0.1/xoneai/cli/features/n8n.py +673 -0
  286. xoneai-1.0.1/xoneai/cli/features/observability.py +293 -0
  287. xoneai-1.0.1/xoneai/cli/features/ollama.py +361 -0
  288. xoneai-1.0.1/xoneai/cli/features/onboard.py +253 -0
  289. xoneai-1.0.1/xoneai/cli/features/output_modes.py +152 -0
  290. xoneai-1.0.1/xoneai/cli/features/output_style.py +273 -0
  291. xoneai-1.0.1/xoneai/cli/features/package.py +631 -0
  292. xoneai-1.0.1/xoneai/cli/features/performance.py +308 -0
  293. xoneai-1.0.1/xoneai/cli/features/persistence.py +636 -0
  294. xoneai-1.0.1/xoneai/cli/features/plugin_cli.py +295 -0
  295. xoneai-1.0.1/xoneai/cli/features/profile.py +226 -0
  296. xoneai-1.0.1/xoneai/cli/features/profiler/__init__.py +81 -0
  297. xoneai-1.0.1/xoneai/cli/features/profiler/core.py +558 -0
  298. xoneai-1.0.1/xoneai/cli/features/profiler/optimizations.py +652 -0
  299. xoneai-1.0.1/xoneai/cli/features/profiler/suite.py +386 -0
  300. xoneai-1.0.1/xoneai/cli/features/profiling.py +350 -0
  301. xoneai-1.0.1/xoneai/cli/features/queue/__init__.py +73 -0
  302. xoneai-1.0.1/xoneai/cli/features/queue/manager.py +435 -0
  303. xoneai-1.0.1/xoneai/cli/features/queue/models.py +289 -0
  304. xoneai-1.0.1/xoneai/cli/features/queue/persistence.py +564 -0
  305. xoneai-1.0.1/xoneai/cli/features/queue/scheduler.py +529 -0
  306. xoneai-1.0.1/xoneai/cli/features/queue/worker.py +400 -0
  307. xoneai-1.0.1/xoneai/cli/features/recipe.py +2183 -0
  308. xoneai-1.0.1/xoneai/cli/features/recipe_creator.py +996 -0
  309. xoneai-1.0.1/xoneai/cli/features/recipe_optimizer.py +1364 -0
  310. xoneai-1.0.1/xoneai/cli/features/recipe_prompts.py +226 -0
  311. xoneai-1.0.1/xoneai/cli/features/recipes.py +449 -0
  312. xoneai-1.0.1/xoneai/cli/features/registry.py +229 -0
  313. xoneai-1.0.1/xoneai/cli/features/repo_map.py +860 -0
  314. xoneai-1.0.1/xoneai/cli/features/router.py +466 -0
  315. xoneai-1.0.1/xoneai/cli/features/safe_shell.py +354 -0
  316. xoneai-1.0.1/xoneai/cli/features/sandbox_cli.py +255 -0
  317. xoneai-1.0.1/xoneai/cli/features/sandbox_executor.py +515 -0
  318. xoneai-1.0.1/xoneai/cli/features/sdk_knowledge.py +500 -0
  319. xoneai-1.0.1/xoneai/cli/features/serve.py +829 -0
  320. xoneai-1.0.1/xoneai/cli/features/session.py +222 -0
  321. xoneai-1.0.1/xoneai/cli/features/skills.py +855 -0
  322. xoneai-1.0.1/xoneai/cli/features/slash_commands.py +650 -0
  323. xoneai-1.0.1/xoneai/cli/features/telemetry.py +179 -0
  324. xoneai-1.0.1/xoneai/cli/features/templates.py +1384 -0
  325. xoneai-1.0.1/xoneai/cli/features/thinking.py +305 -0
  326. xoneai-1.0.1/xoneai/cli/features/todo.py +334 -0
  327. xoneai-1.0.1/xoneai/cli/features/tools.py +680 -0
  328. xoneai-1.0.1/xoneai/cli/features/tui/__init__.py +83 -0
  329. xoneai-1.0.1/xoneai/cli/features/tui/app.py +871 -0
  330. xoneai-1.0.1/xoneai/cli/features/tui/cli.py +580 -0
  331. xoneai-1.0.1/xoneai/cli/features/tui/config.py +150 -0
  332. xoneai-1.0.1/xoneai/cli/features/tui/debug.py +526 -0
  333. xoneai-1.0.1/xoneai/cli/features/tui/events.py +99 -0
  334. xoneai-1.0.1/xoneai/cli/features/tui/mock_provider.py +328 -0
  335. xoneai-1.0.1/xoneai/cli/features/tui/orchestrator.py +652 -0
  336. xoneai-1.0.1/xoneai/cli/features/tui/screens/__init__.py +50 -0
  337. xoneai-1.0.1/xoneai/cli/features/tui/screens/help.py +157 -0
  338. xoneai-1.0.1/xoneai/cli/features/tui/screens/main.py +568 -0
  339. xoneai-1.0.1/xoneai/cli/features/tui/screens/queue.py +174 -0
  340. xoneai-1.0.1/xoneai/cli/features/tui/screens/session.py +124 -0
  341. xoneai-1.0.1/xoneai/cli/features/tui/screens/settings.py +148 -0
  342. xoneai-1.0.1/xoneai/cli/features/tui/session_store.py +198 -0
  343. xoneai-1.0.1/xoneai/cli/features/tui/widgets/__init__.py +56 -0
  344. xoneai-1.0.1/xoneai/cli/features/tui/widgets/chat.py +263 -0
  345. xoneai-1.0.1/xoneai/cli/features/tui/widgets/command_popup.py +258 -0
  346. xoneai-1.0.1/xoneai/cli/features/tui/widgets/composer.py +292 -0
  347. xoneai-1.0.1/xoneai/cli/features/tui/widgets/file_popup.py +207 -0
  348. xoneai-1.0.1/xoneai/cli/features/tui/widgets/queue_panel.py +223 -0
  349. xoneai-1.0.1/xoneai/cli/features/tui/widgets/status.py +181 -0
  350. xoneai-1.0.1/xoneai/cli/features/tui/widgets/tool_panel.py +307 -0
  351. xoneai-1.0.1/xoneai/cli/features/wizard.py +289 -0
  352. xoneai-1.0.1/xoneai/cli/features/workflow.py +720 -0
  353. xoneai-1.0.1/xoneai/cli/features/yaml_utils.py +321 -0
  354. xoneai-1.0.1/xoneai/cli/interactive/__init__.py +48 -0
  355. xoneai-1.0.1/xoneai/cli/interactive/async_tui.py +1187 -0
  356. xoneai-1.0.1/xoneai/cli/interactive/config.py +133 -0
  357. xoneai-1.0.1/xoneai/cli/interactive/core.py +578 -0
  358. xoneai-1.0.1/xoneai/cli/interactive/events.py +131 -0
  359. xoneai-1.0.1/xoneai/cli/interactive/frontends/__init__.py +31 -0
  360. xoneai-1.0.1/xoneai/cli/interactive/frontends/rich_frontend.py +462 -0
  361. xoneai-1.0.1/xoneai/cli/interactive/frontends/textual_frontend.py +157 -0
  362. xoneai-1.0.1/xoneai/cli/interactive/repl.py +297 -0
  363. xoneai-1.0.1/xoneai/cli/interactive/split_tui.py +456 -0
  364. xoneai-1.0.1/xoneai/cli/interactive/tui_app.py +457 -0
  365. xoneai-1.0.1/xoneai/cli/interactive/xone_io.py +502 -0
  366. xoneai-1.0.1/xoneai/cli/legacy.py +266 -0
  367. xoneai-1.0.1/xoneai/cli/main.py +6491 -0
  368. xoneai-1.0.1/xoneai/cli/output/__init__.py +15 -0
  369. xoneai-1.0.1/xoneai/cli/output/console.py +363 -0
  370. xoneai-1.0.1/xoneai/cli/schedule_cli.py +54 -0
  371. xoneai-1.0.1/xoneai/cli/session/__init__.py +13 -0
  372. xoneai-1.0.1/xoneai/cli/session/unified.py +306 -0
  373. xoneai-1.0.1/xoneai/cli/state/__init__.py +31 -0
  374. xoneai-1.0.1/xoneai/cli/state/identifiers.py +161 -0
  375. xoneai-1.0.1/xoneai/cli/state/sessions.py +390 -0
  376. xoneai-1.0.1/xoneai/cli/ui/__init__.py +162 -0
  377. xoneai-1.0.1/xoneai/cli/ui/config.py +46 -0
  378. xoneai-1.0.1/xoneai/cli/ui/events.py +61 -0
  379. xoneai-1.0.1/xoneai/cli/ui/mg_backend.py +342 -0
  380. xoneai-1.0.1/xoneai/cli/ui/plain.py +133 -0
  381. xoneai-1.0.1/xoneai/cli/ui/rich_backend.py +162 -0
  382. xoneai-1.0.1/xoneai/code/__init__.py +93 -0
  383. xoneai-1.0.1/xoneai/code/agent_tools.py +344 -0
  384. xoneai-1.0.1/xoneai/code/diff/__init__.py +21 -0
  385. xoneai-1.0.1/xoneai/code/diff/diff_strategy.py +432 -0
  386. xoneai-1.0.1/xoneai/code/tools/__init__.py +27 -0
  387. xoneai-1.0.1/xoneai/code/tools/apply_diff.py +232 -0
  388. xoneai-1.0.1/xoneai/code/tools/execute_command.py +318 -0
  389. xoneai-1.0.1/xoneai/code/tools/list_files.py +274 -0
  390. xoneai-1.0.1/xoneai/code/tools/read_file.py +206 -0
  391. xoneai-1.0.1/xoneai/code/tools/search_replace.py +248 -0
  392. xoneai-1.0.1/xoneai/code/tools/write_file.py +227 -0
  393. xoneai-1.0.1/xoneai/code/utils/__init__.py +46 -0
  394. xoneai-1.0.1/xoneai/code/utils/file_utils.py +307 -0
  395. xoneai-1.0.1/xoneai/code/utils/ignore_utils.py +308 -0
  396. xoneai-1.0.1/xoneai/code/utils/text_utils.py +276 -0
  397. xoneai-1.0.1/xoneai/context/__init__.py +104 -0
  398. xoneai-1.0.1/xoneai/context/artifact_store.py +513 -0
  399. xoneai-1.0.1/xoneai/context/config.py +111 -0
  400. xoneai-1.0.1/xoneai/context/history_store.py +514 -0
  401. xoneai-1.0.1/xoneai/context/queue.py +384 -0
  402. xoneai-1.0.1/xoneai/context/setup.py +144 -0
  403. xoneai-1.0.1/xoneai/context/terminal_logger.py +486 -0
  404. xoneai-1.0.1/xoneai/daemon/__init__.py +62 -0
  405. xoneai-1.0.1/xoneai/daemon/launchd.py +138 -0
  406. xoneai-1.0.1/xoneai/daemon/systemd.py +123 -0
  407. xoneai-1.0.1/xoneai/db/__init__.py +64 -0
  408. xoneai-1.0.1/xoneai/db/adapter.py +531 -0
  409. xoneai-1.0.1/xoneai/deploy/__init__.py +62 -0
  410. xoneai-1.0.1/xoneai/deploy/api.py +231 -0
  411. xoneai-1.0.1/xoneai/deploy/docker.py +454 -0
  412. xoneai-1.0.1/xoneai/deploy/doctor.py +367 -0
  413. xoneai-1.0.1/xoneai/deploy/main.py +327 -0
  414. xoneai-1.0.1/xoneai/deploy/models.py +179 -0
  415. xoneai-1.0.1/xoneai/deploy/providers/__init__.py +33 -0
  416. xoneai-1.0.1/xoneai/deploy/providers/aws.py +331 -0
  417. xoneai-1.0.1/xoneai/deploy/providers/azure.py +358 -0
  418. xoneai-1.0.1/xoneai/deploy/providers/base.py +101 -0
  419. xoneai-1.0.1/xoneai/deploy/providers/gcp.py +314 -0
  420. xoneai-1.0.1/xoneai/deploy/schema.py +208 -0
  421. xoneai-1.0.1/xoneai/deploy.py +185 -0
  422. xoneai-1.0.1/xoneai/docs_runner/__init__.py +38 -0
  423. xoneai-1.0.1/xoneai/docs_runner/classifier.py +152 -0
  424. xoneai-1.0.1/xoneai/docs_runner/executor.py +336 -0
  425. xoneai-1.0.1/xoneai/docs_runner/extractor.py +215 -0
  426. xoneai-1.0.1/xoneai/docs_runner/reporter.py +289 -0
  427. xoneai-1.0.1/xoneai/docs_runner/runner.py +269 -0
  428. xoneai-1.0.1/xoneai/docs_runner/workspace.py +113 -0
  429. xoneai-1.0.1/xoneai/endpoints/__init__.py +53 -0
  430. xoneai-1.0.1/xoneai/endpoints/a2u_server.py +420 -0
  431. xoneai-1.0.1/xoneai/endpoints/discovery.py +165 -0
  432. xoneai-1.0.1/xoneai/endpoints/providers/__init__.py +28 -0
  433. xoneai-1.0.1/xoneai/endpoints/providers/a2a.py +253 -0
  434. xoneai-1.0.1/xoneai/endpoints/providers/a2u.py +208 -0
  435. xoneai-1.0.1/xoneai/endpoints/providers/agents_api.py +171 -0
  436. xoneai-1.0.1/xoneai/endpoints/providers/base.py +231 -0
  437. xoneai-1.0.1/xoneai/endpoints/providers/mcp.py +263 -0
  438. xoneai-1.0.1/xoneai/endpoints/providers/recipe.py +206 -0
  439. xoneai-1.0.1/xoneai/endpoints/providers/tools_mcp.py +150 -0
  440. xoneai-1.0.1/xoneai/endpoints/registry.py +131 -0
  441. xoneai-1.0.1/xoneai/endpoints/server.py +161 -0
  442. xoneai-1.0.1/xoneai/gateway/__init__.py +22 -0
  443. xoneai-1.0.1/xoneai/gateway/server.py +1101 -0
  444. xoneai-1.0.1/xoneai/inbuilt_tools/__init__.py +49 -0
  445. xoneai-1.0.1/xoneai/inbuilt_tools/autogen_tools.py +117 -0
  446. xoneai-1.0.1/xoneai/inc/__init__.py +12 -0
  447. xoneai-1.0.1/xoneai/inc/config.py +96 -0
  448. xoneai-1.0.1/xoneai/inc/models.py +153 -0
  449. xoneai-1.0.1/xoneai/integrations/__init__.py +56 -0
  450. xoneai-1.0.1/xoneai/integrations/base.py +303 -0
  451. xoneai-1.0.1/xoneai/integrations/claude_code.py +270 -0
  452. xoneai-1.0.1/xoneai/integrations/codex_cli.py +255 -0
  453. xoneai-1.0.1/xoneai/integrations/cursor_cli.py +195 -0
  454. xoneai-1.0.1/xoneai/integrations/gemini_cli.py +222 -0
  455. xoneai-1.0.1/xoneai/jobs/__init__.py +67 -0
  456. xoneai-1.0.1/xoneai/jobs/executor.py +424 -0
  457. xoneai-1.0.1/xoneai/jobs/models.py +230 -0
  458. xoneai-1.0.1/xoneai/jobs/router.py +314 -0
  459. xoneai-1.0.1/xoneai/jobs/server.py +186 -0
  460. xoneai-1.0.1/xoneai/jobs/store.py +215 -0
  461. xoneai-1.0.1/xoneai/llm/__init__.py +131 -0
  462. xoneai-1.0.1/xoneai/llm/registry.py +382 -0
  463. xoneai-1.0.1/xoneai/mcp_server/__init__.py +152 -0
  464. xoneai-1.0.1/xoneai/mcp_server/adapters/__init__.py +74 -0
  465. xoneai-1.0.1/xoneai/mcp_server/adapters/agents.py +128 -0
  466. xoneai-1.0.1/xoneai/mcp_server/adapters/capabilities.py +168 -0
  467. xoneai-1.0.1/xoneai/mcp_server/adapters/cli_tools.py +568 -0
  468. xoneai-1.0.1/xoneai/mcp_server/adapters/extended_capabilities.py +462 -0
  469. xoneai-1.0.1/xoneai/mcp_server/adapters/knowledge.py +93 -0
  470. xoneai-1.0.1/xoneai/mcp_server/adapters/memory.py +104 -0
  471. xoneai-1.0.1/xoneai/mcp_server/adapters/prompts.py +306 -0
  472. xoneai-1.0.1/xoneai/mcp_server/adapters/resources.py +124 -0
  473. xoneai-1.0.1/xoneai/mcp_server/adapters/tools_bridge.py +280 -0
  474. xoneai-1.0.1/xoneai/mcp_server/auth/__init__.py +48 -0
  475. xoneai-1.0.1/xoneai/mcp_server/auth/api_key.py +291 -0
  476. xoneai-1.0.1/xoneai/mcp_server/auth/oauth.py +460 -0
  477. xoneai-1.0.1/xoneai/mcp_server/auth/oidc.py +289 -0
  478. xoneai-1.0.1/xoneai/mcp_server/auth/scopes.py +260 -0
  479. xoneai-1.0.1/xoneai/mcp_server/cli.py +852 -0
  480. xoneai-1.0.1/xoneai/mcp_server/elicitation.py +445 -0
  481. xoneai-1.0.1/xoneai/mcp_server/icons.py +302 -0
  482. xoneai-1.0.1/xoneai/mcp_server/recipe_adapter.py +573 -0
  483. xoneai-1.0.1/xoneai/mcp_server/recipe_cli.py +824 -0
  484. xoneai-1.0.1/xoneai/mcp_server/registry.py +703 -0
  485. xoneai-1.0.1/xoneai/mcp_server/sampling.py +422 -0
  486. xoneai-1.0.1/xoneai/mcp_server/server.py +490 -0
  487. xoneai-1.0.1/xoneai/mcp_server/tasks.py +443 -0
  488. xoneai-1.0.1/xoneai/mcp_server/tool_index.py +483 -0
  489. xoneai-1.0.1/xoneai/mcp_server/transports/__init__.py +18 -0
  490. xoneai-1.0.1/xoneai/mcp_server/transports/http_stream.py +376 -0
  491. xoneai-1.0.1/xoneai/mcp_server/transports/stdio.py +132 -0
  492. xoneai-1.0.1/xoneai/persistence/__init__.py +84 -0
  493. xoneai-1.0.1/xoneai/persistence/config.py +238 -0
  494. xoneai-1.0.1/xoneai/persistence/conversation/__init__.py +25 -0
  495. xoneai-1.0.1/xoneai/persistence/conversation/async_mysql.py +427 -0
  496. xoneai-1.0.1/xoneai/persistence/conversation/async_postgres.py +410 -0
  497. xoneai-1.0.1/xoneai/persistence/conversation/async_sqlite.py +371 -0
  498. xoneai-1.0.1/xoneai/persistence/conversation/base.py +151 -0
  499. xoneai-1.0.1/xoneai/persistence/conversation/json_store.py +250 -0
  500. xoneai-1.0.1/xoneai/persistence/conversation/mysql.py +387 -0
  501. xoneai-1.0.1/xoneai/persistence/conversation/postgres.py +401 -0
  502. xoneai-1.0.1/xoneai/persistence/conversation/singlestore.py +240 -0
  503. xoneai-1.0.1/xoneai/persistence/conversation/sqlite.py +341 -0
  504. xoneai-1.0.1/xoneai/persistence/conversation/supabase.py +203 -0
  505. xoneai-1.0.1/xoneai/persistence/conversation/surrealdb.py +287 -0
  506. xoneai-1.0.1/xoneai/persistence/factory.py +301 -0
  507. xoneai-1.0.1/xoneai/persistence/hooks/__init__.py +18 -0
  508. xoneai-1.0.1/xoneai/persistence/hooks/agent_hooks.py +297 -0
  509. xoneai-1.0.1/xoneai/persistence/knowledge/__init__.py +26 -0
  510. xoneai-1.0.1/xoneai/persistence/knowledge/base.py +144 -0
  511. xoneai-1.0.1/xoneai/persistence/knowledge/cassandra.py +232 -0
  512. xoneai-1.0.1/xoneai/persistence/knowledge/chroma.py +295 -0
  513. xoneai-1.0.1/xoneai/persistence/knowledge/clickhouse.py +242 -0
  514. xoneai-1.0.1/xoneai/persistence/knowledge/cosmosdb_vector.py +438 -0
  515. xoneai-1.0.1/xoneai/persistence/knowledge/couchbase.py +286 -0
  516. xoneai-1.0.1/xoneai/persistence/knowledge/lancedb.py +216 -0
  517. xoneai-1.0.1/xoneai/persistence/knowledge/langchain_adapter.py +291 -0
  518. xoneai-1.0.1/xoneai/persistence/knowledge/lightrag_adapter.py +212 -0
  519. xoneai-1.0.1/xoneai/persistence/knowledge/llamaindex_adapter.py +256 -0
  520. xoneai-1.0.1/xoneai/persistence/knowledge/milvus.py +277 -0
  521. xoneai-1.0.1/xoneai/persistence/knowledge/mongodb_vector.py +306 -0
  522. xoneai-1.0.1/xoneai/persistence/knowledge/pgvector.py +335 -0
  523. xoneai-1.0.1/xoneai/persistence/knowledge/pinecone.py +253 -0
  524. xoneai-1.0.1/xoneai/persistence/knowledge/qdrant.py +301 -0
  525. xoneai-1.0.1/xoneai/persistence/knowledge/redis_vector.py +291 -0
  526. xoneai-1.0.1/xoneai/persistence/knowledge/singlestore_vector.py +299 -0
  527. xoneai-1.0.1/xoneai/persistence/knowledge/surrealdb_vector.py +309 -0
  528. xoneai-1.0.1/xoneai/persistence/knowledge/upstash_vector.py +266 -0
  529. xoneai-1.0.1/xoneai/persistence/knowledge/weaviate.py +223 -0
  530. xoneai-1.0.1/xoneai/persistence/migrations/__init__.py +10 -0
  531. xoneai-1.0.1/xoneai/persistence/migrations/manager.py +251 -0
  532. xoneai-1.0.1/xoneai/persistence/orchestrator.py +406 -0
  533. xoneai-1.0.1/xoneai/persistence/state/__init__.py +21 -0
  534. xoneai-1.0.1/xoneai/persistence/state/async_mongodb.py +200 -0
  535. xoneai-1.0.1/xoneai/persistence/state/base.py +107 -0
  536. xoneai-1.0.1/xoneai/persistence/state/dynamodb.py +226 -0
  537. xoneai-1.0.1/xoneai/persistence/state/firestore.py +175 -0
  538. xoneai-1.0.1/xoneai/persistence/state/gcs.py +155 -0
  539. xoneai-1.0.1/xoneai/persistence/state/memory.py +245 -0
  540. xoneai-1.0.1/xoneai/persistence/state/mongodb.py +158 -0
  541. xoneai-1.0.1/xoneai/persistence/state/redis.py +190 -0
  542. xoneai-1.0.1/xoneai/persistence/state/upstash.py +144 -0
  543. xoneai-1.0.1/xoneai/persistence/tests/__init__.py +3 -0
  544. xoneai-1.0.1/xoneai/persistence/tests/test_all_backends.py +633 -0
  545. xoneai-1.0.1/xoneai/profiler.py +1214 -0
  546. xoneai-1.0.1/xoneai/recipe/__init__.py +134 -0
  547. xoneai-1.0.1/xoneai/recipe/bridge.py +278 -0
  548. xoneai-1.0.1/xoneai/recipe/core.py +1119 -0
  549. xoneai-1.0.1/xoneai/recipe/exceptions.py +54 -0
  550. xoneai-1.0.1/xoneai/recipe/history.py +467 -0
  551. xoneai-1.0.1/xoneai/recipe/models.py +266 -0
  552. xoneai-1.0.1/xoneai/recipe/operations.py +440 -0
  553. xoneai-1.0.1/xoneai/recipe/policy.py +422 -0
  554. xoneai-1.0.1/xoneai/recipe/registry.py +849 -0
  555. xoneai-1.0.1/xoneai/recipe/runtime.py +214 -0
  556. xoneai-1.0.1/xoneai/recipe/security.py +711 -0
  557. xoneai-1.0.1/xoneai/recipe/serve.py +859 -0
  558. xoneai-1.0.1/xoneai/recipe/server.py +613 -0
  559. xoneai-1.0.1/xoneai/replay/__init__.py +91 -0
  560. xoneai-1.0.1/xoneai/replay/analyzer.py +464 -0
  561. xoneai-1.0.1/xoneai/replay/applier.py +285 -0
  562. xoneai-1.0.1/xoneai/replay/judge.py +2719 -0
  563. xoneai-1.0.1/xoneai/replay/plan.py +200 -0
  564. xoneai-1.0.1/xoneai/replay/player.py +313 -0
  565. xoneai-1.0.1/xoneai/replay/reader.py +151 -0
  566. xoneai-1.0.1/xoneai/replay/storage.py +132 -0
  567. xoneai-1.0.1/xoneai/replay/writer.py +131 -0
  568. xoneai-1.0.1/xoneai/sandbox/__init__.py +23 -0
  569. xoneai-1.0.1/xoneai/sandbox/docker.py +437 -0
  570. xoneai-1.0.1/xoneai/sandbox/subprocess.py +349 -0
  571. xoneai-1.0.1/xoneai/scheduler/__init__.py +45 -0
  572. xoneai-1.0.1/xoneai/scheduler/agent_scheduler.py +552 -0
  573. xoneai-1.0.1/xoneai/scheduler/base.py +124 -0
  574. xoneai-1.0.1/xoneai/scheduler/daemon_manager.py +225 -0
  575. xoneai-1.0.1/xoneai/scheduler/state_manager.py +155 -0
  576. xoneai-1.0.1/xoneai/scheduler/yaml_loader.py +193 -0
  577. xoneai-1.0.1/xoneai/scheduler.py +194 -0
  578. xoneai-1.0.1/xoneai/security/__init__.py +183 -0
  579. xoneai-1.0.1/xoneai/security/audit.py +99 -0
  580. xoneai-1.0.1/xoneai/security/injection.py +414 -0
  581. xoneai-1.0.1/xoneai/security/protected.py +132 -0
  582. xoneai-1.0.1/xoneai/setup/__init__.py +1 -0
  583. xoneai-1.0.1/xoneai/setup/build.py +21 -0
  584. xoneai-1.0.1/xoneai/setup/post_install.py +23 -0
  585. xoneai-1.0.1/xoneai/setup/setup_conda_env.py +25 -0
  586. xoneai-1.0.1/xoneai/setup.py +16 -0
  587. xoneai-1.0.1/xoneai/standardise/__init__.py +84 -0
  588. xoneai-1.0.1/xoneai/standardise/ai_generator.py +1278 -0
  589. xoneai-1.0.1/xoneai/standardise/config.py +260 -0
  590. xoneai-1.0.1/xoneai/standardise/dedupe.py +221 -0
  591. xoneai-1.0.1/xoneai/standardise/discovery.py +319 -0
  592. xoneai-1.0.1/xoneai/standardise/drift.py +263 -0
  593. xoneai-1.0.1/xoneai/standardise/engine.py +270 -0
  594. xoneai-1.0.1/xoneai/standardise/enhanced_templates.py +674 -0
  595. xoneai-1.0.1/xoneai/standardise/example_verifier.py +229 -0
  596. xoneai-1.0.1/xoneai/standardise/manifest.py +201 -0
  597. xoneai-1.0.1/xoneai/standardise/models.py +355 -0
  598. xoneai-1.0.1/xoneai/standardise/reports.py +176 -0
  599. xoneai-1.0.1/xoneai/standardise/templates.py +399 -0
  600. xoneai-1.0.1/xoneai/standardise/undo_redo.py +232 -0
  601. xoneai-1.0.1/xoneai/standardise/validator.py +283 -0
  602. xoneai-1.0.1/xoneai/suite_runner/__init__.py +73 -0
  603. xoneai-1.0.1/xoneai/suite_runner/batch_source.py +351 -0
  604. xoneai-1.0.1/xoneai/suite_runner/cli_docs_source.py +300 -0
  605. xoneai-1.0.1/xoneai/suite_runner/discovery.py +269 -0
  606. xoneai-1.0.1/xoneai/suite_runner/docs_source.py +379 -0
  607. xoneai-1.0.1/xoneai/suite_runner/examples_source.py +173 -0
  608. xoneai-1.0.1/xoneai/suite_runner/executor.py +232 -0
  609. xoneai-1.0.1/xoneai/suite_runner/models.py +257 -0
  610. xoneai-1.0.1/xoneai/suite_runner/report_viewer.py +793 -0
  611. xoneai-1.0.1/xoneai/suite_runner/reporter.py +301 -0
  612. xoneai-1.0.1/xoneai/suite_runner/runner.py +294 -0
  613. xoneai-1.0.1/xoneai/templates/__init__.py +116 -0
  614. xoneai-1.0.1/xoneai/templates/cache.py +364 -0
  615. xoneai-1.0.1/xoneai/templates/dependency_checker.py +358 -0
  616. xoneai-1.0.1/xoneai/templates/discovery.py +391 -0
  617. xoneai-1.0.1/xoneai/templates/loader.py +649 -0
  618. xoneai-1.0.1/xoneai/templates/registry.py +511 -0
  619. xoneai-1.0.1/xoneai/templates/resolver.py +206 -0
  620. xoneai-1.0.1/xoneai/templates/security.py +334 -0
  621. xoneai-1.0.1/xoneai/templates/tool_override.py +501 -0
  622. xoneai-1.0.1/xoneai/templates/tools_doctor.py +256 -0
  623. xoneai-1.0.1/xoneai/test.py +105 -0
  624. xoneai-1.0.1/xoneai/tool_resolver.py +418 -0
  625. xoneai-1.0.1/xoneai/tools/__init__.py +61 -0
  626. xoneai-1.0.1/xoneai/tools/audio.py +268 -0
  627. xoneai-1.0.1/xoneai/tools/glob_tool.py +192 -0
  628. xoneai-1.0.1/xoneai/tools/grep_tool.py +259 -0
  629. xoneai-1.0.1/xoneai/tools/multiedit.py +224 -0
  630. xoneai-1.0.1/xoneai/train/__init__.py +77 -0
  631. xoneai-1.0.1/xoneai/train/agents/__init__.py +94 -0
  632. xoneai-1.0.1/xoneai/train/agents/grader.py +63 -0
  633. xoneai-1.0.1/xoneai/train/agents/hook.py +320 -0
  634. xoneai-1.0.1/xoneai/train/agents/models.py +328 -0
  635. xoneai-1.0.1/xoneai/train/agents/orchestrator.py +394 -0
  636. xoneai-1.0.1/xoneai/train/agents/storage.py +282 -0
  637. xoneai-1.0.1/xoneai/train/llm/__init__.py +23 -0
  638. xoneai-1.0.1/xoneai/train/llm/trainer.py +562 -0
  639. xoneai-1.0.1/xoneai/train.py +562 -0
  640. xoneai-1.0.1/xoneai/train_vision.py +306 -0
  641. xoneai-1.0.1/xoneai/ui/agents.py +838 -0
  642. xoneai-1.0.1/xoneai/ui/bot.py +422 -0
  643. xoneai-1.0.1/xoneai/ui/callbacks.py +57 -0
  644. xoneai-1.0.1/xoneai/ui/chainlit_compat.py +246 -0
  645. xoneai-1.0.1/xoneai/ui/chat.py +834 -0
  646. xoneai-1.0.1/xoneai/ui/code.py +816 -0
  647. xoneai-1.0.1/xoneai/ui/colab.py +474 -0
  648. xoneai-1.0.1/xoneai/ui/colab_chainlit.py +81 -0
  649. xoneai-1.0.1/xoneai/ui/components/aicoder.py +284 -0
  650. xoneai-1.0.1/xoneai/ui/context.py +283 -0
  651. xoneai-1.0.1/xoneai/ui/database_config.py +56 -0
  652. xoneai-1.0.1/xoneai/ui/db.py +294 -0
  653. xoneai-1.0.1/xoneai/ui/realtime.py +488 -0
  654. xoneai-1.0.1/xoneai/ui/realtimeclient/__init__.py +756 -0
  655. xoneai-1.0.1/xoneai/ui/realtimeclient/tools.py +242 -0
  656. xoneai-1.0.1/xoneai/ui/sql_alchemy.py +710 -0
  657. xoneai-1.0.1/xoneai/upload_vision.py +140 -0
  658. xoneai-1.0.1/xoneai/version.py +1 -0
xoneai-1.0.1/PKG-INFO ADDED
@@ -0,0 +1,3548 @@
1
+ Metadata-Version: 2.4
2
+ Name: XoneAI
3
+ Version: 1.0.1
4
+ Summary: XoneAI is an AI Agents Framework with Self Reflection. XoneAI application combines XoneAI Agents, AutoGen, and CrewAI into a low-code solution for building and managing multi-agent LLM systems, focusing on simplicity, customisation, and efficient human-agent collaboration.
5
+ Author: Daniel Do
6
+ License: MIT
7
+ Project-URL: Homepage, https://docs.xone.ai
8
+ Project-URL: Repository, https://github.com/xonevn-ai/XoneAI
9
+ Requires-Python: <3.13,>=3.10
10
+ Description-Content-Type: text/markdown
11
+ Requires-Dist: rich>=13.7
12
+ Requires-Dist: markdown>=3.5
13
+ Requires-Dist: pyparsing>=3.0.0
14
+ Requires-Dist: xoneaiagents>=1.0.1
15
+ Requires-Dist: python-dotenv>=0.19.0
16
+ Requires-Dist: litellm>=1.81.0
17
+ Requires-Dist: PyYAML>=6.0
18
+ Requires-Dist: mcp>=1.20.0
19
+ Requires-Dist: typer>=0.9.0
20
+ Requires-Dist: textual>=0.47.0
21
+ Provides-Extra: ui
22
+ Requires-Dist: chainlit<=2.9.4,>=2.8.5; extra == "ui"
23
+ Requires-Dist: sqlalchemy>=2.0.36; extra == "ui"
24
+ Requires-Dist: aiosqlite>=0.20.0; extra == "ui"
25
+ Requires-Dist: greenlet>=3.0.3; extra == "ui"
26
+ Provides-Extra: gradio
27
+ Requires-Dist: gradio>=4.26.0; extra == "gradio"
28
+ Provides-Extra: api
29
+ Requires-Dist: flask>=3.0.0; extra == "api"
30
+ Requires-Dist: fastapi>=0.115.0; extra == "api"
31
+ Requires-Dist: uvicorn>=0.34.0; extra == "api"
32
+ Requires-Dist: sse-starlette>=1.6.0; extra == "api"
33
+ Provides-Extra: os
34
+ Requires-Dist: fastapi>=0.115.0; extra == "os"
35
+ Requires-Dist: uvicorn>=0.34.0; extra == "os"
36
+ Requires-Dist: PyJWT>=2.8.0; extra == "os"
37
+ Requires-Dist: sse-starlette>=1.6.0; extra == "os"
38
+ Provides-Extra: agentops
39
+ Requires-Dist: agentops>=0.3.12; extra == "agentops"
40
+ Provides-Extra: chat
41
+ Requires-Dist: chainlit<=2.9.4,>=2.8.5; extra == "chat"
42
+ Requires-Dist: aiosqlite>=0.20.0; extra == "chat"
43
+ Requires-Dist: greenlet>=3.0.3; extra == "chat"
44
+ Requires-Dist: tavily-python==0.5.0; extra == "chat"
45
+ Requires-Dist: crawl4ai>=0.7.0; extra == "chat"
46
+ Requires-Dist: sqlalchemy>=2.0.36; extra == "chat"
47
+ Requires-Dist: playwright>=1.47.0; extra == "chat"
48
+ Requires-Dist: rich; extra == "chat"
49
+ Provides-Extra: code
50
+ Requires-Dist: chainlit<=2.9.4,>=2.8.5; extra == "code"
51
+ Requires-Dist: aiosqlite>=0.20.0; extra == "code"
52
+ Requires-Dist: greenlet>=3.0.3; extra == "code"
53
+ Requires-Dist: tavily-python==0.5.0; extra == "code"
54
+ Requires-Dist: crawl4ai>=0.7.0; extra == "code"
55
+ Requires-Dist: sqlalchemy>=2.0.36; extra == "code"
56
+ Requires-Dist: playwright>=1.47.0; extra == "code"
57
+ Provides-Extra: realtime
58
+ Requires-Dist: chainlit<=2.9.4,>=2.8.5; extra == "realtime"
59
+ Requires-Dist: aiosqlite>=0.20.0; extra == "realtime"
60
+ Requires-Dist: greenlet>=3.0.3; extra == "realtime"
61
+ Requires-Dist: tavily-python==0.5.0; extra == "realtime"
62
+ Requires-Dist: crawl4ai>=0.7.0; extra == "realtime"
63
+ Requires-Dist: websockets>=12.0; extra == "realtime"
64
+ Requires-Dist: plotly>=5.24.0; extra == "realtime"
65
+ Requires-Dist: yfinance>=0.2.44; extra == "realtime"
66
+ Requires-Dist: ddgs>=8.0.0; extra == "realtime"
67
+ Requires-Dist: sqlalchemy>=2.0.36; extra == "realtime"
68
+ Provides-Extra: call
69
+ Requires-Dist: twilio>=7.0.0; extra == "call"
70
+ Requires-Dist: fastapi>=0.95.0; extra == "call"
71
+ Requires-Dist: uvicorn>=0.20.0; extra == "call"
72
+ Requires-Dist: websockets>=12.0; extra == "call"
73
+ Requires-Dist: flaml[automl]>=2.3.1; extra == "call"
74
+ Requires-Dist: pyngrok>=1.4.0; extra == "call"
75
+ Requires-Dist: rich; extra == "call"
76
+ Provides-Extra: train
77
+ Provides-Extra: crewai
78
+ Requires-Dist: crewai>=0.157.0; extra == "crewai"
79
+ Requires-Dist: xoneai-tools>=0.1.0; extra == "crewai"
80
+ Provides-Extra: autogen
81
+ Requires-Dist: pyautogen==0.2.29; extra == "autogen"
82
+ Requires-Dist: xoneai-tools>=0.1.0; extra == "autogen"
83
+ Requires-Dist: crewai; extra == "autogen"
84
+ Provides-Extra: autogen-v4
85
+ Requires-Dist: autogen-agentchat>=0.4.0; extra == "autogen-v4"
86
+ Requires-Dist: autogen-ext[openai]>=0.4.0; extra == "autogen-v4"
87
+ Requires-Dist: autogen-core>=0.4.0; extra == "autogen-v4"
88
+ Requires-Dist: xoneai-tools>=0.1.0; extra == "autogen-v4"
89
+ Requires-Dist: crewai; extra == "autogen-v4"
90
+ Provides-Extra: acp
91
+ Requires-Dist: agent-client-protocol>=0.7.0; extra == "acp"
92
+ Provides-Extra: lite
93
+ Provides-Extra: all
94
+ Requires-Dist: chainlit<=2.9.4,>=2.8.5; extra == "all"
95
+ Requires-Dist: sqlalchemy>=2.0.36; extra == "all"
96
+ Requires-Dist: aiosqlite>=0.20.0; extra == "all"
97
+ Requires-Dist: greenlet>=3.0.3; extra == "all"
98
+ Requires-Dist: gradio>=4.26.0; extra == "all"
99
+ Requires-Dist: flask>=3.0.0; extra == "all"
100
+ Requires-Dist: fastapi>=0.115.0; extra == "all"
101
+ Requires-Dist: uvicorn>=0.34.0; extra == "all"
102
+ Requires-Dist: sse-starlette>=1.6.0; extra == "all"
103
+ Requires-Dist: tavily-python==0.5.0; extra == "all"
104
+ Requires-Dist: crawl4ai>=0.7.0; extra == "all"
105
+ Requires-Dist: playwright>=1.47.0; extra == "all"
106
+ Requires-Dist: websockets>=12.0; extra == "all"
107
+ Requires-Dist: plotly>=5.24.0; extra == "all"
108
+ Requires-Dist: yfinance>=0.2.44; extra == "all"
109
+ Requires-Dist: ddgs>=8.0.0; extra == "all"
110
+ Provides-Extra: bot
111
+ Requires-Dist: python-telegram-bot>=20.0; extra == "bot"
112
+ Requires-Dist: discord.py>=2.0.0; extra == "bot"
113
+ Requires-Dist: slack_sdk>=3.0.0; extra == "bot"
114
+ Requires-Dist: slack-bolt>=1.18.0; extra == "bot"
115
+ Requires-Dist: brotlicffi>=1.0.0; extra == "bot"
116
+ Requires-Dist: aiohttp>=3.8.0; extra == "bot"
117
+ Provides-Extra: bot-whatsapp-web
118
+ Requires-Dist: neonize>=0.3.14; extra == "bot-whatsapp-web"
119
+ Requires-Dist: qrcode>=7.0; extra == "bot-whatsapp-web"
120
+ Provides-Extra: dev
121
+ Requires-Dist: textual-dev>=1.0.0; extra == "dev"
122
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
123
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
124
+
125
+ <p align="center">
126
+ <picture>
127
+ <source media="(prefers-color-scheme: dark)" srcset="docs/logo/dark.png" />
128
+ <source media="(prefers-color-scheme: light)" srcset="docs/logo/light.png" />
129
+ <img alt="XoneAI Logo" src="docs/logo/light.png" />
130
+ </picture>
131
+ </p>
132
+
133
+ <!-- mcp-name: io.github.xonevn-ai/xoneai -->
134
+
135
+ <p align="center">
136
+ <a href="https://github.com/xonevn-ai/XoneAI"><img src="https://static.pepy.tech/badge/XoneAI" alt="Total Downloads" /></a>
137
+ <a href="https://github.com/xonevn-ai/XoneAI"><img src="https://img.shields.io/github/v/release/xonevn-ai/XoneAI" alt="Latest Stable Version" /></a>
138
+ <a href="https://github.com/xonevn-ai/XoneAI"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License" /></a>
139
+ <a href="https://registry.modelcontextprotocol.io/servers/io.github.xonevn-ai/xoneai"><img src="https://img.shields.io/badge/MCP-Registry-blue" alt="MCP Registry" /></a>
140
+ </p>
141
+
142
+ <div align="center">
143
+
144
+ # Xone AI
145
+
146
+ <a href="https://trendshift.io/repositories/9130" target="_blank"><img src="https://trendshift.io/api/badge/repositories/9130" alt="xonevn-ai%2FXoneAI | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
147
+
148
+ </div>
149
+
150
+ XoneAI is a production-ready Multi-AI Agents framework with self-reflection, designed to create AI Agents to automate and solve problems ranging from simple tasks to complex challenges. It provides a low-code solution to streamline the building and management of multi-agent LLM systems, emphasising simplicity, customisation, and effective human-agent collaboration.
151
+
152
+ <div align="center">
153
+ <a href="https://docs.xone.ai">
154
+ <p align="center">
155
+ <img src="https://img.shields.io/badge/📚_Documentation-Visit_docs.xone.ai-blue?style=for-the-badge&logo=bookstack&logoColor=white" alt="Documentation" />
156
+ </p>
157
+ </a>
158
+ </div>
159
+
160
+ ---
161
+
162
+ > **Quick Paths:**
163
+ > - 🆕 **New here?** → [Quick Start](#-quick-start) *(1 minute to first agent)*
164
+ > - 📦 **Installing?** → [Installation](#-installation)
165
+ > - 🐍 **Python SDK?** → [Python Examples](#-using-python-code)
166
+ > - 🎯 **CLI user?** → [CLI Quick Reference](#cli-quick-reference)
167
+ > - 🔧 **Need config?** → [Configuration](#-configuration--integration)
168
+ > - 🤝 **Contributing?** → [Development](#-development)
169
+
170
+ ---
171
+
172
+ ## 📑 Table of Contents
173
+
174
+ <details open>
175
+ <summary><strong>Getting Started</strong></summary>
176
+
177
+ - [🚀 Quick Start](#-quick-start)
178
+ - [📦 Installation](#-installation)
179
+ - [⚡ Performance](#-performance)
180
+
181
+ </details>
182
+
183
+ <details>
184
+ <summary><strong>Python SDK</strong></summary>
185
+
186
+ - [📘 Python Examples](#-using-python-code)
187
+ - [1. Single Agent](#1-single-agent) | [2. Multi Agents](#2-multi-agents) | [3. Planning Mode](#3-agent-with-planning-mode)
188
+ - [4. Deep Research](#4-deep-research-agent) | [5. Query Rewriter](#5-query-rewriter-agent) | [6. Agent Memory](#6-agent-memory-zero-dependencies)
189
+ - [7. Rules & Instructions](#7-rules--instructions) | [8. Auto-Generated Memories](#8-auto-generated-memories) | [9. Agentic Workflows](#9-agentic-workflows)
190
+ - [10. Hooks](#10-hooks) | [11. Shadow Git Checkpoints](#11-shadow-git-checkpoints) | [12. Background Tasks](#12-background-tasks)
191
+ - [13. Policy Engine](#13-policy-engine) | [14. Thinking Budgets](#14-thinking-budgets) | [15. Output Styles](#15-output-styles)
192
+ - [16. Context Compaction](#16-context-compaction) | [17. Field Names Reference](#17-field-names-reference-a-i-g-s) | [18. Extended agents.yaml](#18-extended-agentsyaml-with-workflow-patterns)
193
+ - [19. MCP Protocol](#19-mcp-model-context-protocol) | [20. A2A Protocol](#20-a2a-agent2agent-protocol)
194
+ - [🛠️ Custom Tools](#️-custom-tools)
195
+
196
+ </details>
197
+
198
+ <details>
199
+ <summary><strong>JavaScript SDK</strong></summary>
200
+
201
+ - [💻 JavaScript Examples](#-using-javascript-code)
202
+
203
+ </details>
204
+
205
+ <details>
206
+ <summary><strong>CLI Reference</strong></summary>
207
+
208
+ - [🎯 CLI Overview](#-cli--no-code-interface) | [CLI Quick Reference](#cli-quick-reference)
209
+ - [Auto Mode](#auto-mode) | [Interactive Mode](#interactive-mode-cli) | [Deep Research CLI](#deep-research-cli) | [Planning Mode CLI](#planning-mode-cli)
210
+ - [Memory CLI](#memory-cli) | [Workflow CLI](#workflow-cli) | [Knowledge CLI](#knowledge-cli) | [Session CLI](#session-cli)
211
+ - [Tools CLI](#tools-cli) | [MCP Config CLI](#mcp-config-cli) | [External Agents CLI](#external-agents-cli) | [CLI Features Summary](#cli-features)
212
+
213
+ </details>
214
+
215
+ <details>
216
+ <summary><strong>Configuration & Features</strong></summary>
217
+
218
+ - [✨ Key Features](#-key-features) | [🌐 Supported Providers](#-supported-providers)
219
+ - [🔧 Configuration & Integration](#-configuration--integration) | [Ollama](#ollama-integration) | [Groq](#groq-integration) | [100+ Models](#100-models-support)
220
+ - [📋 Agents Playbook](#-agents-playbook)
221
+ - [🔬 Advanced Features](#-advanced-features)
222
+
223
+ </details>
224
+
225
+ <details>
226
+ <summary><strong>Architecture & Patterns</strong></summary>
227
+
228
+ - [📊 Process Types & Patterns](#-process-types--patterns)
229
+ - [Sequential](#sequential-process) | [Hierarchical](#hierarchical-process) | [Workflow](#workflow-process) | [Agentic Patterns](#agentic-patterns)
230
+
231
+ </details>
232
+
233
+ <details>
234
+ <summary><strong>Data & Persistence</strong></summary>
235
+
236
+ - [💾 Persistence (Databases)](#-persistence-databases)
237
+ - [📚 Knowledge & Retrieval (RAG)](#-knowledge--retrieval-rag)
238
+ - [🔧 Tools Table](#-tools-table)
239
+
240
+ </details>
241
+
242
+ <details>
243
+ <summary><strong>Learning & Community</strong></summary>
244
+
245
+ - [🎓 Video Tutorials](#-video-tutorials) | [⭐ Star History](#-star-history)
246
+ - [👥 Contributing](#-contributing) | [🔧 Development](#-development) | [❓ FAQ & Troubleshooting](#-faq--troubleshooting)
247
+
248
+ </details>
249
+
250
+ ---
251
+
252
+ ## ⚡ Performance
253
+
254
+ XoneAI Agents is the **fastest AI agent framework** for agent instantiation.
255
+
256
+ | Framework | Avg Time (μs) | Relative |
257
+ |-----------|---------------|----------|
258
+ | **XoneAI** | **3.77** | **1.00x (fastest)** |
259
+ | OpenAI Agents SDK | 5.26 | 1.39x |
260
+ | Agno | 5.64 | 1.49x |
261
+ | XoneAI (LiteLLM) | 7.56 | 2.00x |
262
+ | PydanticAI | 226.94 | 60.16x |
263
+ | LangGraph | 4,558.71 | 1,209x |
264
+
265
+ <details>
266
+ <summary>Run benchmarks yourself</summary>
267
+
268
+ ```bash
269
+ cd xoneai-agents
270
+ python benchmarks/simple_benchmark.py
271
+ ```
272
+
273
+ </details>
274
+
275
+ ---
276
+
277
+ ## 🚀 Quick Start
278
+
279
+ Get started with XoneAI in under 1 minute:
280
+
281
+ ```bash
282
+ # Install
283
+ pip install xoneaiagents
284
+
285
+ # Set API key
286
+ export OPENAI_API_KEY=your_key_here
287
+
288
+ # Create a simple agent
289
+ python -c "from xoneaiagents import Agent; Agent(instructions='You are a helpful AI assistant').start('Write a haiku about AI')"
290
+ ```
291
+
292
+ > **Next Steps:** [Single Agent Example](#1-single-agent) | [Multi Agents](#2-multi-agents) | [CLI Auto Mode](#auto-mode)
293
+
294
+ ---
295
+
296
+ ## 📦 Installation
297
+
298
+ ### Python SDK
299
+
300
+ Lightweight package dedicated for coding:
301
+
302
+ ```bash
303
+ pip install xoneaiagents
304
+ ```
305
+
306
+ For the full framework with CLI support:
307
+
308
+ ```bash
309
+ pip install xoneai
310
+ ```
311
+
312
+ ### JavaScript SDK
313
+
314
+ ```bash
315
+ npm install xoneai
316
+ ```
317
+
318
+ ### Environment Variables
319
+
320
+ | Variable | Required | Description |
321
+ |----------|----------|-------------|
322
+ | `OPENAI_API_KEY` | Yes* | OpenAI API key |
323
+ | `ANTHROPIC_API_KEY` | No | Anthropic Claude API key |
324
+ | `GOOGLE_API_KEY` | No | Google Gemini API key |
325
+ | `GROQ_API_KEY` | No | Groq API key |
326
+ | `OPENAI_BASE_URL` | No | Custom API endpoint (for Ollama, Groq, etc.) |
327
+
328
+ > *At least one LLM provider API key is required.
329
+
330
+ ```bash
331
+ # Set your API key
332
+ export OPENAI_API_KEY=your_key_here
333
+
334
+ # For Ollama (local models)
335
+ export OPENAI_BASE_URL=http://localhost:11434/v1
336
+
337
+ # For Groq
338
+ export OPENAI_API_KEY=your_groq_key
339
+ export OPENAI_BASE_URL=https://api.groq.com/openai/v1
340
+ ```
341
+
342
+ ---
343
+
344
+ ## ✨ Key Features
345
+
346
+ <details open>
347
+ <summary><strong>🤖 Core Agents</strong></summary>
348
+
349
+ | Feature | Code | Docs |
350
+ |---------|:----:|:----:|
351
+ | Single Agent | [Example](examples/python/agents/single-agent.py) | [📖](https://docs.xone.ai/agents/single) |
352
+ | Multi Agents | [Example](examples/python/general/mini_agents_example.py) | [📖](https://docs.xone.ai/concepts/agents) |
353
+ | Auto Agents | [Example](examples/python/general/auto_agents_example.py) | [📖](https://docs.xone.ai/features/autoagents) |
354
+ | Self Reflection AI Agents | [Example](examples/python/concepts/self-reflection-details.py) | [📖](https://docs.xone.ai/features/selfreflection) |
355
+ | Reasoning AI Agents | [Example](examples/python/concepts/reasoning-extraction.py) | [📖](https://docs.xone.ai/features/reasoning) |
356
+ | Multi Modal AI Agents | [Example](examples/python/general/multimodal.py) | [📖](https://docs.xone.ai/features/multimodal) |
357
+
358
+ </details>
359
+
360
+ <details>
361
+ <summary><strong>🔄 Workflows</strong></summary>
362
+
363
+ | Feature | Code | Docs |
364
+ |---------|:----:|:----:|
365
+ | Simple Workflow | [Example](examples/python/workflows/simple_workflow.py) | [📖](https://docs.xone.ai/features/workflows) |
366
+ | Workflow with Agents | [Example](examples/python/workflows/workflow_with_agents.py) | [📖](https://docs.xone.ai/features/workflows) |
367
+ | Agentic Routing (`route()`) | [Example](examples/python/workflows/workflow_routing.py) | [📖](https://docs.xone.ai/features/routing) |
368
+ | Parallel Execution (`parallel()`) | [Example](examples/python/workflows/workflow_parallel.py) | [📖](https://docs.xone.ai/features/parallelisation) |
369
+ | Loop over List/CSV (`loop()`) | [Example](examples/python/workflows/workflow_loop_csv.py) | [📖](https://docs.xone.ai/features/repetitive) |
370
+ | Evaluator-Optimizer (`repeat()`) | [Example](examples/python/workflows/workflow_repeat.py) | [📖](https://docs.xone.ai/features/evaluator-optimiser) |
371
+ | Conditional Steps | [Example](examples/python/workflows/workflow_conditional.py) | [📖](https://docs.xone.ai/features/workflows) |
372
+ | Workflow Branching | [Example](examples/python/workflows/workflow_branching.py) | [📖](https://docs.xone.ai/features/workflows) |
373
+ | Workflow Early Stop | [Example](examples/python/workflows/workflow_early_stop.py) | [📖](https://docs.xone.ai/features/workflows) |
374
+ | Workflow Checkpoints | [Example](examples/python/workflows/workflow_checkpoints.py) | [📖](https://docs.xone.ai/features/workflows) |
375
+
376
+ </details>
377
+
378
+ <details>
379
+ <summary><strong>💻 Code & Development</strong></summary>
380
+
381
+ | Feature | Code | Docs |
382
+ |---------|:----:|:----:|
383
+ | Code Interpreter Agents | [Example](examples/python/agents/code-agent.py) | [📖](https://docs.xone.ai/features/codeagent) |
384
+ | AI Code Editing Tools | [Example](examples/python/code/code_editing_example.py) | [📖](https://docs.xone.ai/code/editing) |
385
+ | External Agents (All) | [Example](examples/python/code/external_agents_example.py) | [📖](https://docs.xone.ai/code/external-agents) |
386
+ | Claude Code CLI | [Example](examples/python/code/claude_code_example.py) | [📖](https://docs.xone.ai/code/claude-code) |
387
+ | Gemini CLI | [Example](examples/python/code/gemini_cli_example.py) | [📖](https://docs.xone.ai/code/gemini-cli) |
388
+ | Codex CLI | [Example](examples/python/code/codex_cli_example.py) | [📖](https://docs.xone.ai/code/codex-cli) |
389
+ | Cursor CLI | [Example](examples/python/code/cursor_cli_example.py) | [📖](https://docs.xone.ai/code/cursor-cli) |
390
+
391
+ </details>
392
+
393
+ <details>
394
+ <summary><strong>🧠 Memory & Knowledge</strong></summary>
395
+
396
+ | Feature | Code | Docs |
397
+ |---------|:----:|:----:|
398
+ | Memory (Short & Long Term) | [Example](examples/python/general/memory_example.py) | [📖](https://docs.xone.ai/concepts/memory) |
399
+ | File-Based Memory | [Example](examples/python/general/memory_example.py) | [📖](https://docs.xone.ai/concepts/memory) |
400
+ | Claude Memory Tool | [Example](#claude-memory-tool-cli) | [📖](https://docs.xone.ai/features/claude-memory-tool) |
401
+ | Add Custom Knowledge | [Example](examples/python/concepts/knowledge-agents.py) | [📖](https://docs.xone.ai/features/knowledge) |
402
+ | RAG Agents | [Example](examples/python/concepts/rag-agents.py) | [📖](https://docs.xone.ai/features/rag) |
403
+ | Chat with PDF Agents | [Example](examples/python/concepts/chat-with-pdf.py) | [📖](https://docs.xone.ai/features/chat-with-pdf) |
404
+ | Data Readers (PDF, DOCX, etc.) | [CLI](#knowledge-cli) | [📖](https://docs.xone.ai/api/xoneai/knowledge-readers-api) |
405
+ | Vector Store Selection | [CLI](#knowledge-cli) | [📖](https://docs.xone.ai/api/xoneai/knowledge-vector-store-api) |
406
+ | Retrieval Strategies | [CLI](#knowledge-cli) | [📖](https://docs.xone.ai/api/xoneai/knowledge-retrieval-api) |
407
+ | Rerankers | [CLI](#knowledge-cli) | [📖](https://docs.xone.ai/api/xoneai/knowledge-reranker-api) |
408
+ | Index Types (Vector/Keyword/Hybrid) | [CLI](#knowledge-cli) | [📖](https://docs.xone.ai/api/xoneai/knowledge-index-api) |
409
+ | Query Engines (Sub-Question, etc.) | [CLI](#knowledge-cli) | [📖](https://docs.xone.ai/api/xoneai/knowledge-query-engine-api) |
410
+
411
+ </details>
412
+
413
+ <details>
414
+ <summary><strong>🔬 Research & Intelligence</strong></summary>
415
+
416
+ | Feature | Code | Docs |
417
+ |---------|:----:|:----:|
418
+ | Deep Research Agents | [Example](examples/python/agents/research-agent.py) | [📖](https://docs.xone.ai/agents/deep-research) |
419
+ | Query Rewriter Agent | [Example](#5-query-rewriter-agent) | [📖](https://docs.xone.ai/agents/query-rewriter) |
420
+ | Native Web Search | [Example](examples/python/agents/websearch-agent.py) | [📖](https://docs.xone.ai/agents/websearch) |
421
+ | Built-in Search Tools | [Example](examples/python/agents/websearch-agent.py) | [📖](https://docs.xone.ai/tools/tavily) |
422
+ | Unified Web Search | [Example](src/xoneai-agents/examples/web_search_example.py) | [📖](https://docs.xone.ai/tools/web-search) |
423
+ | Web Fetch (Anthropic) | [Example](#web-search-web-fetch--prompt-caching) | [📖](https://docs.xone.ai/features/model-capabilities) |
424
+
425
+ </details>
426
+
427
+ <details>
428
+ <summary><strong>📋 Planning & Execution</strong></summary>
429
+
430
+ | Feature | Code | Docs |
431
+ |---------|:----:|:----:|
432
+ | Planning Mode | [Example](examples/python/agents/planning-agent.py) | [📖](https://docs.xone.ai/features/planning-mode) |
433
+ | Planning Tools | [Example](#3-agent-with-planning-mode) | [📖](https://docs.xone.ai/features/planning-mode) |
434
+ | Planning Reasoning | [Example](#3-agent-with-planning-mode) | [📖](https://docs.xone.ai/features/planning-mode) |
435
+ | Prompt Chaining | [Example](examples/python/general/prompt_chaining.py) | [📖](https://docs.xone.ai/features/promptchaining) |
436
+ | Evaluator Optimiser | [Example](examples/python/general/evaluator-optimiser.py) | [📖](https://docs.xone.ai/features/evaluator-optimiser) |
437
+ | Orchestrator Workers | [Example](examples/python/general/orchestrator-workers.py) | [📖](https://docs.xone.ai/features/orchestrator-worker) |
438
+
439
+ </details>
440
+
441
+ <details>
442
+ <summary><strong>👥 Specialized Agents</strong></summary>
443
+
444
+ | Feature | Code | Docs |
445
+ |---------|:----:|:----:|
446
+ | Data Analyst Agent | [Example](examples/python/agents/data-analyst-agent.py) | [📖](https://docs.xone.ai/agents/data-analyst) |
447
+ | Finance Agent | [Example](examples/python/agents/finance-agent.py) | [📖](https://docs.xone.ai/agents/finance) |
448
+ | Shopping Agent | [Example](examples/python/agents/shopping-agent.py) | [📖](https://docs.xone.ai/agents/shopping) |
449
+ | Recommendation Agent | [Example](examples/python/agents/recommendation-agent.py) | [📖](https://docs.xone.ai/agents/recommendation) |
450
+ | Wikipedia Agent | [Example](examples/python/agents/wikipedia-agent.py) | [📖](https://docs.xone.ai/agents/wikipedia) |
451
+ | Programming Agent | [Example](examples/python/agents/programming-agent.py) | [📖](https://docs.xone.ai/agents/programming) |
452
+ | Math Agents | [Example](examples/python/agents/math-agent.py) | [📖](https://docs.xone.ai/features/mathagent) |
453
+ | Markdown Agent | [Example](examples/python/agents/markdown-agent.py) | [📖](https://docs.xone.ai/agents/markdown) |
454
+ | Prompt Expander Agent | [Example](#prompt-expansion) | [📖](https://docs.xone.ai/agents/prompt-expander) |
455
+
456
+ </details>
457
+
458
+ <details>
459
+ <summary><strong>🎨 Media & Multimodal</strong></summary>
460
+
461
+ | Feature | Code | Docs |
462
+ |---------|:----:|:----:|
463
+ | Image Generation Agent | [Example](examples/python/image/image-agent.py) | [📖](https://docs.xone.ai/features/image-generation) |
464
+ | Image to Text Agent | [Example](examples/python/agents/image-to-text-agent.py) | [📖](https://docs.xone.ai/agents/image-to-text) |
465
+ | Video Agent | [Example](examples/python/agents/video-agent.py) | [📖](https://docs.xone.ai/agents/video) |
466
+ | Camera Integration | [Example](examples/python/camera/) | [📖](https://docs.xone.ai/features/camera-integration) |
467
+
468
+ </details>
469
+
470
+ <details>
471
+ <summary><strong>🔌 Protocols & Integration</strong></summary>
472
+
473
+ | Feature | Code | Docs |
474
+ |---------|:----:|:----:|
475
+ | MCP Transports | [Example](examples/python/mcp/mcp-transports-overview.py) | [📖](https://docs.xone.ai/mcp/transports) |
476
+ | WebSocket MCP | [Example](examples/python/mcp/websocket-mcp.py) | [📖](https://docs.xone.ai/mcp/sse-transport) |
477
+ | MCP Security | [Example](examples/python/mcp/mcp-security.py) | [📖](https://docs.xone.ai/mcp/transports) |
478
+ | MCP Resumability | [Example](examples/python/mcp/mcp-resumability.py) | [📖](https://docs.xone.ai/mcp/sse-transport) |
479
+ | MCP Config Management | [Example](#mcp-config-cli) | [📖](https://docs.xone.ai/docs/cli/mcp) |
480
+ | LangChain Integrated Agents | [Example](examples/python/general/langchain_example.py) | [📖](https://docs.xone.ai/features/langchain) |
481
+
482
+ </details>
483
+
484
+ <details>
485
+ <summary><strong>🛡️ Safety & Control</strong></summary>
486
+
487
+ | Feature | Code | Docs |
488
+ |---------|:----:|:----:|
489
+ | Guardrails | [Example](examples/python/guardrails/comprehensive-guardrails-example.py) | [📖](https://docs.xone.ai/features/guardrails) |
490
+ | Human Approval | [Example](examples/python/general/human_approval_example.py) | [📖](https://docs.xone.ai/features/approval) |
491
+ | Rules & Instructions | [Example](#7-rules--instructions) | [📖](https://docs.xone.ai/features/rules) |
492
+
493
+ </details>
494
+
495
+ <details>
496
+ <summary><strong>⚙️ Advanced Features</strong></summary>
497
+
498
+ | Feature | Code | Docs |
499
+ |---------|:----:|:----:|
500
+ | Async & Parallel Processing | [Example](examples/python/general/async_example.py) | [📖](https://docs.xone.ai/features/async) |
501
+ | Parallelisation | [Example](examples/python/general/parallelisation.py) | [📖](https://docs.xone.ai/features/parallelisation) |
502
+ | Repetitive Agents | [Example](examples/python/concepts/repetitive-agents.py) | [📖](https://docs.xone.ai/features/repetitive) |
503
+ | Agent Handoffs | [Example](examples/python/handoff/handoff_basic.py) | [📖](https://docs.xone.ai/features/handoffs) |
504
+ | Stateful Agents | [Example](examples/python/stateful/workflow-state-example.py) | [📖](https://docs.xone.ai/features/stateful-agents) |
505
+ | Autonomous Workflow | [Example](examples/python/general/autonomous-agent.py) | [📖](https://docs.xone.ai/features/autonomous-workflow) |
506
+ | Structured Output Agents | [Example](examples/python/general/structured_agents_example.py) | [📖](https://docs.xone.ai/features/structured) |
507
+ | Model Router | [Example](examples/python/agents/router-agent-cost-optimization.py) | [📖](https://docs.xone.ai/features/model-router) |
508
+ | Prompt Caching | [Example](#web-search-web-fetch--prompt-caching) | [📖](https://docs.xone.ai/features/model-capabilities) |
509
+ | Fast Context | [Example](examples/context/00_agent_fast_context_basic.py) | [📖](https://docs.xone.ai/features/fast-context) |
510
+
511
+ </details>
512
+
513
+ <details>
514
+ <summary><strong>🛠️ Tools & Configuration</strong></summary>
515
+
516
+ | Feature | Code | Docs |
517
+ |---------|:----:|:----:|
518
+ | 100+ Custom Tools | [Example](examples/python/general/tools_example.py) | [📖](https://docs.xone.ai/tools/tools) |
519
+ | YAML Configuration | [Example](examples/cookbooks/yaml/secondary_market_research_agents.yaml) | [📖](https://docs.xone.ai/developers/agents-playbook) |
520
+ | 100+ LLM Support | [Example](examples/python/providers/openai/openai_gpt4_example.py) | [📖](https://docs.xone.ai/models) |
521
+ | Callback Agents | [Example](examples/python/general/advanced-callback-systems.py) | [📖](https://docs.xone.ai/features/callbacks) |
522
+ | Hooks | [Example](#10-hooks) | [📖](https://docs.xone.ai/features/hooks) |
523
+ | Middleware System | [Example](examples/middleware/basic_middleware.py) | [📖](https://docs.xone.ai/features/middleware) |
524
+ | Configurable Model | [Example](examples/middleware/configurable_model.py) | [📖](https://docs.xone.ai/features/configurable-model) |
525
+ | Rate Limiter | [Example](examples/middleware/rate_limiter.py) | [📖](https://docs.xone.ai/features/rate-limiter) |
526
+ | Injected Tool State | [Example](examples/middleware/injected_state.py) | [📖](https://docs.xone.ai/features/injected-state) |
527
+ | Shadow Git Checkpoints | [Example](#11-shadow-git-checkpoints) | [📖](https://docs.xone.ai/features/checkpoints) |
528
+ | Background Tasks | [Example](examples/background/basic_background.py) | [📖](https://docs.xone.ai/features/background-tasks) |
529
+ | Policy Engine | [Example](examples/policy/basic_policy.py) | [📖](https://docs.xone.ai/features/policy-engine) |
530
+ | Thinking Budgets | [Example](examples/thinking/basic_thinking.py) | [📖](https://docs.xone.ai/features/thinking-budgets) |
531
+ | Output Styles | [Example](examples/output/basic_output.py) | [📖](https://docs.xone.ai/features/output-styles) |
532
+ | Context Compaction | [Example](examples/compaction/basic_compaction.py) | [📖](https://docs.xone.ai/features/context-compaction) |
533
+
534
+ </details>
535
+
536
+ <details>
537
+ <summary><strong>📊 Monitoring & Management</strong></summary>
538
+
539
+ | Feature | Code | Docs |
540
+ |---------|:----:|:----:|
541
+ | Sessions Management | [Example](examples/python/sessions/comprehensive-session-management.py) | [📖](https://docs.xone.ai/features/sessions) |
542
+ | Auto-Save Sessions | [Example](#session-management-python) | [📖](https://docs.xone.ai/docs/cli/session) |
543
+ | History in Context | [Example](#session-management-python) | [📖](https://docs.xone.ai/docs/cli/session) |
544
+ | Telemetry | [Example](examples/python/telemetry/production-telemetry-example.py) | [📖](https://docs.xone.ai/features/telemetry) |
545
+ | Project Docs (.xone/docs/) | [Example](#docs-cli) | [📖](https://docs.xone.ai/docs/cli/docs) |
546
+ | AI Commit Messages | [Example](#ai-commit-cli) | [📖](https://docs.xone.ai/docs/cli/commit) |
547
+ | @Mentions in Prompts | [Example](#mentions-in-prompts) | [📖](https://docs.xone.ai/docs/cli/mentions) |
548
+
549
+ </details>
550
+
551
+ <details>
552
+ <summary><strong>🖥️ CLI Features</strong></summary>
553
+
554
+ | Feature | Code | Docs |
555
+ |---------|:----:|:----:|
556
+ | Slash Commands | [Example](examples/python/cli/slash_commands_example.py) | [📖](https://docs.xone.ai/docs/cli/slash-commands) |
557
+ | Autonomy Modes | [Example](examples/python/cli/autonomy_modes_example.py) | [📖](https://docs.xone.ai/docs/cli/autonomy-modes) |
558
+ | Cost Tracking | [Example](examples/python/cli/cost_tracking_example.py) | [📖](https://docs.xone.ai/docs/cli/cost-tracking) |
559
+ | Repository Map | [Example](examples/python/cli/repo_map_example.py) | [📖](https://docs.xone.ai/docs/cli/repo-map) |
560
+ | Interactive TUI | [Example](examples/python/cli/interactive_tui_example.py) | [📖](https://docs.xone.ai/docs/cli/interactive-tui) |
561
+ | Git Integration | [Example](examples/python/cli/git_integration_example.py) | [📖](https://docs.xone.ai/docs/cli/git-integration) |
562
+ | Sandbox Execution | [Example](examples/python/cli/sandbox_execution_example.py) | [📖](https://docs.xone.ai/docs/cli/sandbox-execution) |
563
+ | CLI Compare | [Example](examples/compare/cli_compare_basic.py) | [📖](https://docs.xone.ai/docs/cli/compare) |
564
+ | Profile/Benchmark | [Example](#profile-benchmark) | [📖](https://docs.xone.ai/docs/cli/profile) |
565
+ | Auto Mode | [Example](#auto-mode) | [📖](https://docs.xone.ai/docs/cli/auto) |
566
+ | Init | [Example](#init) | [📖](https://docs.xone.ai/docs/cli/init) |
567
+ | File Input | [Example](#file-input) | [📖](https://docs.xone.ai/docs/cli/file-input) |
568
+ | Final Agent | [Example](#final-agent) | [📖](https://docs.xone.ai/docs/cli/final-agent) |
569
+ | Max Tokens | [Example](#max-tokens) | [📖](https://docs.xone.ai/docs/cli/max-tokens) |
570
+
571
+ </details>
572
+
573
+ <details>
574
+ <summary><strong>🧪 Evaluation</strong></summary>
575
+
576
+ | Feature | Code | Docs |
577
+ |---------|:----:|:----:|
578
+ | Accuracy Evaluation | [Example](examples/eval/accuracy_example.py) | [📖](https://docs.xone.ai/docs/cli/eval) |
579
+ | Performance Evaluation | [Example](examples/eval/performance_example.py) | [📖](https://docs.xone.ai/docs/cli/eval) |
580
+ | Reliability Evaluation | [Example](examples/eval/reliability_example.py) | [📖](https://docs.xone.ai/docs/cli/eval) |
581
+ | Criteria Evaluation | [Example](examples/eval/criteria_example.py) | [📖](https://docs.xone.ai/docs/cli/eval) |
582
+
583
+ </details>
584
+
585
+ <details>
586
+ <summary><strong>🎯 Agent Skills</strong></summary>
587
+
588
+ | Feature | Code | Docs |
589
+ |---------|:----:|:----:|
590
+ | Skills Management | [Example](examples/skills/basic_skill_usage.py) | [📖](https://docs.xone.ai/features/skills) |
591
+ | Custom Skills | [Example](examples/skills/custom_skill_example.py) | [📖](https://docs.xone.ai/features/skills) |
592
+
593
+ </details>
594
+
595
+ <details>
596
+ <summary><strong>⏰ 24/7 Scheduling</strong></summary>
597
+
598
+ | Feature | Code | Docs |
599
+ |---------|:----:|:----:|
600
+ | Agent Scheduler | [Example](examples/python/scheduled_agents/news_checker_live.py) | [📖](https://docs.xone.ai/docs/cli/scheduler) |
601
+
602
+ </details>
603
+
604
+ ---
605
+
606
+ ## 🌐 Supported Providers
607
+
608
+ XoneAI supports 100+ LLM providers through seamless integration:
609
+
610
+ <details>
611
+ <summary><strong>View all 24 providers</strong></summary>
612
+
613
+ | Provider | Example |
614
+ |----------|:-------:|
615
+ | OpenAI | [Example](examples/python/providers/openai/openai_gpt4_example.py) |
616
+ | Anthropic | [Example](examples/python/providers/anthropic/anthropic_claude_example.py) |
617
+ | Google Gemini | [Example](examples/python/providers/google/google_gemini_example.py) |
618
+ | Ollama | [Example](examples/python/providers/ollama/ollama-agents.py) |
619
+ | Groq | [Example](examples/python/providers/groq/kimi_with_groq_example.py) |
620
+ | DeepSeek | [Example](examples/python/providers/deepseek/deepseek_example.py) |
621
+ | xAI Grok | [Example](examples/python/providers/xai/xai_grok_example.py) |
622
+ | Mistral | [Example](examples/python/providers/mistral/mistral_example.py) |
623
+ | Cohere | [Example](examples/python/providers/cohere/cohere_example.py) |
624
+ | Perplexity | [Example](examples/python/providers/perplexity/perplexity_example.py) |
625
+ | Fireworks | [Example](examples/python/providers/fireworks/fireworks_example.py) |
626
+ | Together AI | [Example](examples/python/providers/together/together_ai_example.py) |
627
+ | OpenRouter | [Example](examples/python/providers/openrouter/openrouter_example.py) |
628
+ | HuggingFace | [Example](examples/python/providers/huggingface/huggingface_example.py) |
629
+ | Azure OpenAI | [Example](examples/python/providers/azure/azure_openai_example.py) |
630
+ | AWS Bedrock | [Example](examples/python/providers/aws/aws_bedrock_example.py) |
631
+ | Google Vertex | [Example](examples/python/providers/vertex/vertex_example.py) |
632
+ | Databricks | [Example](examples/python/providers/databricks/databricks_example.py) |
633
+ | Cloudflare | [Example](examples/python/providers/cloudflare/cloudflare_example.py) |
634
+ | AI21 | [Example](examples/python/providers/ai21/ai21_example.py) |
635
+ | Replicate | [Example](examples/python/providers/replicate/replicate_example.py) |
636
+ | SageMaker | [Example](examples/python/providers/sagemaker/sagemaker_example.py) |
637
+ | Moonshot | [Example](examples/python/providers/moonshot/moonshot_example.py) |
638
+ | vLLM | [Example](examples/python/providers/vllm/vllm_example.py) |
639
+
640
+ </details>
641
+
642
+ ---
643
+
644
+ ## 📘 Using Python Code
645
+
646
+ ### 1. Single Agent
647
+
648
+ Create app.py file and add the code below:
649
+ ```python
650
+ from xoneaiagents import Agent
651
+ agent = Agent(instructions="Your are a helpful AI assistant")
652
+ agent.start("Write a movie script about a robot in Mars")
653
+ ```
654
+
655
+ Run:
656
+ ```bash
657
+ python app.py
658
+ ```
659
+
660
+ ### 2. Multi Agents
661
+
662
+ Create app.py file and add the code below:
663
+ ```python
664
+ from xoneaiagents import Agent, Agents
665
+
666
+ research_agent = Agent(instructions="Research about AI")
667
+ summarise_agent = Agent(instructions="Summarise research agent's findings")
668
+ agents = Agents(agents=[research_agent, summarise_agent])
669
+ agents.start()
670
+ ```
671
+
672
+ Run:
673
+ ```bash
674
+ python app.py
675
+ ```
676
+
677
+ ### 3. Agent with Planning Mode
678
+
679
+ Enable planning for any agent - the agent creates a plan, then executes step by step:
680
+
681
+ ```python
682
+ from xoneaiagents import Agent
683
+
684
+ def search_web(query: str) -> str:
685
+ return f"Search results for: {query}"
686
+
687
+ agent = Agent(
688
+ name="AI Assistant",
689
+ instructions="Research and write about topics",
690
+ planning=True, # Enable planning mode
691
+ planning_tools=[search_web], # Tools for planning research
692
+ planning_reasoning=True # Chain-of-thought reasoning
693
+ )
694
+
695
+ result = agent.start("Research AI trends in 2025 and write a summary")
696
+ ```
697
+
698
+ **What happens:**
699
+ 1. 📋 Agent creates a multi-step plan
700
+ 2. 🚀 Executes each step sequentially
701
+ 3. 📊 Shows progress with context passing
702
+ 4. ✅ Returns final result
703
+
704
+ ### 4. Deep Research Agent
705
+
706
+ Automated research with real-time streaming, web search, and citations using OpenAI or Gemini Deep Research APIs.
707
+
708
+ ```python
709
+ from xoneaiagents import DeepResearchAgent
710
+
711
+ # OpenAI Deep Research
712
+ agent = DeepResearchAgent(
713
+ model="o4-mini-deep-research", # or "o3-deep-research"
714
+ verbose=True
715
+ )
716
+
717
+ result = agent.research("What are the latest AI trends in 2025?")
718
+ print(result.report)
719
+ print(f"Citations: {len(result.citations)}")
720
+ ```
721
+
722
+ ```python
723
+ # Gemini Deep Research
724
+ from xoneaiagents import DeepResearchAgent
725
+
726
+ agent = DeepResearchAgent(
727
+ model="deep-research-pro", # Auto-detected as Gemini
728
+ verbose=True
729
+ )
730
+
731
+ result = agent.research("Research quantum computing advances")
732
+ print(result.report)
733
+ ```
734
+
735
+ **Features:**
736
+ - 🔍 Multi-provider support (OpenAI, Gemini, LiteLLM)
737
+ - 📡 Real-time streaming with reasoning summaries
738
+ - 📚 Structured citations with URLs
739
+ - 🛠️ Built-in tools: web search, code interpreter, MCP, file search
740
+ - 🔄 Automatic provider detection from model name
741
+
742
+ ### 5. Query Rewriter Agent
743
+
744
+ Transform user queries to improve RAG retrieval quality using multiple strategies.
745
+
746
+ ```python
747
+ from xoneaiagents import QueryRewriterAgent, RewriteStrategy
748
+
749
+ agent = QueryRewriterAgent(model="gpt-4o-mini")
750
+
751
+ # Basic - expands abbreviations, adds context
752
+ result = agent.rewrite("AI trends")
753
+ print(result.primary_query) # "What are the current trends in Artificial Intelligence?"
754
+
755
+ # HyDE - generates hypothetical document for semantic matching
756
+ result = agent.rewrite("What is quantum computing?", strategy=RewriteStrategy.HYDE)
757
+
758
+ # Step-back - generates broader context question
759
+ result = agent.rewrite("GPT-4 vs Claude 3?", strategy=RewriteStrategy.STEP_BACK)
760
+
761
+ # Sub-queries - decomposes complex questions
762
+ result = agent.rewrite("RAG setup and best embedding models?", strategy=RewriteStrategy.SUB_QUERIES)
763
+
764
+ # Contextual - resolves references using chat history
765
+ result = agent.rewrite("What about cost?", chat_history=[...])
766
+ ```
767
+
768
+ **Strategies:**
769
+ - **BASIC**: Expand abbreviations, fix typos, add context
770
+ - **HYDE**: Generate hypothetical document for semantic matching
771
+ - **STEP_BACK**: Generate higher-level concept questions
772
+ - **SUB_QUERIES**: Decompose multi-part questions
773
+ - **MULTI_QUERY**: Generate multiple paraphrased versions
774
+ - **CONTEXTUAL**: Resolve references using conversation history
775
+ - **AUTO**: Automatically detect best strategy
776
+
777
+ ### 6. Agent Memory (Zero Dependencies)
778
+
779
+ Enable persistent memory for agents - works out of the box without any extra packages.
780
+
781
+ ```python
782
+ from xoneaiagents import Agent
783
+ from xoneaiagents.memory import FileMemory
784
+
785
+ # Enable memory with a single parameter
786
+ agent = Agent(
787
+ name="Personal Assistant",
788
+ instructions="You are a helpful assistant that remembers user preferences.",
789
+ memory=True, # Enables file-based memory (no extra deps!)
790
+ user_id="user123" # Isolate memory per user
791
+ )
792
+
793
+ # Memory is automatically injected into conversations
794
+ result = agent.start("My name is John and I prefer Python")
795
+ # Agent will remember this for future conversations
796
+ ```
797
+
798
+ **Memory Types:**
799
+ - **Short-term**: Rolling buffer of recent context (auto-expires)
800
+ - **Long-term**: Persistent important facts (sorted by importance)
801
+ - **Entity**: People, places, organizations with attributes
802
+ - **Episodic**: Date-based interaction history
803
+
804
+ **Advanced Features:**
805
+ ```python
806
+ from xoneaiagents.memory import FileMemory
807
+
808
+ memory = FileMemory(user_id="user123")
809
+
810
+ # Session Save/Resume
811
+ memory.save_session("project_session", conversation_history=[...])
812
+ memory.resume_session("project_session")
813
+
814
+ # Context Compression
815
+ memory.compress(llm_func=lambda p: agent.chat(p), max_items=10)
816
+
817
+ # Checkpointing
818
+ memory.create_checkpoint("before_refactor", include_files=["main.py"])
819
+ memory.restore_checkpoint("before_refactor", restore_files=True)
820
+
821
+ # Slash Commands
822
+ memory.handle_command("/memory show")
823
+ memory.handle_command("/memory save my_session")
824
+ ```
825
+
826
+ **Storage Options:**
827
+ | Option | Dependencies | Description |
828
+ |--------|-------------|-------------|
829
+ | `memory=True` | None | File-based JSON storage (default) |
830
+ | `memory="file"` | None | Explicit file-based storage |
831
+ | `memory="sqlite"` | Built-in | SQLite with indexing |
832
+ | `memory="chromadb"` | chromadb | Vector/semantic search |
833
+
834
+ ### 7. Rules & Instructions
835
+
836
+ XoneAI auto-discovers instruction files from your project root and git root:
837
+
838
+ | File | Description | Priority |
839
+ |------|-------------|----------|
840
+ | `XONE.md` | XoneAI native instructions | High |
841
+ | `XONE.local.md` | Local overrides (gitignored) | Higher |
842
+ | `CLAUDE.md` | Claude Code memory file | High |
843
+ | `CLAUDE.local.md` | Local overrides (gitignored) | Higher |
844
+ | `AGENTS.md` | OpenAI Codex CLI instructions | High |
845
+ | `GEMINI.md` | Gemini CLI memory file | High |
846
+ | `.cursorrules` | Cursor IDE rules | High |
847
+ | `.windsurfrules` | Windsurf IDE rules | High |
848
+ | `.claude/rules/*.md` | Claude Code modular rules | Medium |
849
+ | `.windsurf/rules/*.md` | Windsurf modular rules | Medium |
850
+ | `.cursor/rules/*.mdc` | Cursor modular rules | Medium |
851
+ | `.xone/rules/*.md` | Workspace rules | Medium |
852
+ | `~/.xone/rules/*.md` | Global rules | Low |
853
+
854
+ ```python
855
+ from xoneaiagents import Agent
856
+
857
+ # Agent auto-discovers CLAUDE.md, AGENTS.md, GEMINI.md, etc.
858
+ agent = Agent(name="Assistant", instructions="You are helpful.")
859
+ # Rules are injected into system prompt automatically
860
+ ```
861
+
862
+ **@Import Syntax:**
863
+ ```markdown
864
+ # CLAUDE.md
865
+ See @README for project overview
866
+ See @docs/architecture.md for system design
867
+ @~/.xone/my-preferences.md
868
+ ```
869
+
870
+ **Rule File Format (with YAML frontmatter):**
871
+ ```markdown
872
+ ---
873
+ description: Python coding guidelines
874
+ globs: ["**/*.py"]
875
+ activation: always # always, glob, manual, ai_decision
876
+ ---
877
+
878
+ # Guidelines
879
+ - Use type hints
880
+ - Follow PEP 8
881
+ ```
882
+
883
+ ### 8. Auto-Generated Memories
884
+
885
+ ```python
886
+ from xoneaiagents.memory import FileMemory, AutoMemory
887
+
888
+ memory = FileMemory(user_id="user123")
889
+ auto = AutoMemory(memory, enabled=True)
890
+
891
+ # Automatically extracts and stores memories from conversations
892
+ memories = auto.process_interaction(
893
+ "My name is John and I prefer Python for backend work"
894
+ )
895
+ # Extracts: name="John", preference="Python for backend"
896
+ ```
897
+
898
+ ### 9. Agentic Workflows
899
+
900
+ Create powerful multi-agent workflows with the `Workflow` class:
901
+
902
+ ```python
903
+ from xoneaiagents import Agent, Workflow
904
+
905
+ # Create agents
906
+ researcher = Agent(
907
+ name="Researcher",
908
+ role="Research Analyst",
909
+ goal="Research topics thoroughly",
910
+ instructions="Provide concise, factual information."
911
+ )
912
+
913
+ writer = Agent(
914
+ name="Writer",
915
+ role="Content Writer",
916
+ goal="Write engaging content",
917
+ instructions="Write clear, engaging content based on research."
918
+ )
919
+
920
+ # Create workflow with agents as steps
921
+ workflow = Workflow(steps=[researcher, writer])
922
+
923
+ # Run workflow - agents process sequentially
924
+ result = workflow.start("What are the benefits of AI agents?")
925
+ print(result["output"])
926
+ ```
927
+
928
+ **Key Features:**
929
+ - **Agent-first** - Pass `Agent` objects directly as workflow steps
930
+ - **Pattern helpers** - Use `route()`, `parallel()`, `loop()`, `repeat()`
931
+ - **Planning mode** - Enable with `planning=True`
932
+ - **Callbacks** - Monitor with `on_step_complete`, `on_workflow_complete`
933
+ - **Async execution** - Use `workflow.astart()` for async
934
+
935
+ ### Workflow Patterns (route, parallel, loop, repeat)
936
+
937
+ ```python
938
+ from xoneaiagents import Agent, Workflow
939
+ from xoneaiagents.workflows import route, parallel, loop, repeat
940
+
941
+ # 1. ROUTING - Classifier agent routes to specialized agents
942
+ classifier = Agent(name="Classifier", instructions="Respond with 'technical' or 'creative'")
943
+ tech_agent = Agent(name="TechExpert", role="Technical Expert")
944
+ creative_agent = Agent(name="Creative", role="Creative Writer")
945
+
946
+ workflow = Workflow(steps=[
947
+ classifier,
948
+ route({
949
+ "technical": [tech_agent],
950
+ "creative": [creative_agent]
951
+ })
952
+ ])
953
+
954
+ # 2. PARALLEL - Multiple agents work concurrently
955
+ market_agent = Agent(name="Market", role="Market Researcher")
956
+ competitor_agent = Agent(name="Competitor", role="Competitor Analyst")
957
+ aggregator = Agent(name="Aggregator", role="Synthesizer")
958
+
959
+ workflow = Workflow(steps=[
960
+ parallel([market_agent, competitor_agent]),
961
+ aggregator
962
+ ])
963
+
964
+ # 3. LOOP - Agent processes each item
965
+ processor = Agent(name="Processor", role="Item Processor")
966
+ summarizer = Agent(name="Summarizer", role="Summarizer")
967
+
968
+ workflow = Workflow(
969
+ steps=[loop(processor, over="items"), summarizer],
970
+ variables={"items": ["AI", "ML", "NLP"]}
971
+ )
972
+
973
+ # 4. REPEAT - Evaluator-Optimizer pattern
974
+ generator = Agent(name="Generator", role="Content Generator")
975
+ evaluator = Agent(name="Evaluator", instructions="Say 'APPROVED' if good")
976
+
977
+ workflow = Workflow(steps=[
978
+ generator,
979
+ repeat(evaluator, until=lambda ctx: "approved" in ctx.previous_result.lower(), max_iterations=3)
980
+ ])
981
+
982
+ # 5. CALLBACKS
983
+ workflow = Workflow(
984
+ steps=[researcher, writer],
985
+ on_step_complete=lambda name, r: print(f"✅ {name} done")
986
+ )
987
+
988
+ # 6. WITH PLANNING & REASONING
989
+ workflow = Workflow(
990
+ steps=[researcher, writer],
991
+ planning=True,
992
+ reasoning=True
993
+ )
994
+
995
+ # 7. ASYNC EXECUTION
996
+ result = asyncio.run(workflow.astart("input"))
997
+
998
+ # 8. STATUS TRACKING
999
+ workflow.status # "not_started" | "running" | "completed"
1000
+ workflow.step_statuses # {"step1": "completed", "step2": "skipped"}
1001
+ ```
1002
+
1003
+ ### YAML Workflow Template
1004
+
1005
+ ```yaml
1006
+ # .xone/workflows/research.yaml
1007
+ name: Research Workflow
1008
+ description: Research and write content with all patterns
1009
+
1010
+ agents:
1011
+ researcher:
1012
+ role: Research Expert
1013
+ goal: Find accurate information
1014
+ tools: [tavily_search, web_scraper]
1015
+ writer:
1016
+ role: Content Writer
1017
+ goal: Write engaging content
1018
+ editor:
1019
+ role: Editor
1020
+ goal: Polish content
1021
+
1022
+ steps:
1023
+ # Sequential
1024
+ - agent: researcher
1025
+ action: Research {{topic}}
1026
+ output_variable: research_data
1027
+
1028
+ # Routing
1029
+ - name: classifier
1030
+ action: Classify content type
1031
+ route:
1032
+ technical: [tech_handler]
1033
+ creative: [creative_handler]
1034
+ default: [general_handler]
1035
+
1036
+ # Parallel
1037
+ - name: parallel_research
1038
+ parallel:
1039
+ - agent: researcher
1040
+ action: Research market
1041
+ - agent: researcher
1042
+ action: Research competitors
1043
+
1044
+ # Loop
1045
+ - agent: writer
1046
+ action: Write about {{item}}
1047
+ loop_over: topics
1048
+ loop_var: item
1049
+
1050
+ # Repeat (evaluator-optimizer)
1051
+ - agent: editor
1052
+ action: Review and improve
1053
+ repeat:
1054
+ until: "quality > 8"
1055
+ max_iterations: 3
1056
+
1057
+ # Output to file
1058
+ - agent: writer
1059
+ action: Write final report
1060
+ output_file: output/{{topic}}_report.md
1061
+
1062
+ variables:
1063
+ topic: AI trends
1064
+ topics: [ML, NLP, Vision]
1065
+
1066
+ workflow:
1067
+ planning: true
1068
+ planning_llm: gpt-4o
1069
+ memory_config:
1070
+ provider: chroma
1071
+ persist: true
1072
+ ```
1073
+
1074
+ ### Loading YAML Workflows
1075
+
1076
+ ```python
1077
+ from xoneaiagents.workflows import YAMLWorkflowParser, WorkflowManager
1078
+
1079
+ # Option 1: Parse YAML string
1080
+ parser = YAMLWorkflowParser()
1081
+ workflow = parser.parse_string(yaml_content)
1082
+ result = workflow.start("Research AI trends")
1083
+
1084
+ # Option 2: Load from file with WorkflowManager
1085
+ manager = WorkflowManager()
1086
+ workflow = manager.load_yaml("research_workflow.yaml")
1087
+ result = workflow.start("Research AI trends")
1088
+
1089
+ # Option 3: Execute YAML directly
1090
+ result = manager.execute_yaml(
1091
+ "research_workflow.yaml",
1092
+ input_data="Research AI trends",
1093
+ variables={"topic": "Machine Learning"}
1094
+ )
1095
+ ```
1096
+
1097
+ ### Complete workflow.yaml Reference
1098
+
1099
+ ```yaml
1100
+ # workflow.yaml - Full feature reference
1101
+ name: Complete Workflow
1102
+ description: Demonstrates all workflow.yaml features
1103
+ framework: xoneai # xoneai, crewai, autogen
1104
+ process: workflow # sequential, hierarchical, workflow
1105
+
1106
+ workflow:
1107
+ planning: true
1108
+ planning_llm: gpt-4o
1109
+ reasoning: true
1110
+ verbose: true
1111
+ memory_config:
1112
+ provider: chroma
1113
+ persist: true
1114
+
1115
+ variables:
1116
+ topic: AI trends
1117
+ items: [ML, NLP, Vision]
1118
+
1119
+ agents:
1120
+ researcher:
1121
+ name: Researcher
1122
+ role: Research Analyst
1123
+ goal: Research topics thoroughly
1124
+ instructions: "Provide detailed research findings"
1125
+ backstory: "Expert researcher with 10 years experience" # alias for instructions
1126
+ llm: gpt-4o-mini
1127
+ function_calling_llm: gpt-4o # For tool calls
1128
+ max_rpm: 10 # Rate limiting
1129
+ max_execution_time: 300 # Timeout in seconds
1130
+ reflect_llm: gpt-4o # For self-reflection
1131
+ min_reflect: 1
1132
+ max_reflect: 3
1133
+ system_template: "You are a helpful assistant"
1134
+ tools:
1135
+ - tavily_search
1136
+
1137
+ writer:
1138
+ name: Writer
1139
+ role: Content Writer
1140
+ goal: Write clear content
1141
+ instructions: "Write engaging content"
1142
+
1143
+ steps:
1144
+ - name: research_step
1145
+ agent: researcher
1146
+ action: "Research {{topic}}"
1147
+ expected_output: "Comprehensive research report"
1148
+ output_file: "output/research.md"
1149
+ create_directory: true
1150
+
1151
+ - name: writing_step
1152
+ agent: writer
1153
+ action: "Write article based on research"
1154
+ context: # Task dependencies
1155
+ - research_step
1156
+ output_json: # Structured output
1157
+ type: object
1158
+ properties:
1159
+ title: { type: string }
1160
+ content: { type: string }
1161
+
1162
+ callbacks:
1163
+ on_workflow_start: log_start
1164
+ on_step_complete: log_step
1165
+ on_workflow_complete: log_complete
1166
+ ```
1167
+
1168
+ ### 10. Hooks
1169
+
1170
+ Intercept and modify agent behavior at various lifecycle points:
1171
+
1172
+ ```python
1173
+ from xoneaiagents.hooks import (
1174
+ HookRegistry, HookRunner, HookEvent, HookResult,
1175
+ BeforeToolInput
1176
+ )
1177
+
1178
+ # Create a hook registry
1179
+ registry = HookRegistry()
1180
+
1181
+ # Log all tool calls
1182
+ @registry.on(HookEvent.BEFORE_TOOL)
1183
+ def log_tools(event_data: BeforeToolInput) -> HookResult:
1184
+ print(f"Tool: {event_data.tool_name}")
1185
+ return HookResult.allow()
1186
+
1187
+ # Block dangerous operations
1188
+ @registry.on(HookEvent.BEFORE_TOOL)
1189
+ def security_check(event_data: BeforeToolInput) -> HookResult:
1190
+ if "delete" in event_data.tool_name.lower():
1191
+ return HookResult.deny("Delete operations blocked")
1192
+ return HookResult.allow()
1193
+
1194
+ # Execute hooks
1195
+ runner = HookRunner(registry)
1196
+ ```
1197
+
1198
+ **CLI Commands:**
1199
+ ```bash
1200
+ xoneai hooks list # List registered hooks
1201
+ xoneai hooks test before_tool # Test hooks for an event
1202
+ xoneai hooks run "echo test" # Run a command hook
1203
+ xoneai hooks validate hooks.json # Validate configuration
1204
+ ```
1205
+
1206
+
1207
+ ### 11. Shadow Git Checkpoints
1208
+
1209
+ File-level undo/restore using shadow git:
1210
+
1211
+ ```python
1212
+ from xoneaiagents.checkpoints import CheckpointService
1213
+
1214
+ service = CheckpointService(workspace_dir="./my_project")
1215
+ await service.initialize()
1216
+
1217
+ # Save checkpoint before changes
1218
+ result = await service.save("Before refactoring")
1219
+
1220
+ # Make changes...
1221
+
1222
+ # Restore if needed
1223
+ await service.restore(result.checkpoint.id)
1224
+
1225
+ # View diff
1226
+ diff = await service.diff()
1227
+ ```
1228
+
1229
+ **CLI Commands:**
1230
+ ```bash
1231
+ xoneai checkpoint save "Before changes" # Save checkpoint
1232
+ xoneai checkpoint list # List checkpoints
1233
+ xoneai checkpoint diff # Show changes
1234
+ xoneai checkpoint restore abc123 # Restore to checkpoint
1235
+ ```
1236
+
1237
+ **Links:**
1238
+ - [📖 Coding Docs](https://docs.xone.ai/features/checkpoints)
1239
+ - [📖 CLI Docs](https://docs.xone.ai/docs/cli/checkpoint)
1240
+ - [💻 Example](examples/checkpoints/basic_checkpoints.py)
1241
+
1242
+ ---
1243
+
1244
+ ### 12. Background Tasks
1245
+
1246
+ Run agent tasks asynchronously without blocking:
1247
+
1248
+ ```python
1249
+ import asyncio
1250
+ from xoneaiagents.background import BackgroundRunner, BackgroundConfig
1251
+
1252
+ async def main():
1253
+ config = BackgroundConfig(max_concurrent_tasks=3)
1254
+ runner = BackgroundRunner(config=config)
1255
+
1256
+ async def my_task(name: str) -> str:
1257
+ await asyncio.sleep(2)
1258
+ return f"Task {name} completed"
1259
+
1260
+ task = await runner.submit(my_task, args=("example",), name="my_task")
1261
+ await task.wait(timeout=10.0)
1262
+ print(task.result)
1263
+
1264
+ asyncio.run(main())
1265
+ ```
1266
+
1267
+ **CLI Commands:**
1268
+ ```bash
1269
+ xoneai background list # List running tasks
1270
+ xoneai background status <id> # Check task status
1271
+ xoneai background cancel <id> # Cancel a task
1272
+ xoneai background clear # Clear completed tasks
1273
+ ```
1274
+
1275
+ **Links:**
1276
+ - [📖 Coding Docs](https://docs.xone.ai/features/background-tasks)
1277
+ - [📖 CLI Docs](https://docs.xone.ai/docs/cli/background)
1278
+ - [💻 Example](examples/background/basic_background.py)
1279
+
1280
+ ---
1281
+
1282
+ ### 13. Policy Engine
1283
+
1284
+ Control what agents can and cannot do with policy-based execution:
1285
+
1286
+ ```python
1287
+ from xoneaiagents.policy import (
1288
+ PolicyEngine, Policy, PolicyRule, PolicyAction
1289
+ )
1290
+
1291
+ engine = PolicyEngine()
1292
+
1293
+ policy = Policy(
1294
+ name="no_delete",
1295
+ rules=[
1296
+ PolicyRule(
1297
+ action=PolicyAction.DENY,
1298
+ resource="tool:delete_*",
1299
+ reason="Delete operations blocked"
1300
+ )
1301
+ ]
1302
+ )
1303
+ engine.add_policy(policy)
1304
+
1305
+ result = engine.check("tool:delete_file", {})
1306
+ print(f"Allowed: {result.allowed}")
1307
+ ```
1308
+
1309
+ **CLI Commands:**
1310
+ ```bash
1311
+ xoneai policy list # List policies
1312
+ xoneai policy check "tool:name" # Check if allowed
1313
+ xoneai policy init # Create template
1314
+ ```
1315
+
1316
+ **Links:**
1317
+ - [📖 Coding Docs](https://docs.xone.ai/features/policy-engine)
1318
+ - [📖 CLI Docs](https://docs.xone.ai/docs/cli/policy)
1319
+ - [💻 Example](examples/policy/basic_policy.py)
1320
+
1321
+ ---
1322
+
1323
+ ### 14. Thinking Budgets
1324
+
1325
+ Configure token budgets for extended thinking:
1326
+
1327
+ ```python
1328
+ from xoneaiagents.thinking import ThinkingBudget, ThinkingTracker
1329
+
1330
+ # Use predefined levels
1331
+ budget = ThinkingBudget.high() # 16,000 tokens
1332
+
1333
+ # Track usage
1334
+ tracker = ThinkingTracker()
1335
+ session = tracker.start_session(budget_tokens=16000)
1336
+ tracker.end_session(session, tokens_used=12000)
1337
+
1338
+ summary = tracker.get_summary()
1339
+ print(f"Utilization: {summary['average_utilization']:.1%}")
1340
+ ```
1341
+
1342
+ **CLI Commands:**
1343
+ ```bash
1344
+ xoneai thinking status # Show current budget
1345
+ xoneai thinking set high # Set budget level
1346
+ xoneai thinking stats # Show usage statistics
1347
+ ```
1348
+
1349
+ **Links:**
1350
+ - [📖 Coding Docs](https://docs.xone.ai/features/thinking-budgets)
1351
+ - [📖 CLI Docs](https://docs.xone.ai/docs/cli/thinking)
1352
+ - [💻 Example](examples/thinking/basic_thinking.py)
1353
+
1354
+ ---
1355
+
1356
+ ### 15. Output Styles
1357
+
1358
+ Configure how agents format their responses:
1359
+
1360
+ ```python
1361
+ from xoneaiagents.output import OutputStyle, OutputFormatter
1362
+
1363
+ # Use preset styles
1364
+ style = OutputStyle.concise()
1365
+ formatter = OutputFormatter(style)
1366
+
1367
+ # Format output
1368
+ text = "# Hello\n\nThis is **bold** text."
1369
+ plain = formatter.format(text)
1370
+ print(plain)
1371
+ ```
1372
+
1373
+ **CLI Commands:**
1374
+ ```bash
1375
+ xoneai output status # Show current style
1376
+ xoneai output set concise # Set output style
1377
+ ```
1378
+
1379
+ **Links:**
1380
+ - [📖 Coding Docs](https://docs.xone.ai/features/output-styles)
1381
+ - [📖 CLI Docs](https://docs.xone.ai/docs/cli/output-style)
1382
+ - [💻 Example](examples/output/basic_output.py)
1383
+
1384
+ ---
1385
+
1386
+ ### 16. Context Compaction
1387
+
1388
+ Automatically manage context window size:
1389
+
1390
+ ```python
1391
+ from xoneaiagents.compaction import (
1392
+ ContextCompactor, CompactionStrategy
1393
+ )
1394
+
1395
+ compactor = ContextCompactor(
1396
+ max_tokens=4000,
1397
+ strategy=CompactionStrategy.SLIDING,
1398
+ preserve_recent=3
1399
+ )
1400
+
1401
+ messages = [...] # Your conversation history
1402
+ compacted, result = compactor.compact(messages)
1403
+
1404
+ print(f"Compression: {result.compression_ratio:.1%}")
1405
+ ```
1406
+
1407
+ **CLI Commands:**
1408
+ ```bash
1409
+ xoneai compaction status # Show settings
1410
+ xoneai compaction set sliding # Set strategy
1411
+ xoneai compaction stats # Show statistics
1412
+ ```
1413
+
1414
+ **Links:**
1415
+ - [📖 Coding Docs](https://docs.xone.ai/features/context-compaction)
1416
+ - [📖 CLI Docs](https://docs.xone.ai/docs/cli/compaction)
1417
+ - [💻 Example](examples/compaction/basic_compaction.py)
1418
+
1419
+ ---
1420
+
1421
+ ### 17. Field Names Reference (A-I-G-S)
1422
+
1423
+ XoneAI accepts both old (agents.yaml) and new (workflow.yaml) field names. Use the **canonical names** for new projects:
1424
+
1425
+ | Canonical (Recommended) | Alias (Also Works) | Purpose |
1426
+ |-------------------------|-------------------|---------|
1427
+ | `agents` | `roles` | Define agent personas |
1428
+ | `instructions` | `backstory` | Agent behavior/persona |
1429
+ | `action` | `description` | What the step does |
1430
+ | `steps` | `tasks` (nested) | Define work items |
1431
+ | `name` | `topic` | Workflow identifier |
1432
+
1433
+ **A-I-G-S Mnemonic** - Easy to remember:
1434
+ - **A**gents - Who does the work
1435
+ - **I**nstructions - How they behave
1436
+ - **G**oal - What they achieve
1437
+ - **S**teps - What they do
1438
+
1439
+ ```yaml
1440
+ # Quick Reference - Canonical Format
1441
+ name: My Workflow # Workflow name (not 'topic')
1442
+ agents: # Define agents (not 'roles')
1443
+ my_agent:
1444
+ role: Job Title # Agent's role
1445
+ goal: What to achieve # Agent's goal
1446
+ instructions: How to act # Agent's behavior (not 'backstory')
1447
+
1448
+ steps: # Define steps (not 'tasks')
1449
+ - agent: my_agent
1450
+ action: What to do # Step action (not 'description')
1451
+ ```
1452
+
1453
+ > **Note:** The parser accepts both old and new names. Run `xoneai workflow validate <file.yaml>` to see suggestions for canonical names.
1454
+
1455
+ ### 18. Extended agents.yaml with Workflow Patterns
1456
+
1457
+ **Feature Parity:** Both `agents.yaml` and `workflow.yaml` now support the same features:
1458
+ - All workflow patterns (route, parallel, loop, repeat)
1459
+ - All agent fields (function_calling_llm, max_rpm, max_execution_time, reflect_llm, templates)
1460
+ - All step fields (expected_output, context, output_json, create_directory, callback)
1461
+ - Framework support (xoneai, crewai, autogen)
1462
+ - Process types (sequential, hierarchical, workflow)
1463
+
1464
+ You can use advanced workflow patterns directly in agents.yaml by setting `process: workflow`:
1465
+
1466
+ ```yaml
1467
+ # agents.yaml with workflow patterns
1468
+ framework: xoneai
1469
+ process: workflow # Enables workflow mode
1470
+ topic: "Research AI trends"
1471
+
1472
+ workflow:
1473
+ planning: true
1474
+ reasoning: true
1475
+ verbose: true
1476
+
1477
+ variables:
1478
+ topic: AI trends
1479
+
1480
+ agents: # Canonical: use 'agents' instead of 'roles'
1481
+ classifier:
1482
+ role: Request Classifier
1483
+ instructions: "Classify requests into categories" # Canonical: use 'instructions' instead of 'backstory'
1484
+ goal: Classify requests
1485
+
1486
+ researcher:
1487
+ role: Research Analyst
1488
+ instructions: "Expert researcher" # Canonical: use 'instructions' instead of 'backstory'
1489
+ goal: Research topics
1490
+ tools:
1491
+ - tavily_search
1492
+
1493
+ steps:
1494
+ # Sequential step
1495
+ - agent: classifier
1496
+ action: "Classify: {{topic}}"
1497
+
1498
+ # Route pattern - decision-based branching
1499
+ - name: routing
1500
+ route:
1501
+ technical: [tech_expert]
1502
+ default: [researcher]
1503
+
1504
+ # Parallel pattern - concurrent execution
1505
+ - name: parallel_research
1506
+ parallel:
1507
+ - agent: researcher
1508
+ action: "Research market trends"
1509
+ - agent: researcher
1510
+ action: "Research competitors"
1511
+
1512
+ # Loop pattern - iterate over items
1513
+ - agent: researcher
1514
+ action: "Analyze {{item}}"
1515
+ loop:
1516
+ over: topics
1517
+
1518
+ # Repeat pattern - evaluator-optimizer
1519
+ - agent: aggregator
1520
+ action: "Synthesize findings"
1521
+ repeat:
1522
+ until: "comprehensive"
1523
+ max_iterations: 3
1524
+ ```
1525
+
1526
+ Run with the same simple command:
1527
+ ```bash
1528
+ xoneai agents.yaml
1529
+ ```
1530
+
1531
+ ### 19. MCP (Model Context Protocol)
1532
+
1533
+ XoneAI supports MCP Protocol Revision 2025-11-25 with multiple transports.
1534
+
1535
+ #### MCP Client (Consume MCP Servers)
1536
+ ```python
1537
+ from xoneaiagents import Agent, MCP
1538
+
1539
+ # stdio - Local NPX/Python servers
1540
+ agent = Agent(tools=MCP("npx @modelcontextprotocol/server-memory"))
1541
+
1542
+ # Streamable HTTP - Production servers
1543
+ agent = Agent(tools=MCP("https://api.example.com/mcp"))
1544
+
1545
+ # WebSocket - Real-time bidirectional
1546
+ agent = Agent(tools=MCP("wss://api.example.com/mcp", auth_token="token"))
1547
+
1548
+ # SSE (Legacy) - Backward compatibility
1549
+ agent = Agent(tools=MCP("http://localhost:8080/sse"))
1550
+
1551
+ # With environment variables
1552
+ agent = Agent(
1553
+ tools=MCP(
1554
+ command="npx",
1555
+ args=["-y", "@modelcontextprotocol/server-brave-search"],
1556
+ env={"BRAVE_API_KEY": "your-key"}
1557
+ )
1558
+ )
1559
+
1560
+ # Multiple MCP servers + regular functions
1561
+ def my_custom_tool(query: str) -> str:
1562
+ """Custom tool function."""
1563
+ return f"Result: {query}"
1564
+
1565
+ agent = Agent(
1566
+ name="MultiToolAgent",
1567
+ instructions="Agent with multiple MCP servers",
1568
+ tools=[
1569
+ MCP("uvx mcp-server-time"), # Time tools
1570
+ MCP("npx @modelcontextprotocol/server-memory"), # Memory tools
1571
+ my_custom_tool # Regular function
1572
+ ]
1573
+ )
1574
+ ```
1575
+
1576
+ #### MCP Server (Expose Tools as MCP Server)
1577
+
1578
+ Expose your Python functions as MCP tools for Claude Desktop, Cursor, and other MCP clients:
1579
+
1580
+ ```python
1581
+ from xoneaiagents.mcp import ToolsMCPServer
1582
+
1583
+ def search_web(query: str, max_results: int = 5) -> dict:
1584
+ """Search the web for information."""
1585
+ return {"results": [f"Result for {query}"]}
1586
+
1587
+ def calculate(expression: str) -> dict:
1588
+ """Evaluate a mathematical expression."""
1589
+ return {"result": eval(expression)}
1590
+
1591
+ # Create and run MCP server
1592
+ server = ToolsMCPServer(name="my-tools")
1593
+ server.register_tools([search_web, calculate])
1594
+ server.run() # stdio for Claude Desktop
1595
+ # server.run_sse(host="0.0.0.0", port=8080) # SSE for web clients
1596
+ ```
1597
+
1598
+ #### MCP Features
1599
+ | Feature | Description |
1600
+ |---------|-------------|
1601
+ | Session Management | Automatic Mcp-Session-Id handling |
1602
+ | Protocol Versioning | Mcp-Protocol-Version header |
1603
+ | Resumability | SSE stream recovery via Last-Event-ID |
1604
+ | Security | Origin validation, DNS rebinding prevention |
1605
+ | WebSocket | Auto-reconnect with exponential backoff |
1606
+
1607
+ ### 20. A2A (Agent2Agent Protocol)
1608
+
1609
+ XoneAI supports the [A2A Protocol](https://a2a-protocol.org) for agent-to-agent communication, enabling your agents to be discovered and collaborate with other AI agents.
1610
+
1611
+ #### A2A Server (Expose Agent as A2A Server)
1612
+ ```python
1613
+ from xoneaiagents import Agent, A2A
1614
+ from fastapi import FastAPI
1615
+
1616
+ # Create an agent with tools
1617
+ def search_web(query: str) -> str:
1618
+ """Search the web for information."""
1619
+ return f"Results for: {query}"
1620
+
1621
+ agent = Agent(
1622
+ name="Research Assistant",
1623
+ role="Research Analyst",
1624
+ goal="Help users research topics",
1625
+ tools=[search_web]
1626
+ )
1627
+
1628
+ # Expose as A2A Server
1629
+ a2a = A2A(agent=agent, url="http://localhost:8000/a2a")
1630
+
1631
+ app = FastAPI()
1632
+ app.include_router(a2a.get_router())
1633
+
1634
+ # Run: uvicorn app:app --reload
1635
+ # Agent Card: GET /.well-known/agent.json
1636
+ # Status: GET /status
1637
+ ```
1638
+
1639
+ #### A2A Features
1640
+ | Feature | Description |
1641
+ |---------|-------------|
1642
+ | Agent Card | JSON metadata for agent discovery |
1643
+ | Skills Extraction | Auto-generate skills from tools |
1644
+ | Task Management | Stateful task lifecycle |
1645
+ | Streaming | SSE streaming for real-time updates |
1646
+
1647
+ > **Documentation**: [docs.xone.ai/a2a](https://docs.xone.ai/a2a) | **Examples**: [examples/python/a2a](https://github.com/xonevn-ai/XoneAI/tree/main/examples/python/a2a)
1648
+
1649
+ ---
1650
+
1651
+ ## 🎯 CLI / No-Code Interface
1652
+
1653
+ XoneAI provides a powerful CLI for no-code automation and quick prototyping.
1654
+
1655
+ ### CLI Quick Reference
1656
+
1657
+ | Category | Commands |
1658
+ |----------|----------|
1659
+ | **Execution** | `xoneai`, `--auto`, `--interactive`, `--chat` |
1660
+ | **Research** | `research`, `--query-rewrite`, `--deep-research` |
1661
+ | **Planning** | `--planning`, `--planning-tools`, `--planning-reasoning` |
1662
+ | **Workflows** | `workflow run`, `workflow list`, `workflow auto` |
1663
+ | **Memory** | `memory show`, `memory add`, `memory search`, `memory clear` |
1664
+ | **Knowledge** | `knowledge add`, `knowledge query`, `knowledge list` |
1665
+ | **Sessions** | `session list`, `session resume`, `session delete` |
1666
+ | **Tools** | `tools list`, `tools info`, `tools search` |
1667
+ | **MCP** | `mcp list`, `mcp create`, `mcp enable` |
1668
+ | **Development** | `commit`, `docs`, `checkpoint`, `hooks` |
1669
+ | **Scheduling** | `schedule start`, `schedule list`, `schedule stop` |
1670
+
1671
+ ### Auto Mode
1672
+ ```bash
1673
+ pip install xoneai
1674
+ export OPENAI_API_KEY=xxxxxxxxxxxxxxxxxxxxxx
1675
+ xoneai --auto create a movie script about Robots in Mars
1676
+ ```
1677
+
1678
+ ### Interactive Mode CLI:
1679
+ ```bash
1680
+ # Start interactive terminal mode (inspired by Gemini CLI, Codex CLI, Claude Code)
1681
+ xoneai --interactive
1682
+ xoneai -i
1683
+
1684
+ # Features:
1685
+ # - Streaming responses (no boxes)
1686
+ # - Built-in tools: read_file, write_file, list_files, execute_command, internet_search
1687
+ # - Slash commands: /help, /exit, /tools, /clear
1688
+
1689
+ # Chat mode - single prompt with interactive style (for testing/scripting)
1690
+ # Use --chat (or --chat-mode for backward compatibility)
1691
+ xoneai "list files in current folder" --chat
1692
+ xoneai "search the web for AI news" --chat
1693
+ xoneai "read README.md" --chat
1694
+ ```
1695
+
1696
+ ### Chat UI (Web Interface):
1697
+ ```bash
1698
+ # Start web-based Chainlit chat interface (requires xoneai[chat])
1699
+ pip install "xoneai[chat]"
1700
+ xoneai chat
1701
+ # Opens browser at http://localhost:8084
1702
+ ```
1703
+
1704
+ ### Query Rewriting (works with any command):
1705
+ ```bash
1706
+ # Rewrite query for better results (uses QueryRewriterAgent)
1707
+ xoneai "AI trends" --query-rewrite
1708
+
1709
+ # Rewrite with search tools (agent decides when to search)
1710
+ xoneai "latest developments" --query-rewrite --rewrite-tools "internet_search"
1711
+
1712
+ # Works with any prompt
1713
+ xoneai "explain quantum computing" --query-rewrite -v
1714
+ ```
1715
+
1716
+ ### Deep Research CLI:
1717
+ ```bash
1718
+ # Default: OpenAI (o4-mini-deep-research)
1719
+ xoneai research "What are the latest AI trends in 2025?"
1720
+
1721
+ # Use Gemini
1722
+ xoneai research --model deep-research-pro "Your research query"
1723
+
1724
+ # Rewrite query before research
1725
+ xoneai research --query-rewrite "AI trends"
1726
+
1727
+ # Rewrite with search tools
1728
+ xoneai research --query-rewrite --rewrite-tools "internet_search" "AI trends"
1729
+
1730
+ # Use custom tools from file (gathers context before deep research)
1731
+ xoneai research --tools tools.py "Your research query"
1732
+ xoneai research -t my_tools.py "Your research query"
1733
+
1734
+ # Use built-in tools by name (comma-separated)
1735
+ xoneai research --tools "internet_search,wiki_search" "Your query"
1736
+ xoneai research -t "yfinance,calculator_tools" "Stock analysis query"
1737
+
1738
+ # Save output to file (output/research/{query}.md)
1739
+ xoneai research --save "Your research query"
1740
+ xoneai research -s "Your research query"
1741
+
1742
+ # Combine options
1743
+ xoneai research --query-rewrite --tools tools.py --save "Your research query"
1744
+
1745
+ # Verbose mode (show debug logs)
1746
+ xoneai research -v "Your research query"
1747
+ ```
1748
+
1749
+ ### Planning Mode CLI:
1750
+ ```bash
1751
+ # Enable planning mode - agent creates a plan before execution
1752
+ xoneai "Research AI trends and write a summary" --planning
1753
+
1754
+ # Planning with tools for research
1755
+ xoneai "Analyze market trends" --planning --planning-tools tools.py
1756
+
1757
+ # Planning with chain-of-thought reasoning
1758
+ xoneai "Complex analysis task" --planning --planning-reasoning
1759
+
1760
+ # Auto-approve plans without confirmation
1761
+ xoneai "Task" --planning --auto-approve-plan
1762
+ ```
1763
+
1764
+ ### Tool Approval CLI:
1765
+ ```bash
1766
+ # Auto-approve ALL tool executions (use with caution!)
1767
+ xoneai "run ls command" --trust
1768
+
1769
+ # Auto-approve tools up to a risk level (prompt for higher)
1770
+ # Levels: low, medium, high, critical
1771
+ xoneai "write to file" --approve-level high # Prompts for critical tools only
1772
+ xoneai "task" --approve-level medium # Prompts for high and critical
1773
+
1774
+ # Default behavior (no flags): prompts for all dangerous tools
1775
+ xoneai "run shell command" # Will prompt for approval
1776
+ ```
1777
+
1778
+ ### Memory CLI:
1779
+ ```bash
1780
+ # Enable memory for agent (persists across sessions)
1781
+ xoneai "My name is John" --memory
1782
+
1783
+ # Memory with user isolation
1784
+ xoneai "Remember my preferences" --memory --user-id user123
1785
+
1786
+ # Memory management commands
1787
+ xoneai memory show # Show memory statistics
1788
+ xoneai memory add "User prefers Python" # Add to long-term memory
1789
+ xoneai memory search "Python" # Search memories
1790
+ xoneai memory clear # Clear short-term memory
1791
+ xoneai memory clear all # Clear all memory
1792
+ xoneai memory save my_session # Save session
1793
+ xoneai memory resume my_session # Resume session
1794
+ xoneai memory sessions # List saved sessions
1795
+ xoneai memory checkpoint # Create checkpoint
1796
+ xoneai memory restore <checkpoint_id> # Restore checkpoint
1797
+ xoneai memory checkpoints # List checkpoints
1798
+ xoneai memory help # Show all commands
1799
+ ```
1800
+
1801
+ ### Rules CLI:
1802
+ ```bash
1803
+ # List all loaded rules (from XONE.md, CLAUDE.md, etc.)
1804
+ xoneai rules list
1805
+
1806
+ # Show specific rule details
1807
+ xoneai rules show <rule_name>
1808
+
1809
+ # Create a new rule
1810
+ xoneai rules create my_rule "Always use type hints"
1811
+
1812
+ # Delete a rule
1813
+ xoneai rules delete my_rule
1814
+
1815
+ # Show rules statistics
1816
+ xoneai rules stats
1817
+
1818
+ # Include manual rules with prompts
1819
+ xoneai "Task" --include-rules security,testing
1820
+ ```
1821
+
1822
+ ### Workflow CLI:
1823
+ ```bash
1824
+ # List available workflows
1825
+ xoneai workflow list
1826
+
1827
+ # Execute a workflow with tools and save output
1828
+ xoneai workflow run "Research Blog" --tools tavily --save
1829
+
1830
+ # Execute with variables
1831
+ xoneai workflow run deploy --workflow-var environment=staging --workflow-var branch=main
1832
+
1833
+ # Execute with planning mode (AI creates sub-steps for each workflow step)
1834
+ xoneai workflow run "Research Blog" --planning --verbose
1835
+
1836
+ # Execute with reasoning mode (chain-of-thought)
1837
+ xoneai workflow run "Analysis" --reasoning --verbose
1838
+
1839
+ # Execute with memory enabled
1840
+ xoneai workflow run "Research" --memory
1841
+
1842
+ # Show workflow details
1843
+ xoneai workflow show deploy
1844
+
1845
+ # Create a new workflow template
1846
+ xoneai workflow create my_workflow
1847
+
1848
+ # Inline workflow (no template file needed)
1849
+ xoneai "What is AI?" --workflow "Research,Summarize" --save
1850
+
1851
+ # Inline workflow with step actions
1852
+ xoneai "GPT-5" --workflow "Research:Search for info,Write:Write blog" --tools tavily
1853
+
1854
+ # Workflow CLI help
1855
+ xoneai workflow help
1856
+ ```
1857
+
1858
+ #### YAML Workflow Files:
1859
+ ```bash
1860
+ # Run a YAML workflow file
1861
+ xoneai workflow run research.yaml
1862
+
1863
+ # Run with variables
1864
+ xoneai workflow run research.yaml --var topic="AI trends"
1865
+
1866
+ # Validate a YAML workflow
1867
+ xoneai workflow validate research.yaml
1868
+
1869
+ # Create from template (simple, routing, parallel, loop, evaluator-optimizer)
1870
+ xoneai workflow template routing --output my_workflow.yaml
1871
+ ```
1872
+
1873
+ #### Auto-Generate Workflows:
1874
+ ```bash
1875
+ # Auto-generate a sequential workflow from topic
1876
+ xoneai workflow auto "Research AI trends"
1877
+
1878
+ # Generate parallel workflow (multiple agents work concurrently)
1879
+ xoneai workflow auto "Research AI trends" --pattern parallel
1880
+
1881
+ # Generate routing workflow (classifier routes to specialists)
1882
+ xoneai workflow auto "Build a chatbot" --pattern routing
1883
+
1884
+ # Generate orchestrator-workers workflow (central orchestrator delegates)
1885
+ xoneai workflow auto "Comprehensive market analysis" --pattern orchestrator-workers
1886
+
1887
+ # Generate evaluator-optimizer workflow (iterative refinement)
1888
+ xoneai workflow auto "Write and refine article" --pattern evaluator-optimizer
1889
+
1890
+ # Specify output file
1891
+ xoneai workflow auto "Build a chatbot" --pattern routing
1892
+
1893
+ # Specify output file
1894
+ xoneai workflow auto "Research AI" --pattern sequential --output my_workflow.yaml
1895
+ ```
1896
+
1897
+ **Workflow CLI Options:**
1898
+ | Flag | Description |
1899
+ |------|-------------|
1900
+ | `--workflow-var key=value` | Set workflow variable (can be repeated) |
1901
+ | `--var key=value` | Set variable for YAML workflows |
1902
+ | `--pattern <pattern>` | Pattern for auto-generation (sequential, parallel, routing, loop, orchestrator-workers, evaluator-optimizer) |
1903
+ | `--output <file>` | Output file for auto-generation |
1904
+ | `--llm <model>` | LLM model (e.g., openai/gpt-4o-mini) |
1905
+ | `--tools <tools>` | Tools (comma-separated, e.g., tavily) |
1906
+ | `--planning` | Enable planning mode |
1907
+ | `--reasoning` | Enable reasoning mode |
1908
+ | `--memory` | Enable memory |
1909
+ | `--verbose` | Enable verbose output |
1910
+ | `--save` | Save output to file |
1911
+
1912
+ ### Hooks CLI:
1913
+ ```bash
1914
+ # List configured hooks
1915
+ xoneai hooks list
1916
+
1917
+ # Show hooks statistics
1918
+ xoneai hooks stats
1919
+
1920
+ # Create hooks.json template
1921
+ xoneai hooks init
1922
+ ```
1923
+
1924
+ ### Claude Memory Tool CLI:
1925
+ ```bash
1926
+ # Enable Claude Memory Tool (Anthropic models only)
1927
+ xoneai "Research and remember findings" --claude-memory --llm anthropic/claude-sonnet-4-20250514
1928
+ ```
1929
+
1930
+ ### Guardrail CLI:
1931
+ ```bash
1932
+ # Validate output with LLM guardrail
1933
+ xoneai "Write code" --guardrail "Ensure code is secure and follows best practices"
1934
+
1935
+ # Combine with other flags
1936
+ xoneai "Generate SQL query" --guardrail "No DROP or DELETE statements" --save
1937
+ ```
1938
+
1939
+ ### Metrics CLI:
1940
+ ```bash
1941
+ # Display token usage and cost metrics
1942
+ xoneai "Analyze this data" --metrics
1943
+
1944
+ # Combine with other features
1945
+ xoneai "Complex task" --metrics --planning
1946
+ ```
1947
+
1948
+ ### Scheduler CLI:
1949
+
1950
+ ```bash
1951
+ xoneai schedule start <name> "task" --interval hourly
1952
+ xoneai schedule list
1953
+ xoneai schedule logs <name> [--follow]
1954
+ xoneai schedule stop <name>
1955
+ xoneai schedule restart <name>
1956
+ xoneai schedule delete <name>
1957
+ xoneai schedule describe <name>
1958
+ xoneai schedule save <name> [file.yaml]
1959
+ xoneai schedule "task" --interval hourly # foreground mode
1960
+ xoneai schedule agents.yaml # foreground mode
1961
+ ```
1962
+
1963
+ ### Image Processing CLI:
1964
+ ```bash
1965
+ # Process images with vision-based tasks
1966
+ xoneai "Describe this image" --image path/to/image.png
1967
+
1968
+ # Analyze image content
1969
+ xoneai "What objects are in this photo?" --image photo.jpg --llm openai/gpt-4o
1970
+ ```
1971
+
1972
+ ### Telemetry CLI:
1973
+ ```bash
1974
+ # Enable usage monitoring and analytics
1975
+ xoneai "Task" --telemetry
1976
+
1977
+ # Combine with metrics for full observability
1978
+ xoneai "Complex analysis" --telemetry --metrics
1979
+ ```
1980
+
1981
+ ### MCP (Model Context Protocol) CLI:
1982
+ ```bash
1983
+ # Use MCP server tools
1984
+ xoneai "Search files" --mcp "npx -y @modelcontextprotocol/server-filesystem ."
1985
+
1986
+ # MCP with environment variables
1987
+ xoneai "Search web" --mcp "npx -y @modelcontextprotocol/server-brave-search" --mcp-env "BRAVE_API_KEY=your_key"
1988
+
1989
+ # Multiple MCP options
1990
+ xoneai "Task" --mcp "npx server" --mcp-env "KEY1=value1,KEY2=value2"
1991
+ ```
1992
+
1993
+ ### Fast Context CLI:
1994
+ ```bash
1995
+ # Search codebase for relevant context
1996
+ xoneai "Find authentication code" --fast-context ./src
1997
+
1998
+ # Add code context to any task
1999
+ xoneai "Explain this function" --fast-context /path/to/project
2000
+ ```
2001
+
2002
+ ### Knowledge CLI:
2003
+ ```bash
2004
+ # Add documents to knowledge base
2005
+ xoneai knowledge add document.pdf
2006
+ xoneai knowledge add ./docs/
2007
+
2008
+ # Search knowledge base
2009
+ xoneai knowledge search "API authentication"
2010
+
2011
+ # List indexed documents
2012
+ xoneai knowledge list
2013
+
2014
+ # Clear knowledge base
2015
+ xoneai knowledge clear
2016
+
2017
+ # Show knowledge base info
2018
+ xoneai knowledge info
2019
+
2020
+ # Show all commands
2021
+ xoneai knowledge help
2022
+ ```
2023
+
2024
+ ### Session CLI:
2025
+ ```bash
2026
+ # List all saved sessions
2027
+ xoneai session list
2028
+
2029
+ # Show session details
2030
+ xoneai session show my-project
2031
+
2032
+ # Resume a session (load into memory)
2033
+ xoneai session resume my-project
2034
+
2035
+ # Delete a session
2036
+ xoneai session delete my-project
2037
+
2038
+ # Auto-save session after each run
2039
+ xoneai "Analyze this code" --auto-save my-project
2040
+
2041
+ # Load history from last N sessions into context
2042
+ xoneai "Continue our discussion" --history 5
2043
+ ```
2044
+
2045
+ ### Session Management (Python):
2046
+ ```python
2047
+ from xoneaiagents import Agent
2048
+
2049
+ # Auto-save session after each run
2050
+ agent = Agent(
2051
+ name="Assistant",
2052
+ memory=True,
2053
+ auto_save="my-project"
2054
+ )
2055
+
2056
+ # Load history from past sessions via context management
2057
+ agent = Agent(
2058
+ name="Assistant",
2059
+ memory=True,
2060
+ context=True, # Enable context management for history
2061
+ )
2062
+ ```
2063
+
2064
+ ### Workflow Checkpoints:
2065
+ ```python
2066
+ from xoneaiagents.memory.workflows import WorkflowManager
2067
+
2068
+ manager = WorkflowManager()
2069
+
2070
+ # Save checkpoint after each step
2071
+ result = manager.execute("deploy", checkpoint="deploy-v1")
2072
+
2073
+ # Resume from checkpoint
2074
+ result = manager.execute("deploy", resume="deploy-v1")
2075
+
2076
+ # List/delete checkpoints
2077
+ manager.list_checkpoints()
2078
+ manager.delete_checkpoint("deploy-v1")
2079
+ ```
2080
+
2081
+ ### Tools CLI:
2082
+ ```bash
2083
+ xoneai tools list
2084
+ xoneai tools info internet_search
2085
+ xoneai tools search "web"
2086
+ xoneai tools doctor
2087
+ xoneai tools resolve shell_tool
2088
+ xoneai tools discover
2089
+ xoneai tools show-sources
2090
+ xoneai tools show-sources --template ai-video-editor
2091
+ ```
2092
+
2093
+ | Command | Example | Docs |
2094
+ |---------|---------|------|
2095
+ | `tools list` | [example](examples/tools/) | [docs](https://docs.xone.ai/docs/cli/tools) |
2096
+ | `tools resolve` | [example](examples/tools/example_tools_resolve.py) | [docs](https://docs.xone.ai/docs/cli/tools-resolve) |
2097
+ | `tools discover` | [example](examples/tools/example_tools_discover.py) | [docs](https://docs.xone.ai/docs/cli/tools-discover) |
2098
+ | `tools show-sources` | [example](examples/tools/example_tools_sources.py) | [docs](https://docs.xone.ai/docs/cli/tools-show-sources) |
2099
+
2100
+ ### Handoff CLI:
2101
+ ```bash
2102
+ # Enable agent-to-agent task delegation
2103
+ xoneai "Research and write article" --handoff "researcher,writer,editor"
2104
+
2105
+ # Complex multi-agent workflow
2106
+ xoneai "Analyze data and create report" --handoff "analyst,visualizer,writer"
2107
+ ```
2108
+
2109
+ ### Auto Memory CLI:
2110
+ ```bash
2111
+ # Enable automatic memory extraction
2112
+ xoneai "Learn about user preferences" --auto-memory
2113
+
2114
+ # Combine with user isolation
2115
+ xoneai "Remember my settings" --auto-memory --user-id user123
2116
+ ```
2117
+
2118
+ ### Todo CLI:
2119
+ ```bash
2120
+ # Generate todo list from task
2121
+ xoneai "Plan the project" --todo
2122
+
2123
+ # Add a todo item
2124
+ xoneai todo add "Implement feature X"
2125
+
2126
+ # List all todos
2127
+ xoneai todo list
2128
+
2129
+ # Complete a todo
2130
+ xoneai todo complete 1
2131
+
2132
+ # Delete a todo
2133
+ xoneai todo delete 1
2134
+
2135
+ # Clear all todos
2136
+ xoneai todo clear
2137
+
2138
+ # Show all commands
2139
+ xoneai todo help
2140
+ ```
2141
+
2142
+ ### Router CLI:
2143
+ ```bash
2144
+ # Auto-select best model based on task complexity
2145
+ xoneai "Simple question" --router
2146
+
2147
+ # Specify preferred provider
2148
+ xoneai "Complex analysis" --router --router-provider anthropic
2149
+
2150
+ # Router automatically selects:
2151
+ # - Simple tasks → gpt-4o-mini, claude-3-haiku
2152
+ # - Complex tasks → gpt-4-turbo, claude-3-opus
2153
+
2154
+ # Create workflow with model routing template
2155
+ xoneai workflow create --template model-routing --output my_workflow.yaml
2156
+ ```
2157
+
2158
+ Custom models can be configured in `agents.yaml`. See [Model Router Docs](https://docs.xone.ai/features/model-router) for details.
2159
+
2160
+ ### Flow Display CLI:
2161
+ ```bash
2162
+ # Enable visual workflow tracking
2163
+ xoneai agents.yaml --flow-display
2164
+
2165
+ # Combine with other features
2166
+ xoneai "Multi-step task" --planning --flow-display
2167
+ ```
2168
+
2169
+ ### Docs CLI:
2170
+ ```bash
2171
+ # List all project docs
2172
+ xoneai docs list
2173
+
2174
+ # Create a new doc
2175
+ xoneai docs create project-overview "This project is a Python web app..."
2176
+
2177
+ # Show a specific doc
2178
+ xoneai docs show project-overview
2179
+
2180
+ # Delete a doc
2181
+ xoneai docs delete old-doc
2182
+
2183
+ # Show all commands
2184
+ xoneai docs help
2185
+ ```
2186
+
2187
+ ### MCP Config CLI:
2188
+ ```bash
2189
+ # List all MCP configurations
2190
+ xoneai mcp list
2191
+
2192
+ # Create a new MCP config
2193
+ xoneai mcp create filesystem npx -y @modelcontextprotocol/server-filesystem .
2194
+
2195
+ # Show a specific config
2196
+ xoneai mcp show filesystem
2197
+
2198
+ # Enable/disable a config
2199
+ xoneai mcp enable filesystem
2200
+ xoneai mcp disable filesystem
2201
+
2202
+ # Delete a config
2203
+ xoneai mcp delete filesystem
2204
+
2205
+ # Show all commands
2206
+ xoneai mcp help
2207
+ ```
2208
+
2209
+ ### AI Commit CLI:
2210
+ ```bash
2211
+ # Full auto mode: stage all, security check, commit, and push
2212
+ xoneai commit -a
2213
+
2214
+ # Interactive mode (requires git add first)
2215
+ xoneai commit
2216
+
2217
+ # Interactive with auto-push
2218
+ xoneai commit --push
2219
+
2220
+ # Skip security check (not recommended)
2221
+ xoneai commit -a --no-verify
2222
+ ```
2223
+
2224
+ **Features:**
2225
+ - 🤖 AI-generated conventional commit messages
2226
+ - 🔒 Built-in security scanning (API keys, passwords, secrets, sensitive files)
2227
+ - 📦 Auto-staging with `-a` flag
2228
+ - 🚀 Auto-push in full auto mode
2229
+ - ✏️ Edit message before commit in interactive mode
2230
+
2231
+ **Security Detection:**
2232
+ - API keys, secrets, tokens (AWS, GitHub, GitLab, Slack)
2233
+ - Passwords and private keys
2234
+ - Sensitive files (`.env`, `id_rsa`, `.pem`, `.key`, etc.)
2235
+
2236
+ ### Serve CLI (API Server):
2237
+ ```bash
2238
+ # Start API server for agents defined in YAML
2239
+ xoneai serve agents.yaml
2240
+
2241
+ # With custom port and host
2242
+ xoneai serve agents.yaml --port 8005 --host 0.0.0.0
2243
+
2244
+ # Alternative flag style
2245
+ xoneai agents.yaml --serve
2246
+
2247
+ # The server provides:
2248
+ # POST /agents - Run all agents sequentially
2249
+ # POST /agents/{name} - Run specific agent (e.g., /agents/researcher)
2250
+ # GET /agents/list - List available agents
2251
+ ```
2252
+
2253
+ ### n8n Integration CLI:
2254
+ ```bash
2255
+ # Export workflow to n8n and open in browser
2256
+ xoneai agents.yaml --n8n
2257
+
2258
+ # With custom n8n URL
2259
+ xoneai agents.yaml --n8n --n8n-url http://localhost:5678
2260
+
2261
+ # Set N8N_API_KEY for auto-import
2262
+ export N8N_API_KEY="your-api-key"
2263
+ xoneai agents.yaml --n8n
2264
+ ```
2265
+
2266
+ ### External Agents CLI:
2267
+
2268
+ Use external AI coding CLI tools (Claude Code, Gemini CLI, Codex CLI, Cursor CLI) as agent tools:
2269
+
2270
+ ```bash
2271
+ # Use Claude Code for coding tasks
2272
+ xoneai "Refactor the auth module" --external-agent claude
2273
+
2274
+ # Use Gemini CLI for code analysis
2275
+ xoneai "Analyze codebase architecture" --external-agent gemini
2276
+
2277
+ # Use OpenAI Codex CLI
2278
+ xoneai "Fix all bugs in src/" --external-agent codex
2279
+
2280
+ # Use Cursor CLI
2281
+ xoneai "Add comprehensive tests" --external-agent cursor
2282
+ ```
2283
+
2284
+ **Python API:**
2285
+ ```python
2286
+ from xoneai.integrations import (
2287
+ ClaudeCodeIntegration,
2288
+ GeminiCLIIntegration,
2289
+ CodexCLIIntegration,
2290
+ CursorCLIIntegration
2291
+ )
2292
+
2293
+ # Create integration
2294
+ claude = ClaudeCodeIntegration(workspace="/project")
2295
+
2296
+ # Execute a coding task
2297
+ result = await claude.execute("Refactor the auth module")
2298
+
2299
+ # Use as agent tool
2300
+ from xoneai import Agent
2301
+ tool = claude.as_tool()
2302
+ agent = Agent(tools=[tool])
2303
+ ```
2304
+
2305
+ **Environment Variables:**
2306
+ ```bash
2307
+ export ANTHROPIC_API_KEY=your-key # Claude Code
2308
+ export GEMINI_API_KEY=your-key # Gemini CLI
2309
+ export OPENAI_API_KEY=your-key # Codex CLI
2310
+ export CURSOR_API_KEY=your-key # Cursor CLI
2311
+ ```
2312
+
2313
+ See [External Agents Documentation](https://docs.xone.ai/code/external-agents) for more details.
2314
+
2315
+ ### @Mentions in Prompts:
2316
+ ```bash
2317
+ # Include file content in prompt
2318
+ xoneai "@file:src/main.py explain this code"
2319
+
2320
+ # Include project doc
2321
+ xoneai "@doc:project-overview help me add a feature"
2322
+
2323
+ # Search the web
2324
+ xoneai "@web:python best practices give me tips"
2325
+
2326
+ # Fetch URL content
2327
+ xoneai "@url:https://docs.python.org summarize this"
2328
+
2329
+ # Combine multiple mentions
2330
+ xoneai "@file:main.py @doc:coding-standards review this code"
2331
+ ```
2332
+
2333
+ ## Prompt Expansion
2334
+
2335
+ Expand short prompts into detailed, actionable prompts:
2336
+
2337
+ ### CLI Usage
2338
+ ```bash
2339
+ # Expand a short prompt into detailed prompt
2340
+ xoneai "write a movie script in 3 lines" --expand-prompt
2341
+
2342
+ # With verbose output
2343
+ xoneai "blog about AI" --expand-prompt -v
2344
+
2345
+ # With tools for context gathering
2346
+ xoneai "latest AI trends" --expand-prompt --expand-tools tools.py
2347
+
2348
+ # Combine with query rewrite
2349
+ xoneai "AI news" --query-rewrite --expand-prompt
2350
+ ```
2351
+
2352
+ ### Programmatic Usage
2353
+ ```python
2354
+ from xoneaiagents import PromptExpanderAgent, ExpandStrategy
2355
+
2356
+ # Basic usage
2357
+ agent = PromptExpanderAgent()
2358
+ result = agent.expand("write a movie script in 3 lines")
2359
+ print(result.expanded_prompt)
2360
+
2361
+ # With specific strategy
2362
+ result = agent.expand("blog about AI", strategy=ExpandStrategy.DETAILED)
2363
+
2364
+ # Available strategies: BASIC, DETAILED, STRUCTURED, CREATIVE, AUTO
2365
+ ```
2366
+
2367
+ **Key Difference:**
2368
+ - `--query-rewrite`: Optimizes queries for search/retrieval (RAG)
2369
+ - `--expand-prompt`: Expands prompts for detailed task execution
2370
+
2371
+ ## Web Search, Web Fetch & Prompt Caching
2372
+
2373
+ ### CLI Usage
2374
+ ```bash
2375
+ # Web Search - Get real-time information
2376
+ xoneai "What are the latest AI news today?" --web-search --llm openai/gpt-4o-search-preview
2377
+
2378
+ # Web Fetch - Retrieve and analyze URL content (Anthropic only)
2379
+ xoneai "Summarize https://docs.xone.ai" --web-fetch --llm anthropic/claude-sonnet-4-20250514
2380
+
2381
+ # Prompt Caching - Reduce costs for repeated prompts
2382
+ xoneai "Analyze this document..." --prompt-caching --llm anthropic/claude-sonnet-4-20250514
2383
+ ```
2384
+
2385
+ ### Programmatic Usage
2386
+ ```python
2387
+ from xoneaiagents import Agent
2388
+
2389
+ # Web Search
2390
+ agent = Agent(
2391
+ instructions="You are a research assistant",
2392
+ llm="openai/gpt-4o-search-preview",
2393
+ web_search=True
2394
+ )
2395
+
2396
+ # Web Fetch (Anthropic only)
2397
+ agent = Agent(
2398
+ instructions="You are a content analyzer",
2399
+ llm="anthropic/claude-sonnet-4-20250514",
2400
+ web_fetch=True
2401
+ )
2402
+
2403
+ # Prompt Caching
2404
+ agent = Agent(
2405
+ instructions="You are an AI assistant..." * 50, # Long system prompt
2406
+ llm="anthropic/claude-sonnet-4-20250514",
2407
+ prompt_caching=True
2408
+ )
2409
+ ```
2410
+
2411
+ **Supported Providers:**
2412
+ | Feature | Providers |
2413
+ |---------|----------|
2414
+ | Web Search | OpenAI, Gemini, Anthropic, xAI, Perplexity |
2415
+ | Web Fetch | Anthropic |
2416
+ | Prompt Caching | OpenAI (auto), Anthropic, Bedrock, Deepseek |
2417
+
2418
+ ## CLI Features
2419
+
2420
+ | Feature | Docs |
2421
+ |---------|:----:|
2422
+ | 🔄 Query Rewrite - RAG optimization | [📖](https://docs.xone.ai/docs/cli/query-rewrite) |
2423
+ | 🔬 Deep Research - Automated research | [📖](https://docs.xone.ai/docs/cli/deep-research) |
2424
+ | 📋 Planning - Step-by-step execution | [📖](https://docs.xone.ai/docs/cli/planning) |
2425
+ | 💾 Memory - Persistent agent memory | [📖](https://docs.xone.ai/docs/cli/memory) |
2426
+ | 📜 Rules - Auto-discovered instructions | [📖](https://docs.xone.ai/docs/cli/rules) |
2427
+ | 🔄 Workflow - Multi-step workflows | [📖](https://docs.xone.ai/docs/cli/workflow) |
2428
+ | 🪝 Hooks - Event-driven actions | [📖](https://docs.xone.ai/docs/cli/hooks) |
2429
+ | 🧠 Claude Memory - Anthropic memory tool | [📖](https://docs.xone.ai/docs/cli/claude-memory) |
2430
+ | 🛡️ Guardrail - Output validation | [📖](https://docs.xone.ai/docs/cli/guardrail) |
2431
+ | 📊 Metrics - Token usage tracking | [📖](https://docs.xone.ai/docs/cli/metrics) |
2432
+ | 🖼️ Image - Vision processing | [📖](https://docs.xone.ai/docs/cli/image) |
2433
+ | 📡 Telemetry - Usage monitoring | [📖](https://docs.xone.ai/docs/cli/telemetry) |
2434
+ | 🔌 MCP - Model Context Protocol | [📖](https://docs.xone.ai/docs/cli/mcp) |
2435
+ | ⚡ Fast Context - Codebase search | [📖](https://docs.xone.ai/docs/cli/fast-context) |
2436
+ | 📚 Knowledge - RAG management | [📖](https://docs.xone.ai/docs/cli/knowledge) |
2437
+ | 💬 Session - Conversation management | [📖](https://docs.xone.ai/docs/cli/session) |
2438
+ | 🔧 Tools - Tool discovery | [📖](https://docs.xone.ai/docs/cli/tools) |
2439
+ | 🤝 Handoff - Agent delegation | [📖](https://docs.xone.ai/docs/cli/handoff) |
2440
+ | 🧠 Auto Memory - Memory extraction | [📖](https://docs.xone.ai/docs/cli/auto-memory) |
2441
+ | 📋 Todo - Task management | [📖](https://docs.xone.ai/docs/cli/todo) |
2442
+ | 🎯 Router - Smart model selection | [📖](https://docs.xone.ai/docs/cli/router) |
2443
+ | 📈 Flow Display - Visual workflow | [📖](https://docs.xone.ai/docs/cli/flow-display) |
2444
+ | ✨ Prompt Expansion - Detailed prompts | [📖](https://docs.xone.ai/docs/cli/prompt-expansion) |
2445
+ | 🌐 Web Search - Real-time search | [📖](https://docs.xone.ai/docs/cli/web-search) |
2446
+ | 📥 Web Fetch - URL content retrieval | [📖](https://docs.xone.ai/docs/cli/web-fetch) |
2447
+ | 💾 Prompt Caching - Cost reduction | [📖](https://docs.xone.ai/docs/cli/prompt-caching) |
2448
+ | 📦 Template Catalog - Browse & discover templates | [📖](https://docs.xone.ai/docs/cli/template-catalog) |
2449
+
2450
+ ### Template Catalog CLI
2451
+
2452
+ | Command | Description |
2453
+ |---------|-------------|
2454
+ | `xoneai templates browse` | Open template catalog in browser |
2455
+ | `xoneai templates browse --print` | Print catalog URL only |
2456
+ | `xoneai templates validate` | Validate template YAML files |
2457
+ | `xoneai templates validate --source <dir>` | Validate specific directory |
2458
+ | `xoneai templates validate --strict` | Strict validation mode |
2459
+ | `xoneai templates validate --json` | JSON output format |
2460
+ | `xoneai templates catalog build` | Build catalog locally |
2461
+ | `xoneai templates catalog build --out <dir>` | Build to specific directory |
2462
+ | `xoneai templates catalog sync` | Sync template sources |
2463
+ | `xoneai templates catalog sync --source <name>` | Sync specific source |
2464
+
2465
+ **Examples:** [examples/catalog/](examples/catalog/) | **Docs:** [Code](https://docs.xone.ai/docs/cli/template-catalog-code) | [CLI](https://docs.xone.ai/docs/cli/template-catalog)
2466
+
2467
+ ---
2468
+
2469
+ ## 💻 Using JavaScript Code
2470
+
2471
+ ```bash
2472
+ npm install xoneai
2473
+ export OPENAI_API_KEY=xxxxxxxxxxxxxxxxxxxxxx
2474
+ ```
2475
+
2476
+ ```javascript
2477
+ const { Agent } = require('xoneai');
2478
+ const agent = new Agent({ instructions: 'You are a helpful AI assistant' });
2479
+ agent.start('Write a movie script about a robot in Mars');
2480
+ ```
2481
+
2482
+ ![XoneAI CLI Demo](docs/demo/xoneai-cli-demo.gif)
2483
+
2484
+ ---
2485
+
2486
+ ## ⭐ Star History
2487
+
2488
+ [![Star History Chart](https://api.star-history.com/svg?repos=xonevn-ai/XoneAI&type=Date)](https://docs.xone.ai)
2489
+
2490
+ ---
2491
+
2492
+ ## 📊 Process Types & Patterns
2493
+
2494
+ <details>
2495
+ <summary><strong>View architecture diagrams and workflow patterns</strong></summary>
2496
+
2497
+ ### AI Agents Flow
2498
+
2499
+ ```mermaid
2500
+ graph LR
2501
+ %% Define the main flow
2502
+ Start([▶ Start]) --> Agent1
2503
+ Agent1 --> Process[⚙ Process]
2504
+ Process --> Agent2
2505
+ Agent2 --> Output([✓ Output])
2506
+ Process -.-> Agent1
2507
+
2508
+ %% Define subgraphs for agents and their tasks
2509
+ subgraph Agent1[ ]
2510
+ Task1[📋 Task]
2511
+ AgentIcon1[🤖 AI Agent]
2512
+ Tools1[🔧 Tools]
2513
+
2514
+ Task1 --- AgentIcon1
2515
+ AgentIcon1 --- Tools1
2516
+ end
2517
+
2518
+ subgraph Agent2[ ]
2519
+ Task2[📋 Task]
2520
+ AgentIcon2[🤖 AI Agent]
2521
+ Tools2[🔧 Tools]
2522
+
2523
+ Task2 --- AgentIcon2
2524
+ AgentIcon2 --- Tools2
2525
+ end
2526
+
2527
+ classDef input fill:#8B0000,stroke:#7C90A0,color:#fff
2528
+ classDef process fill:#189AB4,stroke:#7C90A0,color:#fff
2529
+ classDef tools fill:#2E8B57,stroke:#7C90A0,color:#fff
2530
+ classDef transparent fill:none,stroke:none
2531
+
2532
+ class Start,Output,Task1,Task2 input
2533
+ class Process,AgentIcon1,AgentIcon2 process
2534
+ class Tools1,Tools2 tools
2535
+ class Agent1,Agent2 transparent
2536
+ ```
2537
+
2538
+ ## AI Agents with Tools
2539
+
2540
+ Create AI agents that can use tools to interact with external systems and perform actions.
2541
+
2542
+ ```mermaid
2543
+ flowchart TB
2544
+ subgraph Tools
2545
+ direction TB
2546
+ T3[Internet Search]
2547
+ T1[Code Execution]
2548
+ T2[Formatting]
2549
+ end
2550
+
2551
+ Input[Input] ---> Agents
2552
+ subgraph Agents
2553
+ direction LR
2554
+ A1[Agent 1]
2555
+ A2[Agent 2]
2556
+ A3[Agent 3]
2557
+ end
2558
+ Agents ---> Output[Output]
2559
+
2560
+ T3 --> A1
2561
+ T1 --> A2
2562
+ T2 --> A3
2563
+
2564
+ style Tools fill:#189AB4,color:#fff
2565
+ style Agents fill:#8B0000,color:#fff
2566
+ style Input fill:#8B0000,color:#fff
2567
+ style Output fill:#8B0000,color:#fff
2568
+ ```
2569
+
2570
+ ## AI Agents with Memory
2571
+
2572
+ Create AI agents with memory capabilities for maintaining context and information across tasks.
2573
+
2574
+ ```mermaid
2575
+ flowchart TB
2576
+ subgraph Memory
2577
+ direction TB
2578
+ STM[Short Term]
2579
+ LTM[Long Term]
2580
+ end
2581
+
2582
+ subgraph Store
2583
+ direction TB
2584
+ DB[(Vector DB)]
2585
+ end
2586
+
2587
+ Input[Input] ---> Agents
2588
+ subgraph Agents
2589
+ direction LR
2590
+ A1[Agent 1]
2591
+ A2[Agent 2]
2592
+ A3[Agent 3]
2593
+ end
2594
+ Agents ---> Output[Output]
2595
+
2596
+ Memory <--> Store
2597
+ Store <--> A1
2598
+ Store <--> A2
2599
+ Store <--> A3
2600
+
2601
+ style Memory fill:#189AB4,color:#fff
2602
+ style Store fill:#2E8B57,color:#fff
2603
+ style Agents fill:#8B0000,color:#fff
2604
+ style Input fill:#8B0000,color:#fff
2605
+ style Output fill:#8B0000,color:#fff
2606
+ ```
2607
+
2608
+ ## AI Agents with Different Processes
2609
+
2610
+ ### Sequential Process
2611
+
2612
+ The simplest form of task execution where tasks are performed one after another.
2613
+
2614
+ ```mermaid
2615
+ graph LR
2616
+ Input[Input] --> A1
2617
+ subgraph Agents
2618
+ direction LR
2619
+ A1[Agent 1] --> A2[Agent 2] --> A3[Agent 3]
2620
+ end
2621
+ A3 --> Output[Output]
2622
+
2623
+ classDef input fill:#8B0000,stroke:#7C90A0,color:#fff
2624
+ classDef process fill:#189AB4,stroke:#7C90A0,color:#fff
2625
+ classDef transparent fill:none,stroke:none
2626
+
2627
+ class Input,Output input
2628
+ class A1,A2,A3 process
2629
+ class Agents transparent
2630
+ ```
2631
+
2632
+ ### Hierarchical Process
2633
+
2634
+ Uses a manager agent to coordinate task execution and agent assignments.
2635
+
2636
+ ```mermaid
2637
+ graph TB
2638
+ Input[Input] --> Manager
2639
+
2640
+ subgraph Agents
2641
+ Manager[Manager Agent]
2642
+
2643
+ subgraph Workers
2644
+ direction LR
2645
+ W1[Worker 1]
2646
+ W2[Worker 2]
2647
+ W3[Worker 3]
2648
+ end
2649
+
2650
+ Manager --> W1
2651
+ Manager --> W2
2652
+ Manager --> W3
2653
+ end
2654
+
2655
+ W1 --> Manager
2656
+ W2 --> Manager
2657
+ W3 --> Manager
2658
+ Manager --> Output[Output]
2659
+
2660
+ classDef input fill:#8B0000,stroke:#7C90A0,color:#fff
2661
+ classDef process fill:#189AB4,stroke:#7C90A0,color:#fff
2662
+ classDef transparent fill:none,stroke:none
2663
+
2664
+ class Input,Output input
2665
+ class Manager,W1,W2,W3 process
2666
+ class Agents,Workers transparent
2667
+ ```
2668
+
2669
+ ### Workflow Process
2670
+
2671
+ Advanced process type supporting complex task relationships and conditional execution.
2672
+
2673
+ ```mermaid
2674
+ graph LR
2675
+ Input[Input] --> Start
2676
+
2677
+ subgraph Workflow
2678
+ direction LR
2679
+ Start[Start] --> C1{Condition}
2680
+ C1 --> |Yes| A1[Agent 1]
2681
+ C1 --> |No| A2[Agent 2]
2682
+ A1 --> Join
2683
+ A2 --> Join
2684
+ Join --> A3[Agent 3]
2685
+ end
2686
+
2687
+ A3 --> Output[Output]
2688
+
2689
+ classDef input fill:#8B0000,stroke:#7C90A0,color:#fff
2690
+ classDef process fill:#189AB4,stroke:#7C90A0,color:#fff
2691
+ classDef decision fill:#2E8B57,stroke:#7C90A0,color:#fff
2692
+ classDef transparent fill:none,stroke:none
2693
+
2694
+ class Input,Output input
2695
+ class Start,A1,A2,A3,Join process
2696
+ class C1 decision
2697
+ class Workflow transparent
2698
+ ```
2699
+
2700
+ #### Agentic Routing Workflow
2701
+
2702
+ Create AI agents that can dynamically route tasks to specialized LLM instances.
2703
+
2704
+ ```mermaid
2705
+ flowchart LR
2706
+ In[In] --> Router[LLM Call Router]
2707
+ Router --> LLM1[LLM Call 1]
2708
+ Router --> LLM2[LLM Call 2]
2709
+ Router --> LLM3[LLM Call 3]
2710
+ LLM1 --> Out[Out]
2711
+ LLM2 --> Out
2712
+ LLM3 --> Out
2713
+
2714
+ style In fill:#8B0000,color:#fff
2715
+ style Router fill:#2E8B57,color:#fff
2716
+ style LLM1 fill:#2E8B57,color:#fff
2717
+ style LLM2 fill:#2E8B57,color:#fff
2718
+ style LLM3 fill:#2E8B57,color:#fff
2719
+ style Out fill:#8B0000,color:#fff
2720
+ ```
2721
+
2722
+ #### Agentic Orchestrator Worker
2723
+
2724
+ Create AI agents that orchestrate and distribute tasks among specialized workers.
2725
+
2726
+ ```mermaid
2727
+ flowchart LR
2728
+ In[In] --> Router[LLM Call Router]
2729
+ Router --> LLM1[LLM Call 1]
2730
+ Router --> LLM2[LLM Call 2]
2731
+ Router --> LLM3[LLM Call 3]
2732
+ LLM1 --> Synthesizer[Synthesizer]
2733
+ LLM2 --> Synthesizer
2734
+ LLM3 --> Synthesizer
2735
+ Synthesizer --> Out[Out]
2736
+
2737
+ style In fill:#8B0000,color:#fff
2738
+ style Router fill:#2E8B57,color:#fff
2739
+ style LLM1 fill:#2E8B57,color:#fff
2740
+ style LLM2 fill:#2E8B57,color:#fff
2741
+ style LLM3 fill:#2E8B57,color:#fff
2742
+ style Synthesizer fill:#2E8B57,color:#fff
2743
+ style Out fill:#8B0000,color:#fff
2744
+ ```
2745
+
2746
+ #### Agentic Autonomous Workflow
2747
+
2748
+ Create AI agents that can autonomously monitor, act, and adapt based on environment feedback.
2749
+
2750
+ ```mermaid
2751
+ flowchart LR
2752
+ Human[Human] <--> LLM[LLM Call]
2753
+ LLM -->|ACTION| Environment[Environment]
2754
+ Environment -->|FEEDBACK| LLM
2755
+ LLM --> Stop[Stop]
2756
+
2757
+ style Human fill:#8B0000,color:#fff
2758
+ style LLM fill:#2E8B57,color:#fff
2759
+ style Environment fill:#8B0000,color:#fff
2760
+ style Stop fill:#333,color:#fff
2761
+ ```
2762
+
2763
+ #### Agentic Parallelization
2764
+
2765
+ Create AI agents that can execute tasks in parallel for improved performance.
2766
+
2767
+ ```mermaid
2768
+ flowchart LR
2769
+ In[In] --> LLM2[LLM Call 2]
2770
+ In --> LLM1[LLM Call 1]
2771
+ In --> LLM3[LLM Call 3]
2772
+ LLM1 --> Aggregator[Aggregator]
2773
+ LLM2 --> Aggregator
2774
+ LLM3 --> Aggregator
2775
+ Aggregator --> Out[Out]
2776
+
2777
+ style In fill:#8B0000,color:#fff
2778
+ style LLM1 fill:#2E8B57,color:#fff
2779
+ style LLM2 fill:#2E8B57,color:#fff
2780
+ style LLM3 fill:#2E8B57,color:#fff
2781
+ style Aggregator fill:#fff,color:#000
2782
+ style Out fill:#8B0000,color:#fff
2783
+ ```
2784
+
2785
+ #### Agentic Prompt Chaining
2786
+
2787
+ Create AI agents with sequential prompt chaining for complex workflows.
2788
+
2789
+ ```mermaid
2790
+ flowchart LR
2791
+ In[In] --> LLM1[LLM Call 1] --> Gate{Gate}
2792
+ Gate -->|Pass| LLM2[LLM Call 2] -->|Output 2| LLM3[LLM Call 3] --> Out[Out]
2793
+ Gate -->|Fail| Exit[Exit]
2794
+
2795
+ style In fill:#8B0000,color:#fff
2796
+ style LLM1 fill:#2E8B57,color:#fff
2797
+ style LLM2 fill:#2E8B57,color:#fff
2798
+ style LLM3 fill:#2E8B57,color:#fff
2799
+ style Out fill:#8B0000,color:#fff
2800
+ style Exit fill:#8B0000,color:#fff
2801
+ ```
2802
+
2803
+ #### Agentic Evaluator Optimizer
2804
+
2805
+ Create AI agents that can generate and optimize solutions through iterative feedback.
2806
+
2807
+ ```mermaid
2808
+ flowchart LR
2809
+ In[In] --> Generator[LLM Call Generator]
2810
+ Generator -->|SOLUTION| Evaluator[LLM Call Evaluator] -->|ACCEPTED| Out[Out]
2811
+ Evaluator -->|REJECTED + FEEDBACK| Generator
2812
+
2813
+ style In fill:#8B0000,color:#fff
2814
+ style Generator fill:#2E8B57,color:#fff
2815
+ style Evaluator fill:#2E8B57,color:#fff
2816
+ style Out fill:#8B0000,color:#fff
2817
+ ```
2818
+
2819
+ #### Repetitive Agents
2820
+
2821
+ Create AI agents that can efficiently handle repetitive tasks through automated loops.
2822
+
2823
+ ```mermaid
2824
+ flowchart LR
2825
+ In[Input] --> LoopAgent[("Looping Agent")]
2826
+ LoopAgent --> Task[Task]
2827
+ Task --> |Next iteration| LoopAgent
2828
+ Task --> |Done| Out[Output]
2829
+
2830
+ style In fill:#8B0000,color:#fff
2831
+ style LoopAgent fill:#2E8B57,color:#fff,shape:circle
2832
+ style Task fill:#2E8B57,color:#fff
2833
+ style Out fill:#8B0000,color:#fff
2834
+ ```
2835
+
2836
+ </details>
2837
+
2838
+ ---
2839
+
2840
+ ## 🔧 Configuration & Integration
2841
+
2842
+ ### Ollama Integration
2843
+
2844
+ ```bash
2845
+ export OPENAI_BASE_URL=http://localhost:11434/v1
2846
+ ```
2847
+
2848
+ ### Groq Integration
2849
+
2850
+ Replace xxxx with Groq API KEY:
2851
+
2852
+ ```bash
2853
+ export OPENAI_API_KEY=xxxxxxxxxxx
2854
+ export OPENAI_BASE_URL=https://api.groq.com/openai/v1
2855
+ ```
2856
+
2857
+ ### 100+ Models Support
2858
+
2859
+ XoneAI supports 100+ LLM models from various providers. Visit our [models documentation](https://docs.xone.ai/models/) for the complete list.
2860
+
2861
+ <div align="center">
2862
+ <a href="https://docs.xone.ai/models">
2863
+ <p align="center">
2864
+ <img src="https://img.shields.io/badge/📚_Models_Documentation-Visit_docs.xone.ai-blue?style=for-the-badge&logo=bookstack&logoColor=white" alt="Models Documentation" />
2865
+ </p>
2866
+ </a>
2867
+ </div>
2868
+
2869
+ ---
2870
+
2871
+ ## 📋 Agents Playbook
2872
+
2873
+ ### Simple Playbook Example
2874
+
2875
+ Create `agents.yaml` file and add the code below:
2876
+
2877
+ ```yaml
2878
+ framework: xoneai
2879
+ topic: Artificial Intelligence
2880
+ agents: # Canonical: use 'agents' instead of 'roles'
2881
+ screenwriter:
2882
+ instructions: "Skilled in crafting scripts with engaging dialogue about {topic}." # Canonical: use 'instructions' instead of 'backstory'
2883
+ goal: Create scripts from concepts.
2884
+ role: Screenwriter
2885
+ tasks:
2886
+ scriptwriting_task:
2887
+ description: "Develop scripts with compelling characters and dialogue about {topic}."
2888
+ expected_output: "Complete script ready for production."
2889
+ ```
2890
+
2891
+ *To run the playbook:*
2892
+ ```bash
2893
+ xoneai agents.yaml
2894
+ ```
2895
+
2896
+ ---
2897
+
2898
+ ## 🛠️ Custom Tools / Create Plugins
2899
+
2900
+ XoneAI supports multiple ways to create and integrate custom tools (plugins) into your agents.
2901
+
2902
+ ### Using `@tool` Decorator
2903
+
2904
+ ```python
2905
+ from xoneaiagents import Agent, tool
2906
+
2907
+ @tool
2908
+ def search(query: str) -> str:
2909
+ """Search the web for information."""
2910
+ return f"Results for: {query}"
2911
+
2912
+ @tool
2913
+ def calculate(expression: str) -> float:
2914
+ """Evaluate a math expression."""
2915
+ return eval(expression)
2916
+
2917
+ agent = Agent(
2918
+ instructions="You are a helpful assistant",
2919
+ tools=[search, calculate]
2920
+ )
2921
+ agent.start("Search for AI news and calculate 15*4")
2922
+ ```
2923
+
2924
+ ### Using `BaseTool` Class
2925
+
2926
+ ```python
2927
+ from xoneaiagents import Agent, BaseTool
2928
+
2929
+ class WeatherTool(BaseTool):
2930
+ name = "weather"
2931
+ description = "Get current weather for a location"
2932
+
2933
+ def run(self, location: str) -> str:
2934
+ return f"Weather in {location}: 72°F, Sunny"
2935
+
2936
+ agent = Agent(
2937
+ instructions="You are a weather assistant",
2938
+ tools=[WeatherTool()]
2939
+ )
2940
+ agent.start("What's the weather in Paris?")
2941
+ ```
2942
+
2943
+ ### Creating a Tool Package (pip installable)
2944
+
2945
+ ```toml
2946
+ # pyproject.toml
2947
+ [project]
2948
+ name = "my-xoneai-tools"
2949
+ version = "1.0.0"
2950
+ dependencies = ["xoneaiagents"]
2951
+
2952
+ [project.entry-points."xoneaiagents.tools"]
2953
+ my_tool = "my_package:MyTool"
2954
+ ```
2955
+
2956
+ ```python
2957
+ # my_package/__init__.py
2958
+ from xoneaiagents import BaseTool
2959
+
2960
+ class MyTool(BaseTool):
2961
+ name = "my_tool"
2962
+ description = "My custom tool"
2963
+
2964
+ def run(self, param: str) -> str:
2965
+ return f"Result: {param}"
2966
+ ```
2967
+
2968
+ After `pip install`, tools are auto-discovered:
2969
+ ```python
2970
+ agent = Agent(tools=["my_tool"]) # Works automatically!
2971
+ ```
2972
+
2973
+ ---
2974
+
2975
+ ## 🧠 Memory & Context
2976
+
2977
+ XoneAI provides zero-dependency persistent memory for agents. For detailed examples, see [section 6. Agent Memory](#6-agent-memory-zero-dependencies) in the Python Code Examples.
2978
+
2979
+ ---
2980
+
2981
+ ## 📚 Knowledge & Retrieval (RAG)
2982
+
2983
+ XoneAI provides a complete knowledge stack for building RAG applications with multiple vector stores, retrieval strategies, rerankers, and query modes.
2984
+
2985
+ ### RAG Quickstart (Agent-first)
2986
+
2987
+ ```python
2988
+ from xoneaiagents import Agent
2989
+ from xoneaiagents.rag.models import RetrievalStrategy
2990
+
2991
+ # Agent with RAG - simplest approach
2992
+ agent = Agent(
2993
+ name="Research Assistant",
2994
+ knowledge=["docs/manual.pdf", "data/faq.txt"],
2995
+ knowledge_config={"vector_store": {"provider": "chroma"}},
2996
+ rag_config={
2997
+ "include_citations": True,
2998
+ "retrieval_strategy": RetrievalStrategy.HYBRID, # Dense + BM25
2999
+ "rerank": True,
3000
+ }
3001
+ )
3002
+
3003
+ # Query with citations
3004
+ result = agent.rag_query("How do I authenticate?")
3005
+ print(result.answer)
3006
+ for citation in result.citations:
3007
+ print(f" [{citation.id}] {citation.source}")
3008
+ ```
3009
+
3010
+ ### RAG CLI Commands
3011
+
3012
+ | Command | Description |
3013
+ |---------|-------------|
3014
+ | `xoneai rag query "<question>"` | One-shot question answering with citations |
3015
+ | `xoneai rag chat` | Interactive RAG chat session |
3016
+ | `xoneai rag serve` | Start RAG as a microservice API |
3017
+ | `xoneai rag eval <test_file>` | Evaluate RAG retrieval quality |
3018
+
3019
+ ### RAG CLI Examples
3020
+
3021
+ ```bash
3022
+ # Query with hybrid retrieval (dense + BM25 keyword search)
3023
+ xoneai rag query "What are the key findings?" --hybrid
3024
+
3025
+ # Query with hybrid + reranking for best quality
3026
+ xoneai rag query "Summarize conclusions" --hybrid --rerank
3027
+
3028
+ # Interactive chat with hybrid retrieval
3029
+ xoneai rag chat --collection research --hybrid --rerank
3030
+
3031
+ # Start API server with OpenAI-compatible endpoint
3032
+ xoneai rag serve --hybrid --rerank --openai-compat --port 8080
3033
+
3034
+ # Query with profiling
3035
+ xoneai rag query "Summary?" --profile --profile-out ./profile.json
3036
+ ```
3037
+
3038
+ ### Knowledge CLI Commands
3039
+
3040
+ | Command | Description |
3041
+ |---------|-------------|
3042
+ | `xoneai knowledge index <sources>` | Index documents into knowledge base |
3043
+ | `xoneai knowledge search <query>` | Search knowledge base (no LLM generation) |
3044
+ | `xoneai knowledge list` | List indexed documents |
3045
+
3046
+ ### Knowledge CLI Examples
3047
+
3048
+ ```bash
3049
+ # Index documents
3050
+ xoneai knowledge index ./docs/ --collection myproject
3051
+
3052
+ # Search with hybrid retrieval
3053
+ xoneai knowledge search "authentication" --hybrid --collection myproject
3054
+
3055
+ # Index with profiling
3056
+ xoneai knowledge index ./data --profile --profile-out ./profile.json
3057
+ ```
3058
+
3059
+ ### Knowledge vs RAG vs AutoRagAgent
3060
+
3061
+ - **Knowledge** is the indexing and retrieval substrate - use for indexing and raw search
3062
+ - **RAG** orchestrates on top - use for question answering with LLM-generated responses and citations
3063
+ - **AutoRagAgent** wraps an Agent with automatic retrieval decision - use when you want the agent to decide when to retrieve
3064
+ - All share the same underlying index
3065
+
3066
+ ### AutoRagAgent (Automatic RAG)
3067
+
3068
+ AutoRagAgent automatically decides when to retrieve context from knowledge bases vs direct chat, based on query heuristics.
3069
+
3070
+ ```python
3071
+ from xoneaiagents import Agent, AutoRagAgent
3072
+
3073
+ # Create agent with knowledge
3074
+ agent = Agent(
3075
+ name="Research Assistant",
3076
+ knowledge=["docs/manual.pdf"],
3077
+ user_id="user123", # Required for RAG retrieval
3078
+ )
3079
+
3080
+ # Wrap with AutoRagAgent
3081
+ auto_rag = AutoRagAgent(
3082
+ agent=agent,
3083
+ retrieval_policy="auto", # auto, always, never
3084
+ top_k=5,
3085
+ hybrid=True,
3086
+ rerank=True,
3087
+ )
3088
+
3089
+ # Auto-decides: retrieves for questions, skips for greetings
3090
+ result = auto_rag.chat("What are the key findings?") # Retrieves
3091
+ result = auto_rag.chat("Hello!") # Skips retrieval
3092
+
3093
+ # Force retrieval or skip per-call
3094
+ result = auto_rag.chat("Hi", force_retrieval=True)
3095
+ result = auto_rag.chat("Summary?", skip_retrieval=True)
3096
+ ```
3097
+
3098
+ **CLI Usage:**
3099
+ ```bash
3100
+ # Enable auto-rag with default policy (auto)
3101
+ xoneai --auto-rag "What are the key findings?"
3102
+
3103
+ # Always retrieve
3104
+ xoneai --auto-rag --rag-policy always "Tell me about X"
3105
+
3106
+ # With hybrid retrieval and reranking
3107
+ xoneai --auto-rag --rag-hybrid --rag-rerank "Summarize the document"
3108
+ ```
3109
+
3110
+ ### Configuration Precedence
3111
+
3112
+ Settings are applied in this order (highest priority first):
3113
+ 1. **CLI flags** - `--hybrid`, `--rerank`, `--top-k`
3114
+ 2. **Environment variables** - `XONEAI_HYBRID=true`
3115
+ 3. **Config file** - YAML configuration (`--config`)
3116
+ 4. **Defaults**
3117
+
3118
+ ```bash
3119
+ # Environment variables
3120
+ export XONEAI_HYBRID=true
3121
+ export XONEAI_RERANK=true
3122
+ export XONEAI_TOP_K=10
3123
+ ```
3124
+
3125
+ ### Lightweight Installs
3126
+
3127
+ ```bash
3128
+ # Base install (minimal, fast imports)
3129
+ pip install xoneaiagents
3130
+
3131
+ # With RAG API server support
3132
+ pip install "xoneai[rag-api]"
3133
+ ```
3134
+
3135
+ ### Live Tests (Real API Keys)
3136
+
3137
+ Run integration tests with real API keys:
3138
+
3139
+ ```bash
3140
+ # Enable live tests
3141
+ export XONEAI_LIVE_TESTS=1
3142
+ export OPENAI_API_KEY="your-key"
3143
+
3144
+ # Run live tests
3145
+ pytest -m live tests/integration/
3146
+ ```
3147
+
3148
+ ### Knowledge Stack Features Table
3149
+
3150
+ | Feature | Description | SDK Docs | CLI Docs |
3151
+ |---------|-------------|----------|----------|
3152
+ | **Hybrid Retrieval** | Dense vectors + BM25 keyword search with RRF fusion | [SDK](/docs/rag/module) | [CLI](/docs/cli/rag) |
3153
+ | **Reranking** | LLM, Cross-Encoder, Cohere rerankers | [SDK](/docs/rag/module) | [CLI](/docs/cli/rag) |
3154
+ | **RAG Serve** | Microservice API with OpenAI-compatible mode | [SDK](/docs/rag/module) | [CLI](/docs/cli/rag) |
3155
+ | **Vector Stores** | ChromaDB, Pinecone, Qdrant, Weaviate, In-Memory | [SDK](/docs/sdk/xoneaiagents/knowledge/protocols) | [CLI](/docs/cli/knowledge) |
3156
+ | **Data Readers** | Load PDF, Markdown, Text, HTML, URLs | [SDK](/docs/sdk/xoneaiagents/knowledge/protocols) | [CLI](/docs/cli/knowledge) |
3157
+ | **Profiling** | Performance profiling with `--profile` flag | [SDK](/docs/features/profiling) | [CLI](/docs/cli/rag) |
3158
+
3159
+ ---
3160
+
3161
+ ## 🔬 Advanced Features
3162
+
3163
+ ### Research & Intelligence
3164
+
3165
+ - 🔬 **Deep Research Agents** - OpenAI & Gemini support for automated research
3166
+ - 🔄 **Query Rewriter Agent** - HyDE, Step-back, Multi-query strategies for RAG optimization
3167
+ - 🌐 **Native Web Search** - Real-time search via OpenAI, Gemini, Anthropic, xAI, Perplexity
3168
+ - 📥 **Web Fetch** - Retrieve full content from URLs (Anthropic)
3169
+ - 📝 **Prompt Expander Agent** - Expand short prompts into detailed instructions
3170
+
3171
+ ### Memory & Caching
3172
+
3173
+ - 💾 **Prompt Caching** - Reduce costs & latency (OpenAI, Anthropic, Bedrock, Deepseek)
3174
+ - 🧠 **Claude Memory Tool** - Persistent cross-conversation memory (Anthropic Beta)
3175
+ - 💾 **File-Based Memory** - Zero-dependency persistent memory for all agents
3176
+ - 🔍 **Built-in Search Tools** - Tavily, You.com, Exa for web search, news, content extraction
3177
+
3178
+ ### Planning & Workflows
3179
+
3180
+ - 📋 **Planning Mode** - Plan before execution for agents & multi-agent systems
3181
+ - 🔧 **Planning Tools** - Research with tools during planning phase
3182
+ - 🧠 **Planning Reasoning** - Chain-of-thought planning for complex tasks
3183
+ - ⛓️ **Prompt Chaining** - Sequential prompt workflows with conditional gates
3184
+ - 🔍 **Evaluator Optimiser** - Generate and optimize through iterative feedback
3185
+ - 👷 **Orchestrator Workers** - Distribute tasks among specialised workers
3186
+ - ⚡ **Parallelisation** - Execute tasks in parallel for improved performance
3187
+ - 🔁 **Repetitive Agents** - Handle repetitive tasks through automated loops
3188
+ - 🤖 **Autonomous Workflow** - Monitor, act, adapt based on environment feedback
3189
+
3190
+ ### Specialised Agents
3191
+
3192
+ - 🖼️ **Image Generation Agent** - Create images from text descriptions
3193
+ - 📷 **Image to Text Agent** - Extract text and descriptions from images
3194
+ - 🎬 **Video Agent** - Analyse and process video content
3195
+ - 📊 **Data Analyst Agent** - Analyse data and generate insights
3196
+ - 💰 **Finance Agent** - Financial analysis and recommendations
3197
+ - 🛒 **Shopping Agent** - Price comparison and shopping assistance
3198
+ - ⭐ **Recommendation Agent** - Personalised recommendations
3199
+ - 📖 **Wikipedia Agent** - Search and extract Wikipedia information
3200
+ - 💻 **Programming Agent** - Code development and analysis
3201
+ - 📝 **Markdown Agent** - Generate and format Markdown content
3202
+ - 🔀 **Model Router** - Smart model selection based on task complexity
3203
+
3204
+ ### MCP Protocol
3205
+
3206
+ - 🔌 **MCP Transports** - stdio, Streamable HTTP, WebSocket, SSE (Protocol 2025-11-25)
3207
+ - 🌐 **WebSocket MCP** - Real-time bidirectional connections with auto-reconnect
3208
+ - 🔐 **MCP Security** - Origin validation, DNS rebinding prevention, secure sessions
3209
+ - 🔄 **MCP Resumability** - SSE stream recovery via Last-Event-ID
3210
+
3211
+ ### A2A & A2UI Protocols
3212
+
3213
+ - 🔗 **A2A Protocol** - Agent-to-Agent communication for inter-agent collaboration
3214
+ - 🖼️ **A2UI Protocol** - Agent-to-User Interface for generating rich UIs from agents
3215
+ - 📋 **UI Templates** - ChatTemplate, ListTemplate, FormTemplate, DashboardTemplate
3216
+ - 🔧 **Surface Builder** - Fluent API for building declarative UIs
3217
+
3218
+ ### Safety & Control
3219
+
3220
+ - 🤝 **Agent Handoffs** - Transfer context between specialised agents
3221
+ - 🛡️ **Guardrails** - Input/output validation and safety checks
3222
+ - ✅ **Human Approval** - Require human confirmation for critical actions
3223
+ - 🔐 **Tool Approval CLI** - `--trust` (auto-approve all) and `--approve-level` (risk-based approval)
3224
+ - 💬 **Sessions Management** - Isolated conversation contexts
3225
+ - 🔄 **Stateful Agents** - Maintain state across interactions
3226
+
3227
+ ### Developer Tools
3228
+
3229
+ - ⚡ **Fast Context** - Rapid parallel code search (10-20x faster)
3230
+ - 📜 **Rules & Instructions** - Auto-discover CLAUDE.md, AGENTS.md, GEMINI.md
3231
+ - 🪝 **Hooks** - Pre/post operation hooks for custom logic
3232
+ - 📈 **Telemetry** - Track agent performance and usage
3233
+ - 📹 **Camera Integration** - Capture and analyse camera input
3234
+
3235
+ ### Other Features
3236
+
3237
+ - 🔄 **CrewAI & AG2 Integration** - Use CrewAI or AG2 (Formerly AutoGen) Framework
3238
+ - 💻 **Codebase Chat** - Chat with entire codebase
3239
+ - 🎨 **Interactive UIs** - Multiple interactive interfaces
3240
+ - 📄 **YAML Configuration** - YAML-based agent and workflow configuration
3241
+ - 🛠️ **Custom Tools** - Easy custom tool integration
3242
+ - 🔍 **Internet Search** - Multiple providers (Tavily, You.com, Exa, DuckDuckGo, Crawl4AI)
3243
+ - 🖼️ **VLM Support** - Vision Language Model support
3244
+ - 🎙️ **Voice Interaction** - Real-time voice interaction
3245
+
3246
+ ---
3247
+
3248
+ ## 💾 Persistence (Databases)
3249
+
3250
+ Enable automatic conversation persistence with 2 lines of code:
3251
+
3252
+ ```python
3253
+ from xoneaiagents import Agent, db
3254
+
3255
+ agent = Agent(
3256
+ name="Assistant",
3257
+ db=db(database_url="postgresql://localhost/mydb"), # db(...) shortcut
3258
+ session_id="my-session" # Optional: defaults to per-hour ID (YYYYMMDDHH)
3259
+ )
3260
+ agent.chat("Hello!") # Auto-persists messages, runs, traces
3261
+ ```
3262
+
3263
+ ### Persistence CLI Commands
3264
+
3265
+ | Command | Description |
3266
+ |---------|-------------|
3267
+ | `xoneai persistence doctor` | Validate DB connectivity |
3268
+ | `xoneai persistence run` | Run agent with persistence |
3269
+ | `xoneai persistence resume` | Resume existing session |
3270
+ | `xoneai persistence export` | Export session to JSONL |
3271
+ | `xoneai persistence import` | Import session from JSONL |
3272
+ | `xoneai persistence migrate` | Apply schema migrations |
3273
+ | `xoneai persistence status` | Show schema status |
3274
+
3275
+ > **Note:** See [Knowledge & Retrieval (RAG)](#-knowledge--retrieval-rag) for complete Knowledge CLI documentation.
3276
+
3277
+ ### Databases Table
3278
+
3279
+ | Database | Store Type | Install | Example | Docs |
3280
+ |----------|------------|---------|---------|------|
3281
+ | PostgreSQL | Conversation | `pip install "xoneai[tools]"` | [simple_db_agent.py](examples/persistence/simple_db_agent.py) | [docs](https://docs.xone.ai/docs/databases/postgres) |
3282
+ | MySQL | Conversation | `pip install "xoneai[tools]"` | - | [docs](https://docs.xone.ai/docs/databases/overview) |
3283
+ | SQLite | Conversation | `pip install "xoneai[tools]"` | - | [docs](https://docs.xone.ai/docs/databases/overview) |
3284
+ | SingleStore | Conversation | `pip install "xoneai[tools]"` | - | [docs](https://docs.xone.ai/docs/databases/overview) |
3285
+ | Supabase | Conversation | `pip install "xoneai[tools]"` | - | [docs](https://docs.xone.ai/docs/databases/overview) |
3286
+ | SurrealDB | Conversation | `pip install "xoneai[tools]"` | - | [docs](https://docs.xone.ai/docs/databases/overview) |
3287
+ | Qdrant | Knowledge | `pip install "xoneai[tools]"` | [knowledge_qdrant.py](examples/persistence/knowledge_qdrant.py) | [docs](https://docs.xone.ai/docs/databases/qdrant) |
3288
+ | ChromaDB | Knowledge | `pip install "xoneai[tools]"` | - | [docs](https://docs.xone.ai/docs/databases/overview) |
3289
+ | Pinecone | Knowledge | `pip install pinecone` | [pinecone_wow.py](examples/vector/pinecone_wow.py) | [docs](https://docs.xone.ai/docs/databases/pinecone) |
3290
+ | Weaviate | Knowledge | `pip install weaviate-client` | [weaviate_wow.py](examples/vector/weaviate_wow.py) | [docs](https://docs.xone.ai/docs/databases/weaviate) |
3291
+ | LanceDB | Knowledge | `pip install lancedb` | [lancedb_real_wow.py](examples/vector/lancedb_real_wow.py) | [docs](https://docs.xone.ai/docs/databases/lancedb) |
3292
+ | Milvus | Knowledge | `pip install "xoneai[tools]"` | - | [docs](https://docs.xone.ai/docs/databases/overview) |
3293
+ | PGVector | Knowledge | `pip install psycopg2-binary` | [pgvector_real_wow.py](examples/vector/pgvector_real_wow.py) | [docs](https://docs.xone.ai/docs/databases/pgvector) |
3294
+ | Redis Vector | Knowledge | `pip install "xoneai[tools]"` | - | [docs](https://docs.xone.ai/docs/databases/overview) |
3295
+ | Cassandra | Knowledge | `pip install "xoneai[tools]"` | - | [docs](https://docs.xone.ai/docs/databases/overview) |
3296
+ | ClickHouse | Knowledge | `pip install "xoneai[tools]"` | - | [docs](https://docs.xone.ai/docs/databases/overview) |
3297
+ | Redis | State | `pip install "xoneai[tools]"` | [state_redis.py](examples/persistence/state_redis.py) | [docs](https://docs.xone.ai/docs/databases/redis) |
3298
+ | MongoDB | State | `pip install "xoneai[tools]"` | - | [docs](https://docs.xone.ai/docs/databases/overview) |
3299
+ | DynamoDB | State | `pip install "xoneai[tools]"` | - | [docs](https://docs.xone.ai/docs/databases/overview) |
3300
+ | Firestore | State | `pip install "xoneai[tools]"` | - | [docs](https://docs.xone.ai/docs/databases/overview) |
3301
+ | Upstash | State | `pip install "xoneai[tools]"` | - | [docs](https://docs.xone.ai/docs/databases/overview) |
3302
+ | Memory | State | `pip install "xoneai[tools]"` | - | [docs](https://docs.xone.ai/docs/databases/overview) |
3303
+
3304
+ ---
3305
+
3306
+ ## 🔧 Tools Table
3307
+
3308
+ Install all tools with: `pip install "xoneai[tools]"`
3309
+
3310
+ | Tool | Category | Import | Docs |
3311
+ |------|----------|--------|------|
3312
+ | Tavily | Web Search | `from xoneai_tools import TavilyTool` | [docs](https://docs.xone.ai/docs/tools/external/tavily) |
3313
+ | DuckDuckGo | Web Search | `from xoneai_tools import DuckDuckGoTool` | [docs](https://docs.xone.ai/docs/tools/external/duckduckgo) |
3314
+ | Exa | Web Search | `from xoneai_tools import ExaTool` | [docs](https://docs.xone.ai/docs/tools/external/exa) |
3315
+ | Serper | Web Search | `from xoneai_tools import SerperTool` | [docs](https://docs.xone.ai/docs/tools/external/serper) |
3316
+ | Jina | Web Reader | `from xoneai_tools import JinaTool` | [docs](https://docs.xone.ai/docs/tools/external/jina) |
3317
+ | Firecrawl | Web Scraping | `from xoneai_tools import FirecrawlTool` | [docs](https://docs.xone.ai/docs/tools/external/firecrawl) |
3318
+ | Crawl4AI | Web Scraping | `from xoneai_tools import Crawl4AITool` | [docs](https://docs.xone.ai/docs/tools/external/crawl4ai) |
3319
+ | Wikipedia | Knowledge | `from xoneai_tools import WikipediaTool` | [docs](https://docs.xone.ai/docs/tools/external/wikipedia) |
3320
+ | ArXiv | Research | `from xoneai_tools import ArxivTool` | [docs](https://docs.xone.ai/docs/tools/external/arxiv) |
3321
+ | HackerNews | News | `from xoneai_tools import HackerNewsTool` | [docs](https://docs.xone.ai/docs/tools/external/hackernews) |
3322
+ | YouTube | Media | `from xoneai_tools import YouTubeTool` | [docs](https://docs.xone.ai/docs/tools/external/youtube) |
3323
+ | Weather | Data | `from xoneai_tools import WeatherTool` | [docs](https://docs.xone.ai/docs/tools/external/weather) |
3324
+ | PostgreSQL | Database | `from xoneai_tools import PostgresTool` | [docs](https://docs.xone.ai/docs/tools/external/postgres) |
3325
+ | MySQL | Database | `from xoneai_tools import MySQLTool` | [docs](https://docs.xone.ai/docs/tools/external/mysql) |
3326
+ | SQLite | Database | `from xoneai_tools import SQLiteTool` | [docs](https://docs.xone.ai/docs/tools/external/sqlite) |
3327
+ | MongoDB | Database | `from xoneai_tools import MongoDBTool` | [docs](https://docs.xone.ai/docs/tools/external/mongodb) |
3328
+ | Redis | Database | `from xoneai_tools import RedisTool` | [docs](https://docs.xone.ai/docs/tools/external/redis) |
3329
+ | Qdrant | Vector DB | `from xoneai_tools import QdrantTool` | [docs](https://docs.xone.ai/docs/tools/external/qdrant) |
3330
+ | GitHub | DevOps | `from xoneai_tools import GitHubTool` | [docs](https://docs.xone.ai/docs/tools/external/github) |
3331
+ | Slack | Communication | `from xoneai_tools import SlackTool` | [docs](https://docs.xone.ai/docs/tools/external/slack) |
3332
+ | Discord | Communication | `from xoneai_tools import DiscordTool` | [docs](https://docs.xone.ai/docs/tools/external/discord) |
3333
+ | Telegram | Communication | `from xoneai_tools import TelegramTool` | [docs](https://docs.xone.ai/docs/tools/external/telegram) |
3334
+ | Email | Communication | `from xoneai_tools import EmailTool` | [docs](https://docs.xone.ai/docs/tools/external/email) |
3335
+ | Notion | Productivity | `from xoneai_tools import NotionTool` | [docs](https://docs.xone.ai/docs/tools/external/notion) |
3336
+ | File | File System | `from xoneai_tools import FileTool` | [docs](https://docs.xone.ai/docs/tools/external/file) |
3337
+ | Shell | System | `from xoneai_tools import ShellTool` | [docs](https://docs.xone.ai/docs/tools/external/shell) |
3338
+ | Python | Code | `from xoneai_tools import PythonTool` | [docs](https://docs.xone.ai/docs/tools/external/python) |
3339
+ | JSON | Data | `from xoneai_tools import JSONTool` | [docs](https://docs.xone.ai/docs/tools/external/json) |
3340
+ | CSV | Data | `from xoneai_tools import CSVTool` | [docs](https://docs.xone.ai/docs/tools/external/csv) |
3341
+ | Calculator | Math | `from xoneai_tools import CalculatorTool` | [docs](https://docs.xone.ai/docs/tools/external/calculator) |
3342
+
3343
+ > See [full tools documentation](https://docs.xone.ai/docs/tools/tools) for all 100+ available tools.
3344
+
3345
+ ---
3346
+
3347
+ ## 🎓 Video Tutorials
3348
+
3349
+ Learn XoneAI through our comprehensive video series:
3350
+
3351
+ <details>
3352
+ <summary><strong>View all 22 video tutorials</strong></summary>
3353
+
3354
+ | Topic | Video |
3355
+ |-------|--------|
3356
+ | AI Agents with Self Reflection | [![Self Reflection](https://img.youtube.com/vi/vLXobEN2Vc8/0.jpg)](https://www.youtube.com/watch?v=vLXobEN2Vc8) |
3357
+ | Reasoning Data Generating Agent | [![Reasoning Data](https://img.youtube.com/vi/fUT332Y2zA8/0.jpg)](https://www.youtube.com/watch?v=fUT332Y2zA8) |
3358
+ | AI Agents with Reasoning | [![Reasoning](https://img.youtube.com/vi/KNDVWGN3TpM/0.jpg)](https://www.youtube.com/watch?v=KNDVWGN3TpM) |
3359
+ | Multimodal AI Agents | [![Multimodal](https://img.youtube.com/vi/hjAWmUT1qqY/0.jpg)](https://www.youtube.com/watch?v=hjAWmUT1qqY) |
3360
+ | AI Agents Workflow | [![Workflow](https://img.youtube.com/vi/yWTH44QPl2A/0.jpg)](https://www.youtube.com/watch?v=yWTH44QPl2A) |
3361
+ | Async AI Agents | [![Async](https://img.youtube.com/vi/VhVQfgo00LE/0.jpg)](https://www.youtube.com/watch?v=VhVQfgo00LE) |
3362
+ | Mini AI Agents | [![Mini](https://img.youtube.com/vi/OkvYp5aAGSg/0.jpg)](https://www.youtube.com/watch?v=OkvYp5aAGSg) |
3363
+ | AI Agents with Memory | [![Memory](https://img.youtube.com/vi/1hVfVxvPnnQ/0.jpg)](https://www.youtube.com/watch?v=1hVfVxvPnnQ) |
3364
+ | Repetitive Agents | [![Repetitive](https://img.youtube.com/vi/dAYGxsjDOPg/0.jpg)](https://www.youtube.com/watch?v=dAYGxsjDOPg) |
3365
+ | Introduction | [![Introduction](https://img.youtube.com/vi/Fn1lQjC0GO0/0.jpg)](https://www.youtube.com/watch?v=Fn1lQjC0GO0) |
3366
+ | Tools Overview | [![Tools Overview](https://img.youtube.com/vi/XaQRgRpV7jo/0.jpg)](https://www.youtube.com/watch?v=XaQRgRpV7jo) |
3367
+ | Custom Tools | [![Custom Tools](https://img.youtube.com/vi/JSU2Rndh06c/0.jpg)](https://www.youtube.com/watch?v=JSU2Rndh06c) |
3368
+ | Firecrawl Integration | [![Firecrawl](https://img.youtube.com/vi/UoqUDcLcOYo/0.jpg)](https://www.youtube.com/watch?v=UoqUDcLcOYo) |
3369
+ | User Interface | [![UI](https://img.youtube.com/vi/tg-ZjNl3OCg/0.jpg)](https://www.youtube.com/watch?v=tg-ZjNl3OCg) |
3370
+ | Crawl4AI Integration | [![Crawl4AI](https://img.youtube.com/vi/KAvuVUh0XU8/0.jpg)](https://www.youtube.com/watch?v=KAvuVUh0XU8) |
3371
+ | Chat Interface | [![Chat](https://img.youtube.com/vi/sw3uDqn2h1Y/0.jpg)](https://www.youtube.com/watch?v=sw3uDqn2h1Y) |
3372
+ | Code Interface | [![Code](https://img.youtube.com/vi/_5jQayO-MQY/0.jpg)](https://www.youtube.com/watch?v=_5jQayO-MQY) |
3373
+ | Mem0 Integration | [![Mem0](https://img.youtube.com/vi/KIGSgRxf1cY/0.jpg)](https://www.youtube.com/watch?v=KIGSgRxf1cY) |
3374
+ | Training | [![Training](https://img.youtube.com/vi/aLawE8kwCrI/0.jpg)](https://www.youtube.com/watch?v=aLawE8kwCrI) |
3375
+ | Realtime Voice Interface | [![Realtime](https://img.youtube.com/vi/frRHfevTCSw/0.jpg)](https://www.youtube.com/watch?v=frRHfevTCSw) |
3376
+ | Call Interface | [![Call](https://img.youtube.com/vi/m1cwrUG2iAk/0.jpg)](https://www.youtube.com/watch?v=m1cwrUG2iAk) |
3377
+ | Reasoning Extract Agents | [![Reasoning Extract](https://img.youtube.com/vi/2PPamsADjJA/0.jpg)](https://www.youtube.com/watch?v=2PPamsADjJA) |
3378
+
3379
+ </details>
3380
+
3381
+ ---
3382
+
3383
+ ## 👥 Contributing
3384
+
3385
+ We welcome contributions from the community! Here's how you can contribute:
3386
+
3387
+ 1. **Fork on GitHub** - Use the "Fork" button on the [repository page](https://github.com/xonevn-ai/XoneAI)
3388
+ 2. **Clone your fork** - `git clone https://github.com/yourusername/xoneAI.git`
3389
+ 3. **Create a branch** - `git checkout -b new-feature`
3390
+ 4. **Make changes and commit** - `git commit -am "Add some feature"`
3391
+ 5. **Push to your fork** - `git push origin new-feature`
3392
+ 6. **Submit a pull request** - Via GitHub's web interface
3393
+ 7. **Await feedback** - From project maintainers
3394
+
3395
+ ---
3396
+
3397
+ ## 🔧 Development
3398
+
3399
+ ### Using uv
3400
+
3401
+ ```bash
3402
+ # Install uv if you haven't already
3403
+ pip install uv
3404
+
3405
+ # Install from requirements
3406
+ uv pip install -r pyproject.toml
3407
+
3408
+ # Install with extras
3409
+ uv pip install -r pyproject.toml --extra code
3410
+ uv pip install -r pyproject.toml --extra "crewai,autogen"
3411
+ ```
3412
+
3413
+ ### Bump and Release
3414
+
3415
+ ```bash
3416
+ # From project root - bumps version and releases in one command
3417
+ python src/xoneai/scripts/bump_and_release.py 2.2.99
3418
+
3419
+ # With xoneaiagents dependency
3420
+ python src/xoneai/scripts/bump_and_release.py 2.2.99 --agents 0.0.169
3421
+
3422
+ # Then publish
3423
+ cd src/xoneai && uv publish
3424
+ ```
3425
+
3426
+ ---
3427
+
3428
+ ## ❓ FAQ & Troubleshooting
3429
+
3430
+ <details>
3431
+ <summary><strong>ModuleNotFoundError: No module named 'xoneaiagents'</strong></summary>
3432
+
3433
+ Install the package:
3434
+ ```bash
3435
+ pip install xoneaiagents
3436
+ ```
3437
+
3438
+ </details>
3439
+
3440
+ <details>
3441
+ <summary><strong>API key not found / Authentication error</strong></summary>
3442
+
3443
+ Ensure your API key is set:
3444
+ ```bash
3445
+ export OPENAI_API_KEY=your_key_here
3446
+ ```
3447
+
3448
+ For other providers, see [Environment Variables](#environment-variables).
3449
+
3450
+ </details>
3451
+
3452
+ <details>
3453
+ <summary><strong>How do I use a local model (Ollama)?</strong></summary>
3454
+
3455
+ ```bash
3456
+ # Start Ollama server first
3457
+ ollama serve
3458
+
3459
+ # Set environment variable
3460
+ export OPENAI_BASE_URL=http://localhost:11434/v1
3461
+ ```
3462
+
3463
+ See [Ollama Integration](#ollama-integration) for more details.
3464
+
3465
+ </details>
3466
+
3467
+ <details>
3468
+ <summary><strong>How do I persist conversations to a database?</strong></summary>
3469
+
3470
+ Use the `db` parameter:
3471
+ ```python
3472
+ from xoneaiagents import Agent, db
3473
+
3474
+ agent = Agent(
3475
+ name="Assistant",
3476
+ db=db(database_url="postgresql://localhost/mydb"),
3477
+ session_id="my-session"
3478
+ )
3479
+ ```
3480
+
3481
+ See [Persistence (Databases)](#-persistence-databases) for supported databases.
3482
+
3483
+ </details>
3484
+
3485
+ <details>
3486
+ <summary><strong>How do I enable agent memory?</strong></summary>
3487
+
3488
+ ```python
3489
+ from xoneaiagents import Agent
3490
+
3491
+ agent = Agent(
3492
+ name="Assistant",
3493
+ memory=True, # Enables file-based memory (no extra deps!)
3494
+ user_id="user123"
3495
+ )
3496
+ ```
3497
+
3498
+ See [Agent Memory](#6-agent-memory-zero-dependencies) for more options.
3499
+
3500
+ </details>
3501
+
3502
+ <details>
3503
+ <summary><strong>How do I run multiple agents together?</strong></summary>
3504
+
3505
+ ```python
3506
+ from xoneaiagents import Agent, Agents
3507
+
3508
+ agent1 = Agent(instructions="Research topics")
3509
+ agent2 = Agent(instructions="Summarize findings")
3510
+ agents = Agents(agents=[agent1, agent2])
3511
+ agents.start()
3512
+ ```
3513
+
3514
+ See [Multi Agents](#2-multi-agents) for more examples.
3515
+
3516
+ </details>
3517
+
3518
+ <details>
3519
+ <summary><strong>How do I use MCP tools?</strong></summary>
3520
+
3521
+ ```python
3522
+ from xoneaiagents import Agent, MCP
3523
+
3524
+ agent = Agent(
3525
+ tools=MCP("npx @modelcontextprotocol/server-memory")
3526
+ )
3527
+ ```
3528
+
3529
+ See [MCP Protocol](#19-mcp-model-context-protocol) for all transport options.
3530
+
3531
+ </details>
3532
+
3533
+ ### Getting Help
3534
+
3535
+ - 📚 [Full Documentation](https://docs.xone.ai)
3536
+ - 🐛 [Report Issues](https://github.com/xonevn-ai/XoneAI/issues)
3537
+ - 💬 [Discussions](https://github.com/xonevn-ai/XoneAI/discussions)
3538
+
3539
+ ---
3540
+
3541
+ <div align="center">
3542
+ <p><strong>Made with ❤️ by the XoneAI Team</strong></p>
3543
+ <p>
3544
+ <a href="https://docs.xone.ai">Documentation</a> •
3545
+ <a href="https://github.com/xonevn-ai/XoneAI">GitHub</a> •
3546
+ <a href="https://github.com/xonevn-ai/XoneAI/issues">Issues</a>
3547
+ </p>
3548
+ </div>