agentbyte 0.4.3__tar.gz → 0.4.7__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 (250) hide show
  1. {agentbyte-0.4.3 → agentbyte-0.4.7}/CHANGELOG.md +53 -0
  2. {agentbyte-0.4.3 → agentbyte-0.4.7}/PKG-INFO +21 -3
  3. {agentbyte-0.4.3 → agentbyte-0.4.7}/README.md +20 -2
  4. {agentbyte-0.4.3 → agentbyte-0.4.7}/pyproject.toml +4 -1
  5. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/__about__.py +1 -1
  6. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/__init__.py +23 -0
  7. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/agents/agent.py +62 -101
  8. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/llm/__init__.py +6 -5
  9. agentbyte-0.4.7/src/agentbyte/llm/_retry_observability.py +40 -0
  10. agentbyte-0.4.7/src/agentbyte/llm/auth.py +16 -0
  11. agentbyte-0.4.7/src/agentbyte/llm/azure/__init__.py +22 -0
  12. agentbyte-0.4.7/src/agentbyte/llm/azure/auth.py +68 -0
  13. agentbyte-0.4.7/src/agentbyte/llm/azure/chat.py +752 -0
  14. agentbyte-0.4.3/src/agentbyte/llm/azure_openai_embedding.py → agentbyte-0.4.7/src/agentbyte/llm/azure/embedding.py +37 -39
  15. agentbyte-0.4.7/src/agentbyte/llm/azure/settings.py +63 -0
  16. agentbyte-0.4.7/src/agentbyte/llm/azure_openai.py +15 -0
  17. agentbyte-0.4.7/src/agentbyte/llm/azure_openai_embedding.py +15 -0
  18. agentbyte-0.4.7/src/agentbyte/llm/openai/__init__.py +13 -0
  19. agentbyte-0.4.7/src/agentbyte/llm/openai/chat.py +526 -0
  20. agentbyte-0.4.3/src/agentbyte/llm/openai_embedding.py → agentbyte-0.4.7/src/agentbyte/llm/openai/embedding.py +36 -38
  21. agentbyte-0.4.7/src/agentbyte/llm/openai/settings.py +22 -0
  22. agentbyte-0.4.7/src/agentbyte/llm/openai.py +12 -0
  23. agentbyte-0.4.7/src/agentbyte/llm/openai_embedding.py +12 -0
  24. agentbyte-0.4.7/src/agentbyte/llm/settings.py +14 -0
  25. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/middleware/__init__.py +2 -0
  26. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/middleware/base.py +371 -26
  27. agentbyte-0.4.7/src/agentbyte/middleware/retry.py +95 -0
  28. agentbyte-0.4.7/src/agentbyte/presets/__init__.py +24 -0
  29. agentbyte-0.4.7/src/agentbyte/presets/agents.py +180 -0
  30. agentbyte-0.4.7/src/agentbyte/presets/clients.py +79 -0
  31. agentbyte-0.4.7/src/agentbyte/presets/orchestration.py +304 -0
  32. agentbyte-0.4.7/src/agentbyte/presets/workflow.py +106 -0
  33. agentbyte-0.4.7/tests/agents/test_agent_retry_middleware.py +350 -0
  34. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/cli/test_create_skills.py +1 -0
  35. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/llm/test_azure_client.py +1 -1
  36. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/llm/test_azure_embedding_client.py +2 -2
  37. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/llm/test_openai_client.py +1 -1
  38. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/llm/test_openai_embedding_client.py +2 -2
  39. agentbyte-0.4.7/tests/llm/test_retry_observability.py +312 -0
  40. agentbyte-0.4.7/tests/middleware/test_retry_middleware.py +406 -0
  41. agentbyte-0.4.7/tests/presets/test_agents.py +39 -0
  42. agentbyte-0.4.7/tests/presets/test_clients.py +130 -0
  43. agentbyte-0.4.7/tests/presets/test_orchestration.py +188 -0
  44. agentbyte-0.4.7/tests/presets/test_workflow.py +30 -0
  45. agentbyte-0.4.7/tests/test_package_api.py +228 -0
  46. agentbyte-0.4.3/src/agentbyte/llm/auth.py +0 -184
  47. agentbyte-0.4.3/src/agentbyte/llm/azure_openai.py +0 -1273
  48. agentbyte-0.4.3/src/agentbyte/llm/openai.py +0 -938
  49. agentbyte-0.4.3/src/agentbyte/llm/settings.py +0 -150
  50. agentbyte-0.4.3/tests/test_package_api.py +0 -94
  51. {agentbyte-0.4.3 → agentbyte-0.4.7}/.github/skills/agentbyte-agent-as-tool/SKILL.md +0 -0
  52. {agentbyte-0.4.3 → agentbyte-0.4.7}/.github/skills/agentbyte-ai-driven-orchestration/SKILL.md +0 -0
  53. {agentbyte-0.4.3 → agentbyte-0.4.7}/.github/skills/agentbyte-dataset/SKILL.md +0 -0
  54. {agentbyte-0.4.3 → agentbyte-0.4.7}/.github/skills/agentbyte-function-tools/SKILL.md +0 -0
  55. {agentbyte-0.4.3 → agentbyte-0.4.7}/.github/skills/agentbyte-list-memory/SKILL.md +0 -0
  56. {agentbyte-0.4.3 → agentbyte-0.4.7}/.github/skills/agentbyte-llm-client/SKILL.md +0 -0
  57. {agentbyte-0.4.3 → agentbyte-0.4.7}/.github/skills/agentbyte-memory-tool/SKILL.md +0 -0
  58. {agentbyte-0.4.3 → agentbyte-0.4.7}/.github/skills/agentbyte-middleware/SKILL.md +0 -0
  59. {agentbyte-0.4.3 → agentbyte-0.4.7}/.github/skills/agentbyte-multi-turn-context/SKILL.md +0 -0
  60. {agentbyte-0.4.3 → agentbyte-0.4.7}/.github/skills/agentbyte-otel-tracing/SKILL.md +0 -0
  61. {agentbyte-0.4.3 → agentbyte-0.4.7}/.github/skills/agentbyte-plan-based-orchestration/SKILL.md +0 -0
  62. {agentbyte-0.4.3 → agentbyte-0.4.7}/.github/skills/agentbyte-round-robin-orchestration/SKILL.md +0 -0
  63. {agentbyte-0.4.3 → agentbyte-0.4.7}/.github/skills/agentbyte-simple-agent/SKILL.md +0 -0
  64. {agentbyte-0.4.3 → agentbyte-0.4.7}/.github/skills/agentbyte-tool-approval/SKILL.md +0 -0
  65. {agentbyte-0.4.3 → agentbyte-0.4.7}/.github/skills/skill-authoring/SKILL.md +0 -0
  66. {agentbyte-0.4.3 → agentbyte-0.4.7}/.gitignore +0 -0
  67. {agentbyte-0.4.3 → agentbyte-0.4.7}/LICENSE +0 -0
  68. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/agents/__init__.py +0 -0
  69. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/agents/agent_as_tool.py +0 -0
  70. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/agents/base.py +0 -0
  71. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/agents/types.py +0 -0
  72. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/cancellation_token.py +0 -0
  73. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/cli/__init__.py +0 -0
  74. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/cli/main.py +0 -0
  75. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/component.py +0 -0
  76. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/context.py +0 -0
  77. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/dataset/__init__.py +0 -0
  78. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/dataset/base.py +0 -0
  79. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/dataset/json.py +0 -0
  80. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/dataset/loader.py +0 -0
  81. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/dataset/loaders.py +0 -0
  82. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/dataset/sqlite.py +0 -0
  83. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/entity.py +0 -0
  84. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/llm/base.py +0 -0
  85. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/llm/embeddings_base.py +0 -0
  86. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/llm/pricing.py +0 -0
  87. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/llm/types.py +0 -0
  88. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/memory/__init__.py +0 -0
  89. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/memory/base.py +0 -0
  90. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/messages.py +0 -0
  91. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/middleware/otel.py +0 -0
  92. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/notebook.py +0 -0
  93. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/orchestration/__init__.py +0 -0
  94. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/orchestration/ai.py +0 -0
  95. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/orchestration/base.py +0 -0
  96. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/orchestration/plan.py +0 -0
  97. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/orchestration/round_robin.py +0 -0
  98. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/session.py +0 -0
  99. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/termination/__init__.py +0 -0
  100. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/termination/base.py +0 -0
  101. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/termination/cancellation.py +0 -0
  102. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/termination/composite.py +0 -0
  103. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/termination/external.py +0 -0
  104. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/termination/function_call.py +0 -0
  105. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/termination/handoff.py +0 -0
  106. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/termination/max_message.py +0 -0
  107. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/termination/text_mention.py +0 -0
  108. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/termination/timeout.py +0 -0
  109. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/termination/token_usage.py +0 -0
  110. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/tools/__init__.py +0 -0
  111. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/tools/base.py +0 -0
  112. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/tools/core_tools.py +0 -0
  113. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/tools/decorator.py +0 -0
  114. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/tools/memory_tool.py +0 -0
  115. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/types.py +0 -0
  116. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/__init__.py +0 -0
  117. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/agent_framework_devui/ui/assets/index-BzhEszHZ.css +0 -0
  118. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/agent_framework_devui/ui/assets/index-DByFJNGD.js +0 -0
  119. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/agent_framework_devui/ui/index.html +0 -0
  120. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/agent_framework_devui/ui/vite.svg +0 -0
  121. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/discovery.py +0 -0
  122. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/execution.py +0 -0
  123. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/.gitignore +0 -0
  124. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/README.md +0 -0
  125. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/components.json +0 -0
  126. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/eslint.config.js +0 -0
  127. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/index.html +0 -0
  128. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/package.json +0 -0
  129. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/plan.md +0 -0
  130. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/public/vite.svg +0 -0
  131. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/App.css +0 -0
  132. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/App.tsx +0 -0
  133. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/assets/react.svg +0 -0
  134. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/agent/agent-view.tsx +0 -0
  135. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/message_renderer/ContentRenderer.tsx +0 -0
  136. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/message_renderer/MessageRenderer.tsx +0 -0
  137. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/message_renderer/index.ts +0 -0
  138. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/message_renderer/types.ts +0 -0
  139. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/mode-toggle.tsx +0 -0
  140. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/orchestrator/orchestrator-view.tsx +0 -0
  141. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/shared/app-header.tsx +0 -0
  142. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/shared/chat-base.tsx +0 -0
  143. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/shared/context-inspector.tsx +0 -0
  144. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/shared/debug-panel.tsx +0 -0
  145. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/shared/entity-selector.tsx +0 -0
  146. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/shared/example-tasks-display.tsx +0 -0
  147. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/shared/examples-gallery.tsx +0 -0
  148. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/shared/session-switcher.tsx +0 -0
  149. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/shared/tool-approval-banner.tsx +0 -0
  150. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/theme-provider.tsx +0 -0
  151. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/ui/attachment-gallery.tsx +0 -0
  152. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/ui/badge.tsx +0 -0
  153. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/ui/button.tsx +0 -0
  154. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/ui/card.tsx +0 -0
  155. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/ui/dialog.tsx +0 -0
  156. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/ui/dropdown-menu.tsx +0 -0
  157. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/ui/file-upload.tsx +0 -0
  158. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/ui/input.tsx +0 -0
  159. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/ui/label.tsx +0 -0
  160. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/ui/loading-spinner.tsx +0 -0
  161. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/ui/loading-state.tsx +0 -0
  162. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/ui/message-input.tsx +0 -0
  163. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/ui/scroll-area.tsx +0 -0
  164. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/ui/slider.tsx +0 -0
  165. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/ui/tabs.tsx +0 -0
  166. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/ui/textarea.tsx +0 -0
  167. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/components/workflow/workflow-view.tsx +0 -0
  168. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/hooks/messageHandlers.ts +0 -0
  169. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/hooks/useEntityExecution.ts +0 -0
  170. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/index.css +0 -0
  171. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/main.tsx +0 -0
  172. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/services/api.ts +0 -0
  173. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/types/index.ts +0 -0
  174. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/types/picoagents.ts +0 -0
  175. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/utils/message-utils.ts +0 -0
  176. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/src/vite-env.d.ts +0 -0
  177. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/tsconfig.app.json +0 -0
  178. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/tsconfig.json +0 -0
  179. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/tsconfig.node.json +0 -0
  180. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/vite.config.ts +0 -0
  181. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/frontend/yarn.lock +0 -0
  182. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/models.py +0 -0
  183. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/registry.py +0 -0
  184. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/server.py +0 -0
  185. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/session_store.py +0 -0
  186. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/sessions.py +0 -0
  187. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/ui/assets/index-CWk64UM3.js +0 -0
  188. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/ui/assets/index-vt1cujlT.css +0 -0
  189. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/ui/index.html +0 -0
  190. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/webui/ui/vite.svg +0 -0
  191. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/workflow/__init__.py +0 -0
  192. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/workflow/core/__init__.py +0 -0
  193. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/workflow/core/checkpoint.py +0 -0
  194. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/workflow/core/models.py +0 -0
  195. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/workflow/core/runner.py +0 -0
  196. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/workflow/core/workflow.py +0 -0
  197. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/workflow/defaults.py +0 -0
  198. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/workflow/schema_utils.py +0 -0
  199. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/workflow/steps/__init__.py +0 -0
  200. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/workflow/steps/agentbyte_agent.py +0 -0
  201. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/workflow/steps/echo.py +0 -0
  202. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/workflow/steps/function.py +0 -0
  203. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/workflow/steps/http.py +0 -0
  204. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/workflow/steps/step.py +0 -0
  205. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/workflow/steps/transform.py +0 -0
  206. {agentbyte-0.4.3 → agentbyte-0.4.7}/src/agentbyte/workflow/visualizer.py +0 -0
  207. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/agents/test_agent_as_tool.py +0 -0
  208. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/agents/test_agent_basic.py +0 -0
  209. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/agents/test_agent_event_types.py +0 -0
  210. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/agents/test_agent_memory_integration.py +0 -0
  211. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/agents/test_agent_middleware_integration.py +0 -0
  212. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/agents/test_agent_stream_events.py +0 -0
  213. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/agents/test_tool_approval.py +0 -0
  214. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/llm/test_llm_types.py +0 -0
  215. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/memory/test_memory.py +0 -0
  216. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/middleware/test_middleware_chain.py +0 -0
  217. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/middleware/test_otel.py +0 -0
  218. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/orchestration/test_ai_orchestrator.py +0 -0
  219. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/orchestration/test_base_orchestrator.py +0 -0
  220. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/orchestration/test_plan_orchestrator.py +0 -0
  221. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/orchestration/test_round_robin.py +0 -0
  222. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/termination/test_base.py +0 -0
  223. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/termination/test_cancellation.py +0 -0
  224. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/termination/test_composite.py +0 -0
  225. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/termination/test_external.py +0 -0
  226. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/termination/test_function_call.py +0 -0
  227. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/termination/test_handoff.py +0 -0
  228. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/termination/test_max_message.py +0 -0
  229. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/termination/test_text_mention.py +0 -0
  230. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/termination/test_timeout.py +0 -0
  231. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/termination/test_token_usage.py +0 -0
  232. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/test_cancellation_token.py +0 -0
  233. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/test_context.py +0 -0
  234. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/test_messages.py +0 -0
  235. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/test_session.py +0 -0
  236. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/test_types.py +0 -0
  237. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/tools/test_memory_tool.py +0 -0
  238. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/tools/test_tools.py +0 -0
  239. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/webui/__init__.py +0 -0
  240. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/webui/helpers.py +0 -0
  241. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/webui/test_execution.py +0 -0
  242. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/webui/test_package_api.py +0 -0
  243. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/webui/test_registry.py +0 -0
  244. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/webui/test_server.py +0 -0
  245. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/workflow/test_checkpoint.py +0 -0
  246. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/workflow/test_workflow_class.py +0 -0
  247. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/workflow/test_workflow_models.py +0 -0
  248. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/workflow/test_workflow_runner.py +0 -0
  249. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/workflow/test_workflow_steps.py +0 -0
  250. {agentbyte-0.4.3 → agentbyte-0.4.7}/tests/workflow/test_workflow_visualizer.py +0 -0
@@ -4,6 +4,59 @@ All notable changes to Agentbyte are documented in this file.
4
4
 
5
5
  The format follows Keep a Changelog principles and semantic versioning.
6
6
 
7
+ ## [0.4.7] - 2026-04-06
8
+
9
+ ### Added
10
+ - Reorganised `agentbyte.llm` into provider packages: `agentbyte.llm.openai` (chat, embedding, settings) and `agentbyte.llm.azure` (chat, embedding, settings, auth). Base classes, shared types, and pricing remain at the `llm/` root. Thin compatibility shims preserve all existing flat `agentbyte.llm.*` import paths so downstream code is unaffected.
11
+ - Added `agentbyte.llm._retry_observability` shared helper (`build_retry_record`, `build_retry_summary`). All four provider clients import from this single module so the retry record shape is defined once and consistent across providers.
12
+ - Provider-owned retry observability in chat clients: `ChatCompletionResult.metadata["retry_observability"]` is now populated by `OpenAIChatCompletionClient` and `AzureOpenAIChatCompletionClient` when at least one retry occurred; key is absent on zero retries.
13
+ - Provider-owned retry observability in embedding clients: `EmbeddingResult.metadata["retry_observability"]` is now populated by `OpenAIEmbeddingClient` and `AzureOpenAIEmbeddingClient` when at least one retry occurred; key is absent on zero retries.
14
+
15
+ ### Changed
16
+ - Updated concept notebooks to reflect the new provider package layout and dual observability ownership model.
17
+ - Updated retry design doc and middleware study doc to reflect Phase 2 streaming-tool retry path and the provider vs. middleware observability split.
18
+
19
+ ### Testing
20
+ - Added 11 tests in `tests/llm/test_retry_observability.py` covering absent-on-zero-retries, correct structure on one retry, and accumulation across multiple retries for all four provider client combinations (OpenAI/Azure × chat/embedding).
21
+
22
+ ## [0.4.6] - 2026-04-06
23
+
24
+ ### Added
25
+ - Added `RetryMiddleware` to `agentbyte.middleware` with MAF-style constructor config (`max_retries`, `initial_interval`, `backoff_factor`, `max_interval`, `jitter`, `retry_on`, `operation_types`).
26
+ - Default `operation_types` covers `tool_call` and `memory_access`; `model_call` and `embedding_call` are excluded by default to avoid nested retry with existing provider-level retry in chat and embedding clients.
27
+ - Streaming tools now retry via the shared middleware chain when a failure occurs before any user-visible output is emitted; retries are suppressed once output has started to prevent duplicate or corrupted stream output.
28
+ - Added retry observability: each retry attempt is appended to `AgentContext.metadata["retry_observability"]["history"]` with attempt number, computed delay, exception type, and outcome; a `"latest"` summary key is also updated after each operation.
29
+
30
+ ### Fixed
31
+ - Fixed a pre-existing gap in `MiddlewareChain.execute_stream()` where a `None` return from `process_error()` was incorrectly treated as a recovery value, suppressing the original exception. The inline error handler now applies the same `is not None` guard already present in `_execute_error_handlers()`.
32
+
33
+ ### Testing
34
+ - Added 24 unit tests in `tests/middleware/test_retry_middleware.py` covering delays, jitter, operation filtering, stream retry, hook invocation counts, and retry observability.
35
+ - Added 5 agent integration tests in `tests/agents/test_agent_retry_middleware.py` covering non-streaming tool retry, exhaustion surfacing, streaming tool pre-output retry, post-output no-retry, and approval-pause preservation.
36
+
37
+ ## [0.4.5] - 2026-03-27
38
+
39
+ ### Added
40
+ - Added a new `agentbyte.presets` package with provider-aware `build_chat_client()` plus default `get_*` builders for query rewriter, researcher, writer, reviewer, orchestrators, and the default workflow.
41
+ - Added a default presets example under `examples/presets/basic_presets.py`.
42
+ - Added the `notebooks/usecases/08.1-default-presets.ipynb` use-case notebook to demonstrate preset agents, orchestrators, workflows, and streaming execution.
43
+
44
+ ### Changed
45
+ - Moved the role-specific `researcher -> writer -> reviewer` workflow assembly into the presets layer so `agentbyte.workflow.defaults` remains focused on generic workflow templates.
46
+ - Tightened the plan-based preset so reviewer feedback triggers writer revision and reviewer re-check loops until explicit approval is given.
47
+ - Updated the plan-based preset final result behavior to prefer the latest approved writer draft instead of the reviewer approval message.
48
+
49
+ ### Testing
50
+ - Added focused preset coverage for provider resolution, preset builders, reviewer approval gating, revision-loop insertion, and final-result selection.
51
+
52
+ ## [0.4.4] - 2026-03-26
53
+
54
+ ### Fixed
55
+ - Corrected the release after `v0.4.3` published `0.4.2` package artifacts instead of `0.4.3`.
56
+
57
+ ### Changed
58
+ - Added a mandatory release guardrail in repository instructions: clean `dist/`, rebuild with `uv build`, and verify artifact filenames/version metadata before creating or pushing a release tag.
59
+
7
60
  ## [0.4.3] - 2026-03-26
8
61
 
9
62
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentbyte
3
- Version: 0.4.3
3
+ Version: 0.4.7
4
4
  Summary: A toolkit for designing multiagent systems
5
5
  Project-URL: Homepage, https://gitlab.com/pyninja/aiengineering/agentbyte
6
6
  Project-URL: Repository, https://gitlab.com/pyninja/aiengineering/agentbyte
@@ -36,17 +36,35 @@ Requires-Dist: uvicorn>=0.42.0; extra == 'webui'
36
36
  Description-Content-Type: text/markdown
37
37
 
38
38
  <p align="center">
39
- <img src="https://gitlab.com/pyninja/aiengineering/agentbyte/-/raw/v0.4.3/logo/agent-byte-avatar-low.png" alt="Agentbyte" width="200"/>
39
+ <img src="https://gitlab.com/pyninja/aiengineering/agentbyte/-/raw/v0.4.7/logo/agent-byte-avatar-low.png" alt="Agentbyte" width="200"/>
40
40
  </p>
41
41
 
42
42
  # Agentbyte
43
43
 
44
44
  Agentbyte is an observability-first agentic AI framework for building and studying multiagent systems with a learning-first, implementation-oriented workflow.
45
45
 
46
- Current release: **0.4.3**
46
+ Current release: **0.4.7**
47
47
 
48
48
  Repository: [gitlab.com/pyninja/aiengineering/agentbyte](https://gitlab.com/pyninja/aiengineering/agentbyte)
49
49
 
50
+ ## What's New in 0.4.7
51
+
52
+ - Reorganised `agentbyte.llm` into provider packages: `agentbyte.llm.openai` and `agentbyte.llm.azure`. All existing flat `agentbyte.llm.*` imports continue to work via compatibility shims.
53
+ - Added shared `_retry_observability` helper — single retry record shape used by all provider clients.
54
+ - Provider-owned retry observability: `ChatCompletionResult.metadata["retry_observability"]` and `EmbeddingResult.metadata["retry_observability"]` populated on retries; absent when no retries occurred. Covers OpenAI and Azure chat and embedding clients.
55
+ - Updated concept notebooks and study docs to reflect the new layout and dual observability ownership model.
56
+
57
+ ## What's New in 0.4.5
58
+
59
+ - Added a new `agentbyte.presets` package with provider-aware `build_chat_client()` plus default `get_*` builders for agents, orchestrators, and workflows.
60
+ - Added a review-gated plan-based preset flow so reviewer feedback now triggers writer revision loops until explicit `APPROVED`.
61
+ - Added the `notebooks/usecases/08.1-default-presets.ipynb` use-case notebook to demonstrate preset agents, orchestrators, workflows, and streaming.
62
+
63
+ ## What's New in 0.4.4
64
+
65
+ - Corrected the release after `v0.4.3` published `0.4.2` artifacts in CI.
66
+ - Added a mandatory release guardrail to clean `dist/`, rebuild, and verify artifact filenames before tagging.
67
+
50
68
  ## What's New in 0.4.3
51
69
 
52
70
  - Added a new `agentbyte-plan-based-orchestration` Copilot skill for Chapter 7.5 plan-based orchestration.
@@ -1,15 +1,33 @@
1
1
  <p align="center">
2
- <img src="https://gitlab.com/pyninja/aiengineering/agentbyte/-/raw/v0.4.3/logo/agent-byte-avatar-low.png" alt="Agentbyte" width="200"/>
2
+ <img src="https://gitlab.com/pyninja/aiengineering/agentbyte/-/raw/v0.4.7/logo/agent-byte-avatar-low.png" alt="Agentbyte" width="200"/>
3
3
  </p>
4
4
 
5
5
  # Agentbyte
6
6
 
7
7
  Agentbyte is an observability-first agentic AI framework for building and studying multiagent systems with a learning-first, implementation-oriented workflow.
8
8
 
9
- Current release: **0.4.3**
9
+ Current release: **0.4.7**
10
10
 
11
11
  Repository: [gitlab.com/pyninja/aiengineering/agentbyte](https://gitlab.com/pyninja/aiengineering/agentbyte)
12
12
 
13
+ ## What's New in 0.4.7
14
+
15
+ - Reorganised `agentbyte.llm` into provider packages: `agentbyte.llm.openai` and `agentbyte.llm.azure`. All existing flat `agentbyte.llm.*` imports continue to work via compatibility shims.
16
+ - Added shared `_retry_observability` helper — single retry record shape used by all provider clients.
17
+ - Provider-owned retry observability: `ChatCompletionResult.metadata["retry_observability"]` and `EmbeddingResult.metadata["retry_observability"]` populated on retries; absent when no retries occurred. Covers OpenAI and Azure chat and embedding clients.
18
+ - Updated concept notebooks and study docs to reflect the new layout and dual observability ownership model.
19
+
20
+ ## What's New in 0.4.5
21
+
22
+ - Added a new `agentbyte.presets` package with provider-aware `build_chat_client()` plus default `get_*` builders for agents, orchestrators, and workflows.
23
+ - Added a review-gated plan-based preset flow so reviewer feedback now triggers writer revision loops until explicit `APPROVED`.
24
+ - Added the `notebooks/usecases/08.1-default-presets.ipynb` use-case notebook to demonstrate preset agents, orchestrators, workflows, and streaming.
25
+
26
+ ## What's New in 0.4.4
27
+
28
+ - Corrected the release after `v0.4.3` published `0.4.2` artifacts in CI.
29
+ - Added a mandatory release guardrail to clean `dist/`, rebuild, and verify artifact filenames before tagging.
30
+
13
31
  ## What's New in 0.4.3
14
32
 
15
33
  - Added a new `agentbyte-plan-based-orchestration` Copilot skill for Chapter 7.5 plan-based orchestration.
@@ -72,11 +72,14 @@ include = ["/src", "/tests", "/README.md", "/LICENSE", "/CHANGELOG.md", "/.githu
72
72
  [dependency-groups]
73
73
  dev = [
74
74
  "ipykernel>=7.1.0",
75
- "picoagents>=0.4.0",
76
75
  "pydantic-settings>=2.13.0",
77
76
  "pymupdf-layout>=1.26.6",
78
77
  "pymupdf4llm>=0.2.9",
79
78
  ]
79
+ extlib = [
80
+ "agent-framework-core>=1.0.0",
81
+ "agent-framework-openai>=1.0.0",
82
+ ]
80
83
  otel = [
81
84
  "opentelemetry-api>=1.39.1",
82
85
  "opentelemetry-exporter-otlp-proto-http>=1.39.1",
@@ -1,2 +1,2 @@
1
- __version__ = "0.4.3"
1
+ __version__ = "0.4.7"
2
2
  VERSION = __version__
@@ -34,6 +34,18 @@ from agentbyte.orchestration import (
34
34
  RoundRobinOrchestrator,
35
35
  StepProgressEvaluation,
36
36
  )
37
+ from agentbyte.presets import (
38
+ build_chat_client,
39
+ get_ai_orchestrator,
40
+ get_orchestrator,
41
+ get_plan_based_orchestrator,
42
+ get_query_rewriter,
43
+ get_researcher,
44
+ get_reviewer,
45
+ get_round_robin_orchestrator,
46
+ get_workflow,
47
+ get_writer,
48
+ )
37
49
  from agentbyte.session import BaseSession, InMemorySession, Session
38
50
  from agentbyte.termination import (
39
51
  BaseTermination,
@@ -80,6 +92,17 @@ __all__ = [
80
92
  "PlanStep",
81
93
  "RoundRobinOrchestrator",
82
94
  "StepProgressEvaluation",
95
+ # Presets
96
+ "build_chat_client",
97
+ "get_query_rewriter",
98
+ "get_researcher",
99
+ "get_writer",
100
+ "get_reviewer",
101
+ "get_orchestrator",
102
+ "get_round_robin_orchestrator",
103
+ "get_ai_orchestrator",
104
+ "get_plan_based_orchestrator",
105
+ "get_workflow",
83
106
  # Termination
84
107
  "BaseTermination",
85
108
  "MaxMessageTermination",
@@ -21,7 +21,7 @@ from agentbyte.messages import (
21
21
  UserMessage,
22
22
  )
23
23
  from agentbyte.types import ToolResult
24
- from agentbyte.middleware.base import MiddlewareContext, OperationType
24
+ from agentbyte.middleware.base import OperationType
25
25
  from agentbyte.tools import ApprovalMode
26
26
 
27
27
  from .base import AgentConfigurationError, AgentExecutionError, BaseAgent
@@ -162,81 +162,87 @@ class Agent(BaseAgent):
162
162
  return
163
163
 
164
164
  if tool.supports_streaming():
165
- streamed_result: Optional[ToolResult] = None
166
- middleware_context = MiddlewareContext(
167
- operation=OperationType.TOOL_CALL,
168
- agent_name=self.name,
169
- agent_context=working_context,
170
- data={
171
- "tool_name": tool_call.tool_name,
172
- "parameters": tool_call.parameters,
173
- "call_id": tool_call.call_id,
174
- },
175
- metadata={},
176
- )
177
-
178
165
  try:
179
- for middleware in self.middleware_chain.middlewares:
180
- final_context: MiddlewareContext | None = None
181
- async for item in self.middleware_chain._iter_hook_items( # type: ignore[attr-defined]
182
- middleware.process_request(middleware_context)
183
- ):
184
- if isinstance(item, MiddlewareContext):
185
- final_context = item
186
- elif isinstance(item, BaseEvent):
187
- if verbose or isinstance(item, ToolApprovalEvent):
188
- yield item
189
166
 
190
- if isinstance(item, ToolApprovalEvent):
191
- return
167
+ async def _execute_streaming_tool(
168
+ payload: dict[str, object],
169
+ ) -> AsyncGenerator[object, None]:
170
+ tool_parameters = payload.get("parameters", {})
171
+ if not isinstance(tool_parameters, dict):
172
+ raise ValueError(
173
+ "tool_call payload parameters must be a dictionary"
174
+ )
192
175
 
193
- if final_context is not None:
194
- middleware_context = final_context
176
+ async for item in tool.execute_stream(
177
+ tool_parameters,
178
+ cancellation_token,
179
+ ):
180
+ yield item
195
181
 
196
- async for item in tool.execute_stream(
197
- middleware_context.data.get("parameters", tool_call.parameters),
198
- cancellation_token,
182
+ streamed_result: object | None = None
183
+ async for item in self.middleware_chain.execute_tool_stream(
184
+ operation=OperationType.TOOL_CALL,
185
+ agent_name=self.name,
186
+ agent_context=working_context,
187
+ data={
188
+ "tool_name": tool_call.tool_name,
189
+ "parameters": tool_call.parameters,
190
+ "call_id": tool_call.call_id,
191
+ },
192
+ func=_execute_streaming_tool,
199
193
  ):
194
+ if isinstance(item, BaseEvent):
195
+ if verbose or isinstance(item, ToolApprovalEvent):
196
+ yield item
197
+
198
+ if isinstance(item, ToolApprovalEvent):
199
+ return
200
+
201
+ continue
202
+
200
203
  if isinstance(item, ToolResult):
201
204
  streamed_result = item
202
205
  else:
203
206
  yield item
204
207
 
205
- except Exception as exc:
206
- recovered, recovery = await self.middleware_chain._execute_error_handlers( # type: ignore[attr-defined]
207
- middleware_context, exc
208
+ if streamed_result is None:
209
+ raise AgentExecutionError(
210
+ "Streaming tool middleware execution did not yield a final result"
211
+ )
212
+
213
+ tool_message = ToolMessage(
214
+ content=str(streamed_result.result)
215
+ if streamed_result.success
216
+ else (streamed_result.error or ""),
217
+ source=self.name,
218
+ tool_call_id=tool_call.call_id,
219
+ tool_name=tool_call.tool_name,
220
+ success=streamed_result.success,
221
+ error=streamed_result.error,
208
222
  )
209
- if recovered and isinstance(recovery, ToolResult):
210
- streamed_result = recovery
211
- else:
212
- message = ToolMessage(
213
- content=f"Tool execution failed: {exc}",
223
+ working_context.add_message(tool_message)
224
+ yield tool_message
225
+
226
+ if verbose:
227
+ yield ToolCallResponseEvent(
214
228
  source=self.name,
215
- tool_call_id=tool_call.call_id,
216
- tool_name=tool_call.tool_name,
217
- success=False,
218
- error=str(exc),
229
+ call_id=tool_call.call_id,
230
+ result=streamed_result,
219
231
  )
220
- working_context.add_message(message)
221
232
 
222
- if verbose:
223
- yield ToolCallResponseEvent(
224
- source=self.name,
225
- call_id=tool_call.call_id,
226
- result=None,
227
- )
228
-
229
- yield message
230
- return
233
+ return
234
+ except Exception as exc:
235
+ error_message = str(exc)
236
+ if error_message == "Streaming tool returned no final result":
237
+ error_message = "Streaming tool middleware execution did not yield a final result"
231
238
 
232
- if streamed_result is None:
233
239
  message = ToolMessage(
234
- content="Tool execution failed: streaming tool returned no final result",
240
+ content=f"Tool execution failed: {error_message}",
235
241
  source=self.name,
236
242
  tool_call_id=tool_call.call_id,
237
243
  tool_name=tool_call.tool_name,
238
244
  success=False,
239
- error="Streaming tool returned no final result",
245
+ error=error_message,
240
246
  )
241
247
  working_context.add_message(message)
242
248
 
@@ -250,51 +256,6 @@ class Agent(BaseAgent):
250
256
  yield message
251
257
  return
252
258
 
253
- final_result = streamed_result
254
- try:
255
- for middleware in reversed(self.middleware_chain.middlewares):
256
- transformed_result = final_result
257
- async for item in self.middleware_chain._iter_hook_items( # type: ignore[attr-defined]
258
- middleware.process_response(middleware_context, final_result)
259
- ):
260
- if isinstance(item, BaseEvent):
261
- if verbose or isinstance(item, ToolApprovalEvent):
262
- yield item
263
- continue
264
- transformed_result = item
265
- if isinstance(transformed_result, ToolResult):
266
- final_result = transformed_result
267
- except Exception as exc:
268
- recovered, recovery = await self.middleware_chain._execute_error_handlers( # type: ignore[attr-defined]
269
- middleware_context, exc
270
- )
271
- if recovered and isinstance(recovery, ToolResult):
272
- final_result = recovery
273
- else:
274
- raise
275
-
276
- tool_message = ToolMessage(
277
- content=str(final_result.result)
278
- if final_result.success
279
- else (final_result.error or ""),
280
- source=self.name,
281
- tool_call_id=tool_call.call_id,
282
- tool_name=tool_call.tool_name,
283
- success=final_result.success,
284
- error=final_result.error,
285
- )
286
- working_context.add_message(tool_message)
287
- yield tool_message
288
-
289
- if verbose:
290
- yield ToolCallResponseEvent(
291
- source=self.name,
292
- call_id=tool_call.call_id,
293
- result=final_result,
294
- )
295
-
296
- return
297
-
298
259
  try:
299
260
 
300
261
  async def _execute_tool(payload: dict[str, object]) -> object:
@@ -33,21 +33,22 @@ from .base import (
33
33
  )
34
34
  from .embeddings_base import BaseEmbeddingClient, BaseEmbeddingClientConfig
35
35
  from .openai import OpenAIChatCompletionClient, OpenAIChatCompletionClientConfig
36
- from .openai_embedding import OpenAIEmbeddingClient, OpenAIEmbeddingClientConfig
37
- from .azure_openai import (
36
+ from .openai import OpenAIEmbeddingClient, OpenAIEmbeddingClientConfig
37
+ from .openai import OpenAISettings
38
+ from .azure import (
38
39
  AzureOpenAIChatCompletionClient,
39
40
  AzureOpenAIChatCompletionClientConfig,
40
41
  )
41
- from .azure_openai_embedding import (
42
+ from .azure import (
42
43
  AzureOpenAIEmbeddingClient,
43
44
  AzureOpenAIEmbeddingClientConfig,
44
45
  )
45
- from .auth import (
46
+ from .azure import (
46
47
  get_default_token_provider,
47
48
  get_certificate_token_provider,
48
49
  create_token_provider_from_string,
49
50
  )
50
- from .settings import OpenAISettings, AzureOpenAISettings, AzureServicePrincipalSettings
51
+ from .azure import AzureOpenAISettings, AzureServicePrincipalSettings
51
52
  # Import message types and usage from root module (picoagents-aligned)
52
53
  from agentbyte.messages import (
53
54
  BaseMessage,
@@ -0,0 +1,40 @@
1
+ """
2
+ Shared retry observability utilities for LLM provider clients.
3
+
4
+ All provider clients (OpenAI, Azure, Bedrock, Ollama, etc.) import from here
5
+ so the retry record shape is defined once and consistent across providers.
6
+ """
7
+ from __future__ import annotations
8
+
9
+ from typing import Any, Dict, List, Type
10
+
11
+
12
+ def build_retry_record(
13
+ attempt: int,
14
+ delay: float,
15
+ exc_type: Type[BaseException],
16
+ outcome: str,
17
+ ) -> Dict[str, Any]:
18
+ """Build a single retry attempt record."""
19
+ return {
20
+ "attempt": attempt,
21
+ "delay_s": round(delay, 3),
22
+ "exception_type": exc_type.__name__,
23
+ "outcome": outcome,
24
+ }
25
+
26
+
27
+ def build_retry_summary(history: List[Dict[str, Any]]) -> Dict[str, Any]:
28
+ """Build a summary dict from a completed retry history list."""
29
+ if not history:
30
+ return {}
31
+ last = history[-1]
32
+ return {
33
+ "total_attempts": len(history) + 1,
34
+ "retries": len(history),
35
+ "latest_exception_type": last["exception_type"],
36
+ "latest_outcome": last["outcome"],
37
+ }
38
+
39
+
40
+ __all__ = ["build_retry_record", "build_retry_summary"]
@@ -0,0 +1,16 @@
1
+ """Compatibility shim for the legacy flat auth module path.
2
+
3
+ Canonical imports now live under ``agentbyte.llm.azure.auth``.
4
+ """
5
+
6
+ from .azure.auth import (
7
+ create_token_provider_from_string,
8
+ get_certificate_token_provider,
9
+ get_default_token_provider,
10
+ )
11
+
12
+ __all__ = [
13
+ "get_default_token_provider",
14
+ "get_certificate_token_provider",
15
+ "create_token_provider_from_string",
16
+ ]
@@ -0,0 +1,22 @@
1
+ """Azure provider package."""
2
+
3
+ from .auth import (
4
+ get_default_token_provider,
5
+ get_certificate_token_provider,
6
+ create_token_provider_from_string,
7
+ )
8
+ from .chat import AzureOpenAIChatCompletionClient, AzureOpenAIChatCompletionClientConfig
9
+ from .embedding import AzureOpenAIEmbeddingClient, AzureOpenAIEmbeddingClientConfig
10
+ from .settings import AzureOpenAISettings, AzureServicePrincipalSettings
11
+
12
+ __all__ = [
13
+ "get_default_token_provider",
14
+ "get_certificate_token_provider",
15
+ "create_token_provider_from_string",
16
+ "AzureOpenAIChatCompletionClient",
17
+ "AzureOpenAIChatCompletionClientConfig",
18
+ "AzureOpenAIEmbeddingClient",
19
+ "AzureOpenAIEmbeddingClientConfig",
20
+ "AzureOpenAISettings",
21
+ "AzureServicePrincipalSettings",
22
+ ]
@@ -0,0 +1,68 @@
1
+ """
2
+ Authentication utility functions for creating token providers.
3
+
4
+ Supports DefaultAzureCredential, certificate-based, and pre-fetched token auth.
5
+ """
6
+
7
+ from typing import Callable
8
+
9
+
10
+ def get_default_token_provider() -> Callable[[], str]:
11
+ """Create a token provider using DefaultAzureCredential."""
12
+ try:
13
+ from azure.identity import DefaultAzureCredential, get_bearer_token_provider
14
+ except ImportError:
15
+ raise ImportError(
16
+ "azure-identity is required for DefaultAzureCredential. "
17
+ "Install with: pip install azure-identity"
18
+ )
19
+
20
+ credentials = DefaultAzureCredential()
21
+ token_provider = get_bearer_token_provider(
22
+ credentials, "https://cognitiveservices.azure.com/.default"
23
+ )
24
+ return token_provider
25
+
26
+
27
+ def get_certificate_token_provider(
28
+ tenant_id: str,
29
+ client_id: str,
30
+ certificate_data: bytes,
31
+ scope: str = "https://cognitiveservices.azure.com/.default",
32
+ ) -> Callable[[], str]:
33
+ """Create a token provider using X.509 certificate authentication."""
34
+ try:
35
+ from azure.identity import CertificateCredential
36
+ except ImportError:
37
+ raise ImportError(
38
+ "azure-identity is required for CertificateCredential. "
39
+ "Install with: pip install azure-identity"
40
+ )
41
+
42
+ credential = CertificateCredential(
43
+ tenant_id=tenant_id,
44
+ client_id=client_id,
45
+ certificate_data=certificate_data,
46
+ )
47
+
48
+ def token_provider() -> str:
49
+ token = credential.get_token(scope)
50
+ return token.token
51
+
52
+ return token_provider
53
+
54
+
55
+ def create_token_provider_from_string(token: str) -> Callable[[], str]:
56
+ """Create a simple token provider from a pre-authenticated token."""
57
+
58
+ def token_provider() -> str:
59
+ return token
60
+
61
+ return token_provider
62
+
63
+
64
+ __all__ = [
65
+ "get_default_token_provider",
66
+ "get_certificate_token_provider",
67
+ "create_token_provider_from_string",
68
+ ]