agentbyte 0.54.0__tar.gz → 0.56.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (440) hide show
  1. {agentbyte-0.54.0 → agentbyte-0.56.0}/.gitignore +4 -0
  2. {agentbyte-0.54.0 → agentbyte-0.56.0}/CHANGELOG.md +38 -0
  3. {agentbyte-0.54.0 → agentbyte-0.56.0}/PKG-INFO +2 -2
  4. {agentbyte-0.54.0 → agentbyte-0.56.0}/README.md +1 -1
  5. agentbyte-0.56.0/src/agentbyte/__about__.py +2 -0
  6. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/agents/__init__.py +3 -1
  7. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/agents/agent.py +17 -4
  8. agentbyte-0.56.0/src/agentbyte/agents/agent_as_tool.py +366 -0
  9. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/agents/base.py +15 -2
  10. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/compaction/grouping.py +24 -0
  11. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/anthropic/chat.py +8 -1
  12. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/bedrock/anthropic_chat.py +9 -0
  13. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/bedrock/cohere_embedding.py +10 -6
  14. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/openai/chat.py +8 -1
  15. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/openai/embedding.py +8 -1
  16. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/pricing.py +77 -7
  17. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/orchestration/base.py +5 -19
  18. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/tools/base.py +16 -0
  19. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/agents/test_agent_as_tool.py +514 -1
  20. agentbyte-0.56.0/tests/llm/test_pricing_model.py +197 -0
  21. agentbyte-0.54.0/src/agentbyte/__about__.py +0 -2
  22. agentbyte-0.54.0/src/agentbyte/agents/agent_as_tool.py +0 -192
  23. {agentbyte-0.54.0 → agentbyte-0.56.0}/LICENSE +0 -0
  24. {agentbyte-0.54.0 → agentbyte-0.56.0}/pyproject.toml +0 -0
  25. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/__init__.py +0 -0
  26. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/_optional.py +0 -0
  27. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/a2a/__init__.py +0 -0
  28. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/a2a/app.py +0 -0
  29. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/a2a/distributed_context.py +0 -0
  30. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/a2a/executor.py +0 -0
  31. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/a2a/tool.py +0 -0
  32. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/agents/types.py +0 -0
  33. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/cancellation_token.py +0 -0
  34. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/catalog.py +0 -0
  35. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/cli/__init__.py +0 -0
  36. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/cli/__main__.py +0 -0
  37. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/cli/eval_commands.py +0 -0
  38. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/cli/history_args.py +0 -0
  39. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/cli/loading.py +0 -0
  40. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/cli/main.py +0 -0
  41. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/cli/optim_commands.py +0 -0
  42. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/cli/report_output.py +0 -0
  43. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/cli/serve_commands.py +0 -0
  44. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/compaction/__init__.py +0 -0
  45. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/compaction/counters.py +0 -0
  46. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/compaction/errors.py +0 -0
  47. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/compaction/strategies.py +0 -0
  48. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/component.py +0 -0
  49. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/context.py +0 -0
  50. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/context_providers/__init__.py +0 -0
  51. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/context_providers/base.py +0 -0
  52. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/context_providers/skill_tools.py +0 -0
  53. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/context_providers/skills.py +0 -0
  54. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/dataset/__init__.py +0 -0
  55. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/dataset/_aiosqlite.py +0 -0
  56. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/dataset/base.py +0 -0
  57. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/dataset/config.py +0 -0
  58. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/dataset/importer.py +0 -0
  59. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/dataset/json.py +0 -0
  60. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/dataset/loader.py +0 -0
  61. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/dataset/publish.py +0 -0
  62. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/dataset/publish_config.py +0 -0
  63. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/dataset/publishers.py +0 -0
  64. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/dataset/s3.py +0 -0
  65. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/dataset/sources.py +0 -0
  66. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/dataset/sqlite.py +0 -0
  67. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/dataset/sqlite_db.py +0 -0
  68. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/dataset/write_config.py +0 -0
  69. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/dataset/writers.py +0 -0
  70. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/entity.py +0 -0
  71. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/__init__.py +0 -0
  72. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/base.py +0 -0
  73. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/checks/__init__.py +0 -0
  74. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/checks/decorator.py +0 -0
  75. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/checks/keyword.py +0 -0
  76. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/checks/local.py +0 -0
  77. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/checks/process.py +0 -0
  78. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/checks/tool.py +0 -0
  79. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/checks/types.py +0 -0
  80. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/comparison.py +0 -0
  81. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/eval_dataset.py +0 -0
  82. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/history/__init__.py +0 -0
  83. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/history/_writer_lock.py +0 -0
  84. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/history/config.py +0 -0
  85. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/history/conformance.py +0 -0
  86. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/history/errors.py +0 -0
  87. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/history/models.py +0 -0
  88. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/history/recorder.py +0 -0
  89. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/history/sql.py +0 -0
  90. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/history/sqlite.py +0 -0
  91. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/history/store.py +0 -0
  92. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/history/transitions.py +0 -0
  93. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/judges/__init__.py +0 -0
  94. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/judges/base.py +0 -0
  95. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/judges/composite.py +0 -0
  96. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/judges/llm.py +0 -0
  97. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/judges/pairwise.py +0 -0
  98. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/judges/reference.py +0 -0
  99. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/judges/trajectory.py +0 -0
  100. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/judges/validation.py +0 -0
  101. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/pairwise.py +0 -0
  102. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/report.py +0 -0
  103. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/runner.py +0 -0
  104. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/splitting.py +0 -0
  105. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/targets/__init__.py +0 -0
  106. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/targets/agent.py +0 -0
  107. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/targets/model.py +0 -0
  108. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/targets/multi_turn.py +0 -0
  109. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/targets/orchestrator.py +0 -0
  110. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/targets/runtime.py +0 -0
  111. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/targets/workflow.py +0 -0
  112. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/types.py +0 -0
  113. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/workbench/__init__.py +0 -0
  114. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/workbench/benchmark.py +0 -0
  115. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/workbench/compare.py +0 -0
  116. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/workbench/coordinator.py +0 -0
  117. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/workbench/jobs.py +0 -0
  118. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/workbench/smoke.py +0 -0
  119. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/workbench/smoke_tasks.json +0 -0
  120. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/workbench/suite.py +0 -0
  121. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/eval/workbench/verdict.py +0 -0
  122. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/execution_trace/__init__.py +0 -0
  123. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/execution_trace/collector.py +0 -0
  124. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/execution_trace/models.py +0 -0
  125. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/__init__.py +0 -0
  126. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/_retry_observability.py +0 -0
  127. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/anthropic/__init__.py +0 -0
  128. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/anthropic/_conversion.py +0 -0
  129. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/anthropic/settings.py +0 -0
  130. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/auth.py +0 -0
  131. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/azure/__init__.py +0 -0
  132. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/azure/auth.py +0 -0
  133. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/azure/chat.py +0 -0
  134. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/azure/embedding.py +0 -0
  135. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/azure/settings.py +0 -0
  136. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/azure_openai.py +0 -0
  137. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/azure_openai_embedding.py +0 -0
  138. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/base.py +0 -0
  139. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/bedrock/__init__.py +0 -0
  140. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/bedrock/_client.py +0 -0
  141. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/bedrock/settings.py +0 -0
  142. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/embedding_batcher.py +0 -0
  143. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/embeddings_base.py +0 -0
  144. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/openai/__init__.py +0 -0
  145. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/openai/settings.py +0 -0
  146. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/openai_embedding.py +0 -0
  147. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/retry_policy.py +0 -0
  148. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/settings.py +0 -0
  149. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/llm/types.py +0 -0
  150. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/logger.py +0 -0
  151. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/memory/__init__.py +0 -0
  152. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/memory/base.py +0 -0
  153. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/messages.py +0 -0
  154. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/middleware/__init__.py +0 -0
  155. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/middleware/base.py +0 -0
  156. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/middleware/otel.py +0 -0
  157. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/middleware/retry.py +0 -0
  158. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/middleware/sql_usage.py +0 -0
  159. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/middleware/usage_logger.py +0 -0
  160. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/notebook.py +0 -0
  161. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/optim/__init__.py +0 -0
  162. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/optim/base.py +0 -0
  163. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/optim/binding.py +0 -0
  164. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/optim/config.py +0 -0
  165. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/optim/gepa.py +0 -0
  166. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/optim/job.py +0 -0
  167. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/optim/mipro.py +0 -0
  168. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/optim/pareto.py +0 -0
  169. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/optim/reflective.py +0 -0
  170. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/optim/report.py +0 -0
  171. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/optim/spec.py +0 -0
  172. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/optim/trace.py +0 -0
  173. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/orchestration/__init__.py +0 -0
  174. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/orchestration/ai.py +0 -0
  175. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/orchestration/handoff.py +0 -0
  176. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/orchestration/plan.py +0 -0
  177. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/orchestration/policies.py +0 -0
  178. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/orchestration/round_robin.py +0 -0
  179. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/presets/__init__.py +0 -0
  180. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/presets/agents.py +0 -0
  181. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/presets/benchmark.py +0 -0
  182. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/presets/capitals.py +0 -0
  183. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/presets/clients.py +0 -0
  184. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/presets/instruction_registry.py +0 -0
  185. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/presets/instructions/orchestrator.yaml +0 -0
  186. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/presets/instructions/query_rewriter.yaml +0 -0
  187. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/presets/instructions/researcher.yaml +0 -0
  188. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/presets/instructions/reviewer.yaml +0 -0
  189. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/presets/instructions/writer.yaml +0 -0
  190. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/presets/orchestration.py +0 -0
  191. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/presets/skills/capitals-format/SKILL.md +0 -0
  192. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/presets/skills/contracts-analyst/SKILL.md +0 -0
  193. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/presets/skills/hr-analyst/SKILL.md +0 -0
  194. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/presets/skills/hr-analyst/resources/departments.md +0 -0
  195. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/presets/skills/hr-analyst/resources/employees.md +0 -0
  196. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/presets/skills/hr-analyst/resources/payroll.md +0 -0
  197. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/presets/streaming.py +0 -0
  198. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/presets/workflow.py +0 -0
  199. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/session_store.py +0 -0
  200. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/skills/__init__.py +0 -0
  201. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/skills/base.py +0 -0
  202. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/skills/resources.py +0 -0
  203. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/skills/scripts.py +0 -0
  204. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/skills/sources.py +0 -0
  205. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/skills/validation.py +0 -0
  206. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/termination/__init__.py +0 -0
  207. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/termination/base.py +0 -0
  208. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/termination/cancellation.py +0 -0
  209. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/termination/composite.py +0 -0
  210. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/termination/consecutive_agent.py +0 -0
  211. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/termination/external.py +0 -0
  212. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/termination/function_call.py +0 -0
  213. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/termination/handoff.py +0 -0
  214. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/termination/max_message.py +0 -0
  215. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/termination/predicate.py +0 -0
  216. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/termination/source.py +0 -0
  217. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/termination/text_mention.py +0 -0
  218. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/termination/timeout.py +0 -0
  219. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/termination/token_usage.py +0 -0
  220. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/tools/__init__.py +0 -0
  221. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/tools/coding_tools.py +0 -0
  222. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/tools/core_tools.py +0 -0
  223. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/tools/decorator.py +0 -0
  224. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/tools/mcp/__init__.py +0 -0
  225. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/tools/mcp/client.py +0 -0
  226. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/tools/mcp/config.py +0 -0
  227. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/tools/mcp/errors.py +0 -0
  228. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/tools/mcp/tool.py +0 -0
  229. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/tools/mcp/transports.py +0 -0
  230. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/tools/memory_tool.py +0 -0
  231. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/tools/research_tools.py +0 -0
  232. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/types.py +0 -0
  233. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/webui/__init__.py +0 -0
  234. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/webui/discovery.py +0 -0
  235. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/webui/eval_routes.py +0 -0
  236. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/webui/execution.py +0 -0
  237. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/webui/mcp/__init__.py +0 -0
  238. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/webui/mcp/servers/__init__.py +0 -0
  239. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/webui/mcp/servers/apps_server.py +0 -0
  240. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/webui/mcp/servers/auth_server.py +0 -0
  241. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/webui/mcp/servers/basic_server.py +0 -0
  242. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/webui/mcp/servers/mrtr_server.py +0 -0
  243. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/webui/mcp/servers/notify_server.py +0 -0
  244. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/webui/mcp_playground.py +0 -0
  245. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/webui/mcp_routes.py +0 -0
  246. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/webui/models.py +0 -0
  247. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/webui/registry.py +0 -0
  248. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/webui/server.py +0 -0
  249. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/webui/session_store.py +0 -0
  250. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/webui/sessions.py +0 -0
  251. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/webui/ui/assets/index-BreogZut.js +0 -0
  252. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/webui/ui/assets/index-ptxe7GHs.css +0 -0
  253. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/webui/ui/index.html +0 -0
  254. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/webui/ui/vite.svg +0 -0
  255. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/workflow/__init__.py +0 -0
  256. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/workflow/agent.py +0 -0
  257. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/workflow/core/__init__.py +0 -0
  258. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/workflow/core/_structure_hash.py +0 -0
  259. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/workflow/core/checkpoint.py +0 -0
  260. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/workflow/core/models.py +0 -0
  261. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/workflow/core/runner.py +0 -0
  262. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/workflow/core/workflow.py +0 -0
  263. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/workflow/defaults.py +0 -0
  264. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/workflow/errors.py +0 -0
  265. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/workflow/loader.py +0 -0
  266. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/workflow/schema.py +0 -0
  267. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/workflow/schema_utils.py +0 -0
  268. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/workflow/sqlite_checkpoint.py +0 -0
  269. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/workflow/steps/__init__.py +0 -0
  270. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/workflow/steps/agent.py +0 -0
  271. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/workflow/steps/echo.py +0 -0
  272. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/workflow/steps/function.py +0 -0
  273. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/workflow/steps/http.py +0 -0
  274. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/workflow/steps/step.py +0 -0
  275. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/workflow/steps/subworkflow.py +0 -0
  276. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/workflow/steps/transform.py +0 -0
  277. {agentbyte-0.54.0 → agentbyte-0.56.0}/src/agentbyte/workflow/visualizer.py +0 -0
  278. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/a2a/a2a_helpers.py +0 -0
  279. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/a2a/test_a2a_adapters.py +0 -0
  280. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/a2a/test_distributed_context.py +0 -0
  281. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/agents/test_agent_basic.py +0 -0
  282. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/agents/test_agent_client_middleware_overlap.py +0 -0
  283. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/agents/test_agent_context_providers.py +0 -0
  284. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/agents/test_agent_error_response.py +0 -0
  285. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/agents/test_agent_event_types.py +0 -0
  286. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/agents/test_agent_memory_integration.py +0 -0
  287. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/agents/test_agent_middleware_integration.py +0 -0
  288. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/agents/test_agent_response_accessors.py +0 -0
  289. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/agents/test_agent_retry_middleware.py +0 -0
  290. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/agents/test_agent_stop_at_tools.py +0 -0
  291. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/agents/test_agent_stream_events.py +0 -0
  292. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/agents/test_tool_approval.py +0 -0
  293. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/agents/test_tool_batch_resolution.py +0 -0
  294. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/agents/test_tool_metadata.py +0 -0
  295. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/cli/test_eval_benchmark_commands.py +0 -0
  296. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/cli/test_loading.py +0 -0
  297. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/cli/test_registry_check.py +0 -0
  298. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/cli/test_report_output.py +0 -0
  299. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/cli/test_serve_command.py +0 -0
  300. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/compaction/test_compaction.py +0 -0
  301. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/conftest.py +0 -0
  302. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/context_providers/__init__.py +0 -0
  303. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/context_providers/test_skill_tools.py +0 -0
  304. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/context_providers/test_skills_provider.py +0 -0
  305. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/dataset/fake_s3.py +0 -0
  306. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/dataset/test_dataset_exit.py +0 -0
  307. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/dataset/test_loader.py +0 -0
  308. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/dataset/test_multi_table.py +0 -0
  309. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/dataset/test_publish.py +0 -0
  310. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/dataset/test_sqlite_db.py +0 -0
  311. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/eval/test_dimension_scores.py +0 -0
  312. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/eval/test_eval_benchmarks.py +0 -0
  313. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/eval/test_eval_dataset.py +0 -0
  314. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/eval/test_eval_history.py +0 -0
  315. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/eval/test_eval_history_backends.py +0 -0
  316. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/eval/test_eval_jobs.py +0 -0
  317. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/eval/test_eval_workbench.py +0 -0
  318. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/eval/test_execution_trajectories.py +0 -0
  319. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/eval/test_history_config.py +0 -0
  320. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/eval/test_multi_turn.py +0 -0
  321. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/eval/test_pairwise.py +0 -0
  322. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/eval/test_phase1_runner_and_targets.py +0 -0
  323. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/eval/test_phase2_checks_and_reports.py +0 -0
  324. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/eval/test_run_comparison.py +0 -0
  325. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/eval/test_score_integrity.py +0 -0
  326. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/eval/test_splitting.py +0 -0
  327. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/eval/test_types_and_judges.py +0 -0
  328. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/llm/test_anthropic_bedrock_client.py +0 -0
  329. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/llm/test_anthropic_client.py +0 -0
  330. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/llm/test_azure_client.py +0 -0
  331. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/llm/test_azure_embedding_client.py +0 -0
  332. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/llm/test_client_middleware.py +0 -0
  333. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/llm/test_cohere_bedrock_embedding_client.py +0 -0
  334. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/llm/test_embedding_batcher.py +0 -0
  335. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/llm/test_llm_types.py +0 -0
  336. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/llm/test_openai_client.py +0 -0
  337. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/llm/test_openai_embedding_client.py +0 -0
  338. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/llm/test_pricing.py +0 -0
  339. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/llm/test_retry_observability.py +0 -0
  340. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/llm/test_retry_policy_api.py +0 -0
  341. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/llm/test_retryable_error_substrings.py +0 -0
  342. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/memory/test_memory.py +0 -0
  343. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/middleware/test_context_compaction.py +0 -0
  344. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/middleware/test_deduplicate_tool_result.py +0 -0
  345. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/middleware/test_middleware_chain.py +0 -0
  346. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/middleware/test_otel.py +0 -0
  347. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/middleware/test_retry_middleware.py +0 -0
  348. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/middleware/test_sql_usage.py +0 -0
  349. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/middleware/test_usage_logger.py +0 -0
  350. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/optim/__init__.py +0 -0
  351. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/optim/fakes.py +0 -0
  352. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/optim/test_base.py +0 -0
  353. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/optim/test_base_integration.py +0 -0
  354. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/optim/test_binding.py +0 -0
  355. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/optim/test_config.py +0 -0
  356. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/optim/test_description_tunable.py +0 -0
  357. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/optim/test_gepa.py +0 -0
  358. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/optim/test_mipro.py +0 -0
  359. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/optim/test_orchestrator_optim.py +0 -0
  360. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/optim/test_pareto.py +0 -0
  361. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/optim/test_reflective.py +0 -0
  362. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/optim/test_report.py +0 -0
  363. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/optim/test_score_integrity.py +0 -0
  364. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/optim/test_spec.py +0 -0
  365. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/optim/test_trace.py +0 -0
  366. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/orchestration/test_ai_orchestrator.py +0 -0
  367. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/orchestration/test_base_orchestrator.py +0 -0
  368. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/orchestration/test_handoff_orchestrator.py +0 -0
  369. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/orchestration/test_history_tool_call_pairing.py +0 -0
  370. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/orchestration/test_orchestration_usage_breakdown.py +0 -0
  371. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/orchestration/test_orchestrator_agent_contract.py +0 -0
  372. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/orchestration/test_orchestrator_finalization.py +0 -0
  373. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/orchestration/test_orchestrator_member_events.py +0 -0
  374. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/orchestration/test_orchestrator_otel.py +0 -0
  375. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/orchestration/test_orchestrator_synthesis.py +0 -0
  376. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/orchestration/test_plan_orchestrator.py +0 -0
  377. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/orchestration/test_round_robin.py +0 -0
  378. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/presets/test_agents.py +0 -0
  379. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/presets/test_benchmark.py +0 -0
  380. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/presets/test_capitals.py +0 -0
  381. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/presets/test_clients.py +0 -0
  382. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/presets/test_instruction_registry.py +0 -0
  383. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/presets/test_orchestration.py +0 -0
  384. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/presets/test_streaming.py +0 -0
  385. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/presets/test_workflow.py +0 -0
  386. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/skills/__init__.py +0 -0
  387. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/skills/test_base.py +0 -0
  388. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/skills/test_resources.py +0 -0
  389. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/skills/test_scripts.py +0 -0
  390. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/skills/test_sources.py +0 -0
  391. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/termination/test_base.py +0 -0
  392. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/termination/test_cancellation.py +0 -0
  393. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/termination/test_composite.py +0 -0
  394. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/termination/test_consecutive_agent.py +0 -0
  395. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/termination/test_external.py +0 -0
  396. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/termination/test_function_call.py +0 -0
  397. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/termination/test_handoff.py +0 -0
  398. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/termination/test_max_message.py +0 -0
  399. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/termination/test_predicate.py +0 -0
  400. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/termination/test_source.py +0 -0
  401. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/termination/test_text_mention.py +0 -0
  402. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/termination/test_timeout.py +0 -0
  403. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/termination/test_token_usage.py +0 -0
  404. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/test_cancellation_token.py +0 -0
  405. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/test_context.py +0 -0
  406. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/test_logger.py +0 -0
  407. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/test_messages.py +0 -0
  408. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/test_option_enums.py +0 -0
  409. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/test_optional_extras.py +0 -0
  410. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/test_package_api.py +0 -0
  411. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/test_session_store.py +0 -0
  412. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/test_types.py +0 -0
  413. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/tools/fixtures/mcp_stdio_server.py +0 -0
  414. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/tools/test_coding_tools.py +0 -0
  415. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/tools/test_mcp_tools.py +0 -0
  416. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/tools/test_memory_tool.py +0 -0
  417. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/tools/test_research_tools.py +0 -0
  418. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/tools/test_tools.py +0 -0
  419. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/webui/__init__.py +0 -0
  420. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/webui/helpers.py +0 -0
  421. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/webui/test_eval_routes.py +0 -0
  422. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/webui/test_execution.py +0 -0
  423. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/webui/test_mcp_routes.py +0 -0
  424. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/webui/test_package_api.py +0 -0
  425. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/webui/test_registry.py +0 -0
  426. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/webui/test_server.py +0 -0
  427. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/webui/test_sessions.py +0 -0
  428. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/webui/test_workflow_streaming.py +0 -0
  429. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/workflow/recovery_worker.py +0 -0
  430. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/workflow/test_agent_step_imports.py +0 -0
  431. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/workflow/test_checkpoint.py +0 -0
  432. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/workflow/test_subworkflow_step.py +0 -0
  433. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/workflow/test_workflow_agent.py +0 -0
  434. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/workflow/test_workflow_class.py +0 -0
  435. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/workflow/test_workflow_models.py +0 -0
  436. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/workflow/test_workflow_reliability.py +0 -0
  437. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/workflow/test_workflow_runner.py +0 -0
  438. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/workflow/test_workflow_schema.py +0 -0
  439. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/workflow/test_workflow_steps.py +0 -0
  440. {agentbyte-0.54.0 → agentbyte-0.56.0}/tests/workflow/test_workflow_visualizer.py +0 -0
@@ -84,3 +84,7 @@ optim-reports/
84
84
 
85
85
  # marimo local session cache
86
86
  __marimo__/
87
+
88
+ # Local Claude worktrees and machine-specific permissions
89
+ .claude/worktrees/
90
+ .claude/settings.local.json
@@ -6,6 +6,44 @@ The format follows Keep a Changelog principles and semantic versioning.
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.56.0] - 2026-10-23
10
+
11
+ ### Added
12
+
13
+ - `pricing_model=` on OpenAI chat/embedding, Anthropic direct/Bedrock chat, and Cohere Bedrock
14
+ embedding constructors and factories, matching Azure pricing aliases. Component configs preserve
15
+ the alias; manual `model_pricing` takes precedence while transport model IDs remain unchanged.
16
+ - Standard short-context catalog entries for `gpt-6.1-sol`, `gpt-6-astra`, and `gpt-6-luna`,
17
+ including cached-input and 30-minute cache-write metadata.
18
+
19
+ ### Changed
20
+
21
+ - Consolidated 19 AgentByte coding skills into one topic router with references loaded on demand;
22
+ removed the WebUI smoke-test skill and repaired migration-guide links.
23
+ - Added proposed spec 0077 for OpenAI models on Bedrock over SigV4 and updated the spec index.
24
+
25
+ ### Fixed
26
+
27
+ - Exact Claude Sonnet 5.5, Fable 5.1, Mythos 5, and Mythos 5.1 pricing prevents sibling fallback.
28
+ Claude 5-series rates now include cache reads and 5-minute cache-write metadata, including
29
+ Haiku 5.5 below the 100K prompt threshold.
30
+
31
+ ## [0.55.0] - 2026-10-12
32
+
33
+ ### Added
34
+
35
+ - `AgentToolContextPolicy` (strategy enum plus `message_limit`) configures what a sub-agent tool
36
+ inherits from its caller via `context_policy` on `AgentAsTool` and `Agent.as_tool()`. Strategies:
37
+ `identity` (default), `last_task`, `recent`, `full`, or a callable. `session_id`/`user_id` are always
38
+ inherited. `BaseTool.accepts_context()` lets the agent loop forward its working context to opted-in tools.
39
+ - `compaction.grouping.select_recent_messages()`: shared last-N window that never splits a tool exchange,
40
+ now used by both orchestration and agent tools.
41
+
42
+ ### Changed
43
+
44
+ - The in-flight delegation call is excluded from seeded sub-agent history so it is always a valid sequence.
45
+ - `AgentToolContextPolicy` rejects `message_limit` for any strategy other than `recent`.
46
+
9
47
  ## [0.54.0] - 2026-10-12
10
48
 
11
49
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: agentbyte
3
- Version: 0.54.0
3
+ Version: 0.56.0
4
4
  Summary: A toolkit for designing multiagent systems
5
5
  Author-email: MrDataPsycho <mr.data.psycho@gmail.com>
6
6
  License-Expression: LicenseRef-Proprietary
@@ -90,7 +90,7 @@ Description-Content-Type: text/markdown
90
90
 
91
91
  Agentbyte is an observability-first agentic AI framework for building and studying multiagent systems with a learning-first, implementation-oriented workflow.
92
92
 
93
- Current release: **0.54.0**
93
+ Current release: **0.56.0**
94
94
 
95
95
  ## Building an Agent
96
96
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Agentbyte is an observability-first agentic AI framework for building and studying multiagent systems with a learning-first, implementation-oriented workflow.
4
4
 
5
- Current release: **0.54.0**
5
+ Current release: **0.56.0**
6
6
 
7
7
  ## Building an Agent
8
8
 
@@ -0,0 +1,2 @@
1
+ __version__ = "0.56.0"
2
+ VERSION = __version__
@@ -3,7 +3,7 @@ Agent implementations and abstractions.
3
3
  """
4
4
 
5
5
  from .agent import Agent
6
- from .agent_as_tool import AgentAsTool
6
+ from .agent_as_tool import AgentAsTool, AgentToolContextPolicy, ContextStrategy
7
7
  from .base import (
8
8
  AgentConfigurationError,
9
9
  AgentError,
@@ -35,6 +35,8 @@ __all__ = [
35
35
  "BaseAgent",
36
36
  "Agent",
37
37
  "AgentAsTool",
38
+ "ContextStrategy",
39
+ "AgentToolContextPolicy",
38
40
  "AgentError",
39
41
  "AgentConfigurationError",
40
42
  "AgentExecutionError",
@@ -188,10 +188,19 @@ class Agent(BaseAgent):
188
188
  "tool_call payload parameters must be a dictionary"
189
189
  )
190
190
 
191
- async for item in tool.execute_stream(
192
- tool_parameters,
193
- cancellation_token,
194
- ):
191
+ if tool.accepts_context():
192
+ stream = tool.execute_stream(
193
+ tool_parameters,
194
+ agent_context=working_context,
195
+ cancellation_token=cancellation_token,
196
+ )
197
+ else:
198
+ stream = tool.execute_stream(
199
+ tool_parameters,
200
+ cancellation_token=cancellation_token,
201
+ )
202
+
203
+ async for item in stream:
195
204
  yield item
196
205
 
197
206
  streamed_result: object | None = None
@@ -280,6 +289,10 @@ class Agent(BaseAgent):
280
289
  raise ValueError(
281
290
  "tool_call payload parameters must be a dictionary"
282
291
  )
292
+ if tool.accepts_context():
293
+ return await tool.execute(
294
+ tool_parameters, agent_context=working_context
295
+ )
283
296
  return await tool.execute(tool_parameters)
284
297
 
285
298
  result: object | None = None
@@ -0,0 +1,366 @@
1
+ """
2
+ Wrap agents as tools for hierarchical agent composition.
3
+ """
4
+
5
+ from collections.abc import AsyncGenerator, Callable
6
+ from enum import StrEnum
7
+ from typing import Any, Dict, List, Optional, Protocol, Union, runtime_checkable
8
+
9
+ from pydantic import BaseModel, ConfigDict, StrictInt, model_validator
10
+
11
+ from agentbyte.cancellation_token import CancellationToken
12
+ from agentbyte.compaction.grouping import select_recent_messages
13
+ from agentbyte.context import AgentContext
14
+ from agentbyte.llm.types import ChatCompletionChunk
15
+ from agentbyte.messages import AssistantMessage, Message, ToolMessage, UserMessage
16
+ from agentbyte.tools.base import BaseTool
17
+ from agentbyte.types import ToolResult
18
+
19
+ from .types import AgentEvent, AgentResponse
20
+
21
+ ResultStrategy = Union[str, Callable[[List[Message]], str]]
22
+
23
+
24
+ class ContextStrategy(StrEnum):
25
+ """Which slice of the caller's conversation a sub-agent inherits.
26
+
27
+ Identity (``session_id``/``user_id``) is always inherited so sub-agent usage
28
+ aggregates under the parent; each strategy adds messages on top of it. The
29
+ recent window mirrors the orchestrator's ``HistoryWindow`` vocabulary and
30
+ reuses its whole-tool-exchange windowing (spec 0064).
31
+ """
32
+
33
+ IDENTITY = "identity"
34
+ """Identity only — no messages (default, no context bloat)."""
35
+ LAST_TASK = "last_task"
36
+ """Identity plus the caller's most recent user task."""
37
+ RECENT = "recent"
38
+ """Identity plus the last ``message_limit`` messages (never splitting a tool
39
+ exchange)."""
40
+ FULL = "full"
41
+ """Identity plus the whole caller conversation."""
42
+
43
+
44
+ class AgentToolContextPolicy(BaseModel):
45
+ """How much of the caller's conversation a sub-agent tool inherits."""
46
+
47
+ model_config = ConfigDict(extra="forbid", frozen=True)
48
+
49
+ strategy: ContextStrategy = ContextStrategy.IDENTITY
50
+ """Which messages to seed. Plain strings are accepted."""
51
+ message_limit: Optional[StrictInt] = None
52
+ """Minimum messages for ``recent``; more are kept to preserve whole tool
53
+ exchanges. Required (>= 1) for ``recent`` and rejected otherwise."""
54
+
55
+ @model_validator(mode="after")
56
+ def validate_limit(self) -> "AgentToolContextPolicy":
57
+ """Require a limit for the recent strategy and reject it elsewhere."""
58
+ if self.strategy is ContextStrategy.RECENT:
59
+ if self.message_limit is None or self.message_limit < 1:
60
+ raise ValueError(
61
+ "message_limit must be >= 1 when strategy='recent'"
62
+ )
63
+ elif self.message_limit is not None:
64
+ raise ValueError("message_limit is only valid when strategy='recent'")
65
+ return self
66
+
67
+
68
+ # A callable selector is the escape hatch for fully custom curation.
69
+ ContextPolicyInput = Union[
70
+ AgentToolContextPolicy, Callable[[AgentContext], List[Message]]
71
+ ]
72
+
73
+
74
+ @runtime_checkable
75
+ class AgentToolCompatible(Protocol):
76
+ name: str
77
+ description: str
78
+
79
+ async def run(
80
+ self,
81
+ task: Optional[Union[str, UserMessage, List[Message]]] = None,
82
+ context: Optional[AgentContext] = None,
83
+ cancellation_token: Optional[CancellationToken] = None,
84
+ ) -> AgentResponse: ...
85
+
86
+ def run_stream(
87
+ self,
88
+ task: Optional[Union[str, UserMessage, List[Message]]] = None,
89
+ context: Optional[AgentContext] = None,
90
+ cancellation_token: Optional[CancellationToken] = None,
91
+ verbose: bool = False,
92
+ stream_tokens: bool = False,
93
+ ) -> AsyncGenerator[
94
+ Union[Message, AgentEvent, AgentResponse, ChatCompletionChunk], None
95
+ ]: ...
96
+
97
+
98
+ class AgentAsTool(BaseTool):
99
+ """Expose any BaseAgent as a BaseTool."""
100
+
101
+ def __init__(
102
+ self,
103
+ agent: AgentToolCompatible,
104
+ task_parameter_name: str = "task",
105
+ result_strategy: ResultStrategy = "last",
106
+ context_policy: Optional[ContextPolicyInput] = None,
107
+ ) -> None:
108
+ if not isinstance(agent, AgentToolCompatible):
109
+ raise TypeError("agent must implement the agent tool interface")
110
+
111
+ super().__init__(name=agent.name, description=agent.description)
112
+
113
+ self.agent = agent
114
+ self.task_parameter_name = task_parameter_name
115
+ self.result_strategy = result_strategy
116
+ if context_policy is None:
117
+ context_policy = AgentToolContextPolicy()
118
+ if not callable(context_policy) and not isinstance(
119
+ context_policy, AgentToolContextPolicy
120
+ ):
121
+ raise TypeError(
122
+ "context_policy must be an AgentToolContextPolicy or callable"
123
+ )
124
+ self.context_policy = context_policy
125
+ self._validate_result_strategy()
126
+
127
+ def _validate_result_strategy(self) -> None:
128
+ if callable(self.result_strategy):
129
+ return
130
+
131
+ if not isinstance(self.result_strategy, str):
132
+ raise TypeError("result_strategy must be a string or callable")
133
+
134
+ if self.result_strategy in {"last", "all"}:
135
+ return
136
+
137
+ if self.result_strategy.startswith("last:"):
138
+ try:
139
+ count = int(self.result_strategy.split(":", maxsplit=1)[1])
140
+ except ValueError as exc:
141
+ raise ValueError(
142
+ "Invalid result_strategy format, expected 'last:N'",
143
+ ) from exc
144
+
145
+ if count <= 0:
146
+ raise ValueError("N must be positive in 'last:N' strategy")
147
+ return
148
+
149
+ raise ValueError(
150
+ "Unknown result_strategy. Use 'last', 'last:N', 'all', or callable.",
151
+ )
152
+
153
+ def _select_inherited_messages(
154
+ self, agent_context: AgentContext
155
+ ) -> List[Message]:
156
+ """Pick which caller messages to seed into the sub-agent.
157
+
158
+ Built-in strategies operate on the caller's resolved history (its live
159
+ in-flight delegation call excluded) and always yield a valid sequence:
160
+ ``identity`` carries none, ``last_task`` the most recent user task,
161
+ ``recent`` the last ``message_limit`` messages (whole tool exchanges, via
162
+ the shared :func:`select_recent_messages`), and ``full`` the entire
163
+ history. A callable returns a fully custom selection and owns its own
164
+ validity.
165
+ """
166
+ policy = self.context_policy
167
+ if not isinstance(policy, AgentToolContextPolicy):
168
+ return list(policy(agent_context))
169
+
170
+ strategy = policy.strategy
171
+ if strategy is ContextStrategy.IDENTITY:
172
+ return []
173
+
174
+ history = self._resolved_history(agent_context.messages)
175
+
176
+ if strategy is ContextStrategy.LAST_TASK:
177
+ for message in reversed(history):
178
+ if isinstance(message, UserMessage):
179
+ return [message]
180
+ return []
181
+
182
+ if strategy is ContextStrategy.FULL:
183
+ return history
184
+
185
+ # RECENT — the policy guarantees message_limit >= 1.
186
+ assert policy.message_limit is not None
187
+ return select_recent_messages(history, policy.message_limit)
188
+
189
+ @staticmethod
190
+ def _resolved_history(messages: List[Message]) -> List[Message]:
191
+ """Return the caller's history with its in-flight delegation call removed.
192
+
193
+ ``AgentAsTool`` runs inside the caller's live working context, whose last
194
+ assistant message is the tool call that triggered this sub-agent — its
195
+ result does not exist yet. That trailing exchange is pending (it would
196
+ fail grouping), so exclude it before windowing; earlier turns are already
197
+ complete.
198
+ """
199
+ resolved = list(messages)
200
+ trailing_results: List[Message] = []
201
+ while resolved and isinstance(resolved[-1], ToolMessage):
202
+ trailing_results.append(resolved.pop())
203
+
204
+ if (
205
+ resolved
206
+ and isinstance(resolved[-1], AssistantMessage)
207
+ and resolved[-1].tool_calls
208
+ ):
209
+ answered = {m.tool_call_id for m in trailing_results}
210
+ if not all(tc.call_id in answered for tc in resolved[-1].tool_calls):
211
+ resolved.pop() # unresolved in-flight delegation batch
212
+ return resolved
213
+
214
+ # Tail is a complete exchange (or no tool exchange) — keep everything.
215
+ return list(messages)
216
+
217
+ def _extract_result(self, messages: List[Message]) -> str:
218
+ if not messages:
219
+ return ""
220
+
221
+ if callable(self.result_strategy):
222
+ return self.result_strategy(messages)
223
+
224
+ if self.result_strategy == "last":
225
+ return messages[-1].content
226
+
227
+ if self.result_strategy == "all":
228
+ return "\n".join(message.content for message in messages)
229
+
230
+ count = int(self.result_strategy.split(":", maxsplit=1)[1])
231
+ selected = messages[-count:]
232
+ return "\n".join(message.content for message in selected)
233
+
234
+ @property
235
+ def parameters(self) -> Dict[str, Any]:
236
+ return {
237
+ "type": "object",
238
+ "properties": {
239
+ self.task_parameter_name: {
240
+ "type": "string",
241
+ "description": f"Task for {self.agent.name} to complete",
242
+ },
243
+ },
244
+ "required": [self.task_parameter_name],
245
+ }
246
+
247
+ def accepts_context(self) -> bool:
248
+ """Opt in to receiving the calling agent's context for identity reuse."""
249
+ return True
250
+
251
+ def _resolve_context(
252
+ self,
253
+ context: Optional[AgentContext],
254
+ agent_context: Optional[AgentContext],
255
+ ) -> Optional[AgentContext]:
256
+ """Resolve the context the sub-agent should run with.
257
+
258
+ An explicit ``context`` (passed by a direct caller) is used as-is. When
259
+ the agent loop forwards its ``agent_context`` instead, the sub-agent runs
260
+ in a fresh, isolated context that inherits identity — ``session_id`` and
261
+ ``user_id`` — so its usage records aggregate under the parent
262
+ session/user without polluting the parent conversation. The sub-run keeps
263
+ its own ``run_id`` because it is a distinct agent invocation.
264
+
265
+ ``context_policy`` optionally seeds a slice of the parent conversation
266
+ into that fresh context (default ``identity`` seeds none), letting the
267
+ sub-agent see recent turns without copying the full history.
268
+ """
269
+ if context is not None:
270
+ return context
271
+ if agent_context is None:
272
+ return None
273
+
274
+ child = AgentContext(
275
+ session_id=agent_context.session_id,
276
+ user_id=agent_context.user_id,
277
+ )
278
+ for message in self._select_inherited_messages(agent_context):
279
+ child.add_message(message)
280
+ return child
281
+
282
+ async def execute(
283
+ self,
284
+ parameters: Dict[str, Any],
285
+ context: Optional[AgentContext] = None,
286
+ agent_context: Optional[AgentContext] = None,
287
+ ) -> ToolResult:
288
+ task_str = parameters.get(self.task_parameter_name, "")
289
+ task = UserMessage(content=task_str, source="user")
290
+ run_context = self._resolve_context(context, agent_context)
291
+
292
+ try:
293
+ response = await self.agent.run(task=task, context=run_context)
294
+ final_content = self._extract_result(response.messages)
295
+ return ToolResult(
296
+ success=True,
297
+ result=final_content,
298
+ metadata={
299
+ "agent_name": self.agent.name,
300
+ "message_count": len(response.messages),
301
+ "usage": response.usage.model_dump() if response.usage else None,
302
+ "finish_reason": response.finish_reason,
303
+ },
304
+ )
305
+ except Exception as exc:
306
+ return ToolResult(
307
+ success=False,
308
+ result="",
309
+ error=f"Agent execution failed: {exc}",
310
+ metadata={"agent_name": self.agent.name},
311
+ )
312
+
313
+ async def execute_stream(
314
+ self,
315
+ parameters: Dict[str, Any],
316
+ context: Optional[AgentContext] = None,
317
+ cancellation_token: Optional[CancellationToken] = None,
318
+ agent_context: Optional[AgentContext] = None,
319
+ ) -> AsyncGenerator[Union[Message, AgentEvent, ToolResult], None]:
320
+ task_str = parameters.get(self.task_parameter_name, "")
321
+ task = UserMessage(content=task_str, source="user")
322
+ run_context = self._resolve_context(context, agent_context)
323
+ final_response: Optional[AgentResponse] = None
324
+
325
+ try:
326
+ async for item in self.agent.run_stream(
327
+ task=task,
328
+ context=run_context,
329
+ cancellation_token=cancellation_token,
330
+ verbose=True,
331
+ stream_tokens=False,
332
+ ):
333
+ if isinstance(item, AgentResponse):
334
+ final_response = item
335
+ else:
336
+ yield item
337
+
338
+ result_content = ""
339
+ metadata: Dict[str, Any] = {"agent_name": self.agent.name}
340
+
341
+ if final_response is not None:
342
+ result_content = self._extract_result(final_response.messages)
343
+ metadata["message_count"] = len(final_response.messages)
344
+ metadata["usage"] = (
345
+ final_response.usage.model_dump() if final_response.usage else None
346
+ )
347
+ metadata["finish_reason"] = final_response.finish_reason
348
+
349
+ yield ToolResult(success=True, result=result_content, metadata=metadata)
350
+ except Exception as exc:
351
+ yield ToolResult(
352
+ success=False,
353
+ result="",
354
+ error=f"Agent execution failed: {exc}",
355
+ metadata={"agent_name": self.agent.name},
356
+ )
357
+
358
+
359
+ __all__ = [
360
+ "AgentAsTool",
361
+ "ResultStrategy",
362
+ "ContextStrategy",
363
+ "AgentToolContextPolicy",
364
+ "ContextPolicyInput",
365
+ "AgentToolCompatible",
366
+ ]
@@ -6,7 +6,10 @@ import json
6
6
  import warnings
7
7
  from abc import ABC, abstractmethod
8
8
  from collections.abc import AsyncGenerator, Callable
9
- from typing import Any, Dict, List, Optional, Type, Union
9
+ from typing import TYPE_CHECKING, Any, Dict, List, Optional, Type, Union
10
+
11
+ if TYPE_CHECKING:
12
+ from .agent_as_tool import ContextPolicyInput
10
13
 
11
14
  from pydantic import BaseModel
12
15
 
@@ -309,14 +312,24 @@ class BaseAgent(ABC):
309
312
  self,
310
313
  task_parameter_name: str = "task",
311
314
  result_strategy: Union[str, Callable[[List[Message]], str]] = "last",
315
+ context_policy: Optional["ContextPolicyInput"] = None,
312
316
  ) -> BaseTool:
313
- """Wrap this agent as a tool for hierarchical composition."""
317
+ """Wrap this agent as a tool for hierarchical composition.
318
+
319
+ ``context_policy`` controls how much of the calling agent's conversation
320
+ the sub-agent inherits: an :class:`AgentToolContextPolicy` (default
321
+ ``identity`` seeds no messages; ``last_task``, ``recent`` with
322
+ ``message_limit``, and ``full`` seed more) or a callable for a custom
323
+ selection. ``session_id`` and ``user_id`` are always inherited so
324
+ sub-agent usage aggregates under the parent session/user.
325
+ """
314
326
  from .agent_as_tool import AgentAsTool
315
327
 
316
328
  return AgentAsTool(
317
329
  agent=self,
318
330
  task_parameter_name=task_parameter_name,
319
331
  result_strategy=result_strategy,
332
+ context_policy=context_policy,
320
333
  )
321
334
 
322
335
  @abstractmethod
@@ -119,3 +119,27 @@ def group_messages(messages: list[Any]) -> list[MessageGroup]:
119
119
  index += 1
120
120
 
121
121
  return groups
122
+
123
+
124
+ def select_recent_messages(messages: list[Any], message_limit: int) -> list[Any]:
125
+ """Return the last *message_limit* messages without splitting a tool exchange.
126
+
127
+ Groups the conversation with :func:`group_messages` and keeps whole groups
128
+ from the newest end until at least *message_limit* messages are covered. The
129
+ limit is a floor rather than an exact count: a tool exchange is kept whole
130
+ rather than cut between a tool-calling ``AssistantMessage`` and its results,
131
+ which would otherwise leave an orphaned tool result (spec 0064).
132
+
133
+ *messages* must already be a valid sequence (no pending or orphaned tool
134
+ exchanges); see :func:`group_messages` for the raised errors otherwise.
135
+ """
136
+ groups = group_messages(messages)
137
+ kept: list[MessageGroup] = []
138
+ count = 0
139
+ for group in reversed(groups):
140
+ kept.append(group)
141
+ count += len(group.messages)
142
+ if count >= message_limit:
143
+ break
144
+ kept.reverse()
145
+ return [message for group in kept for message in group.messages]
@@ -19,6 +19,7 @@ from ._conversion import AnthropicConversionMixin
19
19
  class AnthropicChatCompletionClientConfig(BaseChatCompletionClientConfig):
20
20
  """Configuration for AnthropicChatCompletionClient serialization."""
21
21
 
22
+ pricing_model: str | None = None
22
23
  retry_policy: RetryPolicy = RetryPolicy()
23
24
  key_env_var: str = "ANTHROPIC_API_KEY"
24
25
 
@@ -46,9 +47,11 @@ class AnthropicChatCompletionClient(
46
47
  max_retry_delay: float = 60.0,
47
48
  retry_policy: Optional[RetryPolicy] = None,
48
49
  middlewares: Optional[List[ClientMiddleware]] = None,
50
+ pricing_model: str | None = None,
49
51
  ):
50
52
  super().__init__(model, client, config, middlewares=middlewares)
51
53
  self.model_pricing = model_pricing
54
+ self.pricing_model = pricing_model
52
55
  if retry_policy is not None:
53
56
  self.retry_policy = retry_policy
54
57
  else:
@@ -83,6 +86,7 @@ class AnthropicChatCompletionClient(
83
86
  max_retry_delay: float = 60.0,
84
87
  retry_policy: Optional[RetryPolicy] = None,
85
88
  middlewares: Optional[List[ClientMiddleware]] = None,
89
+ pricing_model: str | None = None,
86
90
  ) -> "AnthropicChatCompletionClient":
87
91
  """Create a client from an explicit or env-backed API key."""
88
92
  from pydantic import ValidationError
@@ -109,6 +113,7 @@ class AnthropicChatCompletionClient(
109
113
  client=anthropic_client,
110
114
  config=config,
111
115
  model_pricing=model_pricing,
116
+ pricing_model=pricing_model,
112
117
  max_retries=max_retries,
113
118
  initial_retry_delay=initial_retry_delay,
114
119
  max_retry_delay=max_retry_delay,
@@ -126,13 +131,14 @@ class AnthropicChatCompletionClient(
126
131
  if self.model_pricing is not None:
127
132
  pricing = self.model_pricing
128
133
  else:
129
- pricing = PricingRegistry.resolve_anthropic_chat_pricing(self.model)
134
+ pricing = PricingRegistry.resolve_anthropic_chat_pricing(self.pricing_model or self.model)
130
135
  return pricing.calculate_cost(input_tokens, output_tokens, cached_tokens)
131
136
 
132
137
  def _to_config(self) -> AnthropicChatCompletionClientConfig:
133
138
  """Serialize to config without persisting secrets."""
134
139
  return AnthropicChatCompletionClientConfig(
135
140
  model=self.model,
141
+ pricing_model=self.pricing_model,
136
142
  config=self.config.copy(),
137
143
  retry_policy=self.retry_policy,
138
144
  key_env_var=getattr(self, "_key_env_var", "ANTHROPIC_API_KEY"),
@@ -153,6 +159,7 @@ class AnthropicChatCompletionClient(
153
159
  )
154
160
  instance = cls.from_api_key(
155
161
  model=config.model,
162
+ pricing_model=config.pricing_model,
156
163
  api_key=api_key,
157
164
  config=config.config or None,
158
165
  retry_policy=config.retry_policy,