autobyteus 1.1.2__tar.gz → 1.1.3__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 (322) hide show
  1. {autobyteus-1.1.2 → autobyteus-1.1.3}/PKG-INFO +2 -1
  2. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/bootstrap_steps/__init__.py +2 -0
  3. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/bootstrap_steps/agent_bootstrapper.py +2 -0
  4. autobyteus-1.1.3/autobyteus/agent/bootstrap_steps/mcp_server_prewarming_step.py +71 -0
  5. autobyteus-1.1.3/autobyteus/agent/llm_response_processor/provider_aware_tool_usage_processor.py +83 -0
  6. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/runtime/agent_worker.py +24 -34
  7. autobyteus-1.1.3/autobyteus/agent/shutdown_steps/__init__.py +17 -0
  8. autobyteus-1.1.3/autobyteus/agent/shutdown_steps/agent_shutdown_orchestrator.py +63 -0
  9. autobyteus-1.1.3/autobyteus/agent/shutdown_steps/base_shutdown_step.py +33 -0
  10. autobyteus-1.1.3/autobyteus/agent/shutdown_steps/llm_instance_cleanup_step.py +45 -0
  11. autobyteus-1.1.3/autobyteus/agent/shutdown_steps/mcp_server_cleanup_step.py +32 -0
  12. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/base_tool.py +2 -0
  13. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/mcp/__init__.py +10 -7
  14. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/mcp/call_handlers/__init__.py +0 -2
  15. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/mcp/config_service.py +1 -6
  16. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/mcp/factory.py +12 -26
  17. autobyteus-1.1.3/autobyteus/tools/mcp/registrar.py +202 -0
  18. autobyteus-1.1.3/autobyteus/tools/mcp/server/__init__.py +16 -0
  19. autobyteus-1.1.3/autobyteus/tools/mcp/server/base_managed_mcp_server.py +139 -0
  20. autobyteus-1.1.3/autobyteus/tools/mcp/server/http_managed_mcp_server.py +29 -0
  21. autobyteus-1.1.3/autobyteus/tools/mcp/server/proxy.py +36 -0
  22. autobyteus-1.1.3/autobyteus/tools/mcp/server/stdio_managed_mcp_server.py +33 -0
  23. autobyteus-1.1.3/autobyteus/tools/mcp/server_instance_manager.py +93 -0
  24. autobyteus-1.1.3/autobyteus/tools/mcp/tool.py +83 -0
  25. autobyteus-1.1.3/autobyteus/tools/mcp/tool_registrar.py +177 -0
  26. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/mcp/types.py +10 -21
  27. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/registry/tool_definition.py +11 -2
  28. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/registry/tool_registry.py +27 -28
  29. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus.egg-info/PKG-INFO +2 -1
  30. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus.egg-info/SOURCES.txt +13 -1
  31. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus.egg-info/requires.txt +1 -0
  32. {autobyteus-1.1.2 → autobyteus-1.1.3}/setup.py +2 -1
  33. autobyteus-1.1.2/autobyteus/agent/llm_response_processor/provider_aware_tool_usage_processor.py +0 -54
  34. autobyteus-1.1.2/autobyteus/tools/mcp/call_handlers/sse_handler.py +0 -22
  35. autobyteus-1.1.2/autobyteus/tools/mcp/registrar.py +0 -323
  36. autobyteus-1.1.2/autobyteus/tools/mcp/tool.py +0 -101
  37. {autobyteus-1.1.2 → autobyteus-1.1.3}/LICENSE +0 -0
  38. {autobyteus-1.1.2 → autobyteus-1.1.3}/README.md +0 -0
  39. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/__init__.py +0 -0
  40. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/__init__.py +0 -0
  41. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/agent.py +0 -0
  42. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/bootstrap_steps/agent_runtime_queue_initialization_step.py +0 -0
  43. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/bootstrap_steps/base_bootstrap_step.py +0 -0
  44. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/bootstrap_steps/system_prompt_processing_step.py +0 -0
  45. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/bootstrap_steps/workspace_context_initialization_step.py +0 -0
  46. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/context/__init__.py +0 -0
  47. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/context/agent_config.py +0 -0
  48. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/context/agent_context.py +0 -0
  49. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/context/agent_phase_manager.py +0 -0
  50. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/context/agent_runtime_state.py +0 -0
  51. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/context/phases.py +0 -0
  52. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/events/__init__.py +0 -0
  53. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/events/agent_events.py +0 -0
  54. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/events/agent_input_event_queue_manager.py +0 -0
  55. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/events/notifiers.py +0 -0
  56. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/events/worker_event_dispatcher.py +0 -0
  57. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/exceptions.py +0 -0
  58. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/factory/__init__.py +0 -0
  59. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/factory/agent_factory.py +0 -0
  60. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/group/__init__.py +0 -0
  61. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/group/agent_group.py +0 -0
  62. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/group/agent_group_context.py +0 -0
  63. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/handlers/__init__.py +0 -0
  64. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/handlers/approved_tool_invocation_event_handler.py +0 -0
  65. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/handlers/base_event_handler.py +0 -0
  66. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/handlers/event_handler_registry.py +0 -0
  67. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/handlers/generic_event_handler.py +0 -0
  68. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/handlers/inter_agent_message_event_handler.py +0 -0
  69. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/handlers/lifecycle_event_logger.py +0 -0
  70. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/handlers/llm_complete_response_received_event_handler.py +0 -0
  71. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/handlers/llm_user_message_ready_event_handler.py +0 -0
  72. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/handlers/tool_execution_approval_event_handler.py +0 -0
  73. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/handlers/tool_invocation_request_event_handler.py +0 -0
  74. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/handlers/tool_result_event_handler.py +0 -0
  75. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/handlers/user_input_message_event_handler.py +0 -0
  76. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/hooks/__init__.py +0 -0
  77. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/hooks/base_phase_hook.py +0 -0
  78. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/hooks/hook_definition.py +0 -0
  79. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/hooks/hook_meta.py +0 -0
  80. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/hooks/hook_registry.py +0 -0
  81. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/input_processor/__init__.py +0 -0
  82. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/input_processor/base_user_input_processor.py +0 -0
  83. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/input_processor/content_prefixing_input_processor.py +0 -0
  84. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/input_processor/metadata_appending_input_processor.py +0 -0
  85. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/input_processor/passthrough_input_processor.py +0 -0
  86. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/input_processor/processor_definition.py +0 -0
  87. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/input_processor/processor_meta.py +0 -0
  88. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/input_processor/processor_registry.py +0 -0
  89. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/llm_response_processor/__init__.py +0 -0
  90. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/llm_response_processor/base_processor.py +0 -0
  91. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/llm_response_processor/processor_definition.py +0 -0
  92. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/llm_response_processor/processor_meta.py +0 -0
  93. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/llm_response_processor/processor_registry.py +0 -0
  94. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/message/__init__.py +0 -0
  95. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/message/agent_input_user_message.py +0 -0
  96. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/message/context_file.py +0 -0
  97. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/message/context_file_type.py +0 -0
  98. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/message/inter_agent_message.py +0 -0
  99. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/message/inter_agent_message_type.py +0 -0
  100. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/message/send_message_to.py +0 -0
  101. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/phases/__init__.py +0 -0
  102. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/phases/discover.py +0 -0
  103. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/phases/manager.py +0 -0
  104. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/phases/phase_enum.py +0 -0
  105. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/phases/transition_decorator.py +0 -0
  106. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/phases/transition_info.py +0 -0
  107. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/remote_agent.py +0 -0
  108. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/runtime/__init__.py +0 -0
  109. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/runtime/agent_runtime.py +0 -0
  110. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/runtime/agent_thread_pool_manager.py +0 -0
  111. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/streaming/__init__.py +0 -0
  112. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/streaming/agent_event_stream.py +0 -0
  113. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/streaming/queue_streamer.py +0 -0
  114. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/streaming/stream_event_payloads.py +0 -0
  115. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/streaming/stream_events.py +0 -0
  116. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/system_prompt_processor/__init__.py +0 -0
  117. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/system_prompt_processor/base_processor.py +0 -0
  118. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/system_prompt_processor/processor_definition.py +0 -0
  119. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/system_prompt_processor/processor_meta.py +0 -0
  120. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/system_prompt_processor/processor_registry.py +0 -0
  121. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/system_prompt_processor/tool_manifest_injector_processor.py +0 -0
  122. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/tool_invocation.py +0 -0
  123. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/utils/__init__.py +0 -0
  124. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/utils/wait_for_idle.py +0 -0
  125. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/workflow/__init__.py +0 -0
  126. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/workflow/agentic_workflow.py +0 -0
  127. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/workflow/base_agentic_workflow.py +0 -0
  128. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/workspace/__init__.py +0 -0
  129. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/workspace/base_workspace.py +0 -0
  130. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/workspace/workspace_config.py +0 -0
  131. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/workspace/workspace_definition.py +0 -0
  132. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/workspace/workspace_meta.py +0 -0
  133. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/agent/workspace/workspace_registry.py +0 -0
  134. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/check_requirements.py +0 -0
  135. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/cli/__init__.py +0 -0
  136. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/cli/agent_cli.py +0 -0
  137. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/cli/cli_display.py +0 -0
  138. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/events/__init__.py +0 -0
  139. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/events/event_emitter.py +0 -0
  140. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/events/event_manager.py +0 -0
  141. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/events/event_types.py +0 -0
  142. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/__init__.py +0 -0
  143. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/api/__init__.py +0 -0
  144. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/api/autobyteus_llm.py +0 -0
  145. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/api/bedrock_llm.py +0 -0
  146. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/api/claude_llm.py +0 -0
  147. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/api/deepseek_llm.py +0 -0
  148. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/api/gemini_llm.py +0 -0
  149. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/api/grok_llm.py +0 -0
  150. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/api/groq_llm.py +0 -0
  151. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/api/kimi_llm.py +0 -0
  152. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/api/mistral_llm.py +0 -0
  153. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/api/nvidia_llm.py +0 -0
  154. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/api/ollama_llm.py +0 -0
  155. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/api/openai_compatible_llm.py +0 -0
  156. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/api/openai_llm.py +0 -0
  157. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/autobyteus_provider.py +0 -0
  158. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/base_llm.py +0 -0
  159. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/extensions/__init__.py +0 -0
  160. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/extensions/base_extension.py +0 -0
  161. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/extensions/extension_registry.py +0 -0
  162. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/extensions/token_usage_tracking_extension.py +0 -0
  163. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/llm_factory.py +0 -0
  164. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/models.py +0 -0
  165. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/ollama_provider.py +0 -0
  166. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/ollama_provider_resolver.py +0 -0
  167. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/providers.py +0 -0
  168. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/token_counter/__init__.py +0 -0
  169. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/token_counter/base_token_counter.py +0 -0
  170. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/token_counter/claude_token_counter.py +0 -0
  171. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/token_counter/deepseek_token_counter.py +0 -0
  172. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/token_counter/kimi_token_counter.py +0 -0
  173. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/token_counter/mistral_token_counter.py +0 -0
  174. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/token_counter/openai_token_counter.py +0 -0
  175. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/token_counter/token_counter_factory.py +0 -0
  176. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/user_message.py +0 -0
  177. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/utils/__init__.py +0 -0
  178. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/utils/image_payload_formatter.py +0 -0
  179. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/utils/llm_config.py +0 -0
  180. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/utils/messages.py +0 -0
  181. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/utils/rate_limiter.py +0 -0
  182. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/utils/response_types.py +0 -0
  183. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/utils/token_pricing_config.py +0 -0
  184. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/utils/token_usage.py +0 -0
  185. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/llm/utils/token_usage_tracker.py +0 -0
  186. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/person/__init__.py +0 -0
  187. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/person/examples/__init__.py +0 -0
  188. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/person/examples/sample_persons.py +0 -0
  189. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/person/examples/sample_roles.py +0 -0
  190. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/person/person.py +0 -0
  191. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/person/role.py +0 -0
  192. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/prompt/__init__.py +0 -0
  193. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/prompt/prompt_builder.py +0 -0
  194. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/prompt/prompt_template.py +0 -0
  195. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/rpc/__init__.py +0 -0
  196. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/rpc/client/__init__.py +0 -0
  197. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/rpc/client/abstract_client_connection.py +0 -0
  198. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/rpc/client/client_connection_manager.py +0 -0
  199. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/rpc/client/sse_client_connection.py +0 -0
  200. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/rpc/client/stdio_client_connection.py +0 -0
  201. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/rpc/config/__init__.py +0 -0
  202. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/rpc/config/agent_server_config.py +0 -0
  203. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/rpc/config/agent_server_registry.py +0 -0
  204. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/rpc/hosting.py +0 -0
  205. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/rpc/protocol.py +0 -0
  206. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/rpc/server/__init__.py +0 -0
  207. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/rpc/server/agent_server_endpoint.py +0 -0
  208. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/rpc/server/base_method_handler.py +0 -0
  209. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/rpc/server/method_handlers.py +0 -0
  210. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/rpc/server/sse_server_handler.py +0 -0
  211. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/rpc/server/stdio_server_handler.py +0 -0
  212. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/rpc/server_main.py +0 -0
  213. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/rpc/transport_type.py +0 -0
  214. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/__init__.py +0 -0
  215. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/ask_user_input.py +0 -0
  216. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/bash/__init__.py +0 -0
  217. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/bash/bash_executor.py +0 -0
  218. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/browser/__init__.py +0 -0
  219. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/browser/session_aware/__init__.py +0 -0
  220. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/browser/session_aware/browser_session_aware_navigate_to.py +0 -0
  221. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/browser/session_aware/browser_session_aware_tool.py +0 -0
  222. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/browser/session_aware/browser_session_aware_web_element_trigger.py +0 -0
  223. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/browser/session_aware/browser_session_aware_webpage_reader.py +0 -0
  224. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/browser/session_aware/browser_session_aware_webpage_screenshot_taker.py +0 -0
  225. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/browser/session_aware/factory/__init__.py +0 -0
  226. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/browser/session_aware/factory/browser_session_aware_web_element_trigger_factory.py +0 -0
  227. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/browser/session_aware/factory/browser_session_aware_webpage_reader_factory.py +0 -0
  228. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/browser/session_aware/factory/browser_session_aware_webpage_screenshot_taker_factory.py +0 -0
  229. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/browser/session_aware/shared_browser_session.py +0 -0
  230. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/browser/session_aware/shared_browser_session_manager.py +0 -0
  231. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/browser/session_aware/web_element_action.py +0 -0
  232. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/browser/standalone/__init__.py +0 -0
  233. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/browser/standalone/factory/__init__.py +0 -0
  234. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/browser/standalone/factory/google_search_factory.py +0 -0
  235. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/browser/standalone/factory/webpage_reader_factory.py +0 -0
  236. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/browser/standalone/factory/webpage_screenshot_taker_factory.py +0 -0
  237. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/browser/standalone/google_search_ui.py +0 -0
  238. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/browser/standalone/navigate_to.py +0 -0
  239. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/browser/standalone/web_page_pdf_generator.py +0 -0
  240. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/browser/standalone/webpage_image_downloader.py +0 -0
  241. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/browser/standalone/webpage_reader.py +0 -0
  242. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/browser/standalone/webpage_screenshot_taker.py +0 -0
  243. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/factory/__init__.py +0 -0
  244. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/factory/tool_factory.py +0 -0
  245. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/file/__init__.py +0 -0
  246. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/file/file_reader.py +0 -0
  247. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/file/file_writer.py +0 -0
  248. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/functional_tool.py +0 -0
  249. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/handlers/__init__.py +0 -0
  250. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/handlers/shell_handler.py +0 -0
  251. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/image_downloader.py +0 -0
  252. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/mcp/call_handlers/base_handler.py +0 -0
  253. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/mcp/call_handlers/stdio_handler.py +0 -0
  254. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/mcp/call_handlers/streamable_http_handler.py +0 -0
  255. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/mcp/schema_mapper.py +0 -0
  256. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/operation/__init__.py +0 -0
  257. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/operation/file_operation.py +0 -0
  258. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/operation/file_rename_operation.py +0 -0
  259. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/operation/operation.py +0 -0
  260. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/operation/shell_operation.py +0 -0
  261. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/parameter_schema.py +0 -0
  262. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/pdf_downloader.py +0 -0
  263. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/registry/__init__.py +0 -0
  264. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/timer.py +0 -0
  265. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/tool_category.py +0 -0
  266. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/tool_config.py +0 -0
  267. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/tool_meta.py +0 -0
  268. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/tool_state.py +0 -0
  269. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/__init__.py +0 -0
  270. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/formatters/__init__.py +0 -0
  271. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/formatters/anthropic_json_example_formatter.py +0 -0
  272. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/formatters/anthropic_json_schema_formatter.py +0 -0
  273. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/formatters/base_formatter.py +0 -0
  274. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/formatters/default_json_example_formatter.py +0 -0
  275. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/formatters/default_json_schema_formatter.py +0 -0
  276. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/formatters/default_xml_example_formatter.py +0 -0
  277. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/formatters/default_xml_schema_formatter.py +0 -0
  278. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/formatters/gemini_json_example_formatter.py +0 -0
  279. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/formatters/gemini_json_schema_formatter.py +0 -0
  280. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/formatters/google_json_example_formatter.py +0 -0
  281. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/formatters/google_json_schema_formatter.py +0 -0
  282. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/formatters/openai_json_example_formatter.py +0 -0
  283. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/formatters/openai_json_schema_formatter.py +0 -0
  284. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/parsers/__init__.py +0 -0
  285. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/parsers/_json_extractor.py +0 -0
  286. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/parsers/anthropic_xml_tool_usage_parser.py +0 -0
  287. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/parsers/base_parser.py +0 -0
  288. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/parsers/default_json_tool_usage_parser.py +0 -0
  289. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/parsers/default_xml_tool_usage_parser.py +0 -0
  290. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/parsers/exceptions.py +0 -0
  291. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/parsers/gemini_json_tool_usage_parser.py +0 -0
  292. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/parsers/openai_json_tool_usage_parser.py +0 -0
  293. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/parsers/provider_aware_tool_usage_parser.py +0 -0
  294. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/providers/__init__.py +0 -0
  295. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/providers/json_example_provider.py +0 -0
  296. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/providers/json_schema_provider.py +0 -0
  297. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/providers/json_tool_usage_parser_provider.py +0 -0
  298. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/providers/tool_manifest_provider.py +0 -0
  299. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/providers/xml_example_provider.py +0 -0
  300. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/providers/xml_schema_provider.py +0 -0
  301. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/providers/xml_tool_usage_parser_provider.py +0 -0
  302. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/registries/__init__.py +0 -0
  303. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/registries/json_example_formatter_registry.py +0 -0
  304. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/registries/json_schema_formatter_registry.py +0 -0
  305. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/registries/json_tool_usage_parser_registry.py +0 -0
  306. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/registries/xml_example_formatter_registry.py +0 -0
  307. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/registries/xml_schema_formatter_registry.py +0 -0
  308. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/usage/registries/xml_tool_usage_parser_registry.py +0 -0
  309. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/tools/utils.py +0 -0
  310. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/utils/__init__.py +0 -0
  311. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/utils/dynamic_enum.py +0 -0
  312. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/utils/file_utils.py +0 -0
  313. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/utils/html_cleaner.py +0 -0
  314. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/utils/singleton.py +0 -0
  315. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/workflow/__init__.py +0 -0
  316. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/workflow/simple_task.py +0 -0
  317. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/workflow/task.py +0 -0
  318. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus/workflow/workflow.py +0 -0
  319. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus.egg-info/dependency_links.txt +0 -0
  320. {autobyteus-1.1.2 → autobyteus-1.1.3}/autobyteus.egg-info/top_level.txt +0 -0
  321. {autobyteus-1.1.2 → autobyteus-1.1.3}/pyproject.toml +0 -0
  322. {autobyteus-1.1.2 → autobyteus-1.1.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: autobyteus
3
- Version: 1.1.2
3
+ Version: 1.1.3
4
4
  Summary: Multi-Agent framework
5
5
  Home-page: https://github.com/AutoByteus/autobyteus
6
6
  Author: Ryan Zheng
@@ -33,6 +33,7 @@ Requires-Dist: numpy==2.2.5
33
33
  Requires-Dist: aiohttp
34
34
  Requires-Dist: autobyteus-llm-client==1.1.1
35
35
  Requires-Dist: brui-core==1.0.8
36
+ Requires-Dist: mcp[cli]==1.9.1
36
37
  Provides-Extra: dev
37
38
  Requires-Dist: coverage; extra == "dev"
38
39
  Requires-Dist: flake8; extra == "dev"
@@ -9,6 +9,7 @@ from .agent_runtime_queue_initialization_step import AgentRuntimeQueueInitializa
9
9
  from .workspace_context_initialization_step import WorkspaceContextInitializationStep
10
10
  # ToolInitializationStep is no longer a bootstrap step.
11
11
  from .system_prompt_processing_step import SystemPromptProcessingStep
12
+ from .mcp_server_prewarming_step import McpServerPrewarmingStep
12
13
  # LLMConfigFinalizationStep and LLMInstanceCreationStep removed.
13
14
 
14
15
  __all__ = [
@@ -16,4 +17,5 @@ __all__ = [
16
17
  "AgentRuntimeQueueInitializationStep", # UPDATED
17
18
  "WorkspaceContextInitializationStep",
18
19
  "SystemPromptProcessingStep",
20
+ "McpServerPrewarmingStep",
19
21
  ]
@@ -6,6 +6,7 @@ from .base_bootstrap_step import BaseBootstrapStep
6
6
  from .agent_runtime_queue_initialization_step import AgentRuntimeQueueInitializationStep
7
7
  from .workspace_context_initialization_step import WorkspaceContextInitializationStep
8
8
  from .system_prompt_processing_step import SystemPromptProcessingStep
9
+ from .mcp_server_prewarming_step import McpServerPrewarmingStep
9
10
  from autobyteus.agent.events import AgentReadyEvent
10
11
 
11
12
  if TYPE_CHECKING:
@@ -31,6 +32,7 @@ class AgentBootstrapper:
31
32
  self.bootstrap_steps: List[BaseBootstrapStep] = [
32
33
  AgentRuntimeQueueInitializationStep(),
33
34
  WorkspaceContextInitializationStep(),
35
+ McpServerPrewarmingStep(),
34
36
  SystemPromptProcessingStep(),
35
37
  ]
36
38
  logger.debug("AgentBootstrapper initialized with default steps.")
@@ -0,0 +1,71 @@
1
+ # file: autobyteus/autobyteus/agent/bootstrap_steps/mcp_server_prewarming_step.py
2
+ import logging
3
+ from typing import TYPE_CHECKING, Set
4
+
5
+ from .base_bootstrap_step import BaseBootstrapStep
6
+ from autobyteus.tools.mcp.config_service import McpConfigService
7
+ from autobyteus.tools.mcp.server_instance_manager import McpServerInstanceManager
8
+ from autobyteus.tools.tool_category import ToolCategory
9
+
10
+ if TYPE_CHECKING:
11
+ from autobyteus.agent.context import AgentContext
12
+ from autobyteus.agent.phases import AgentPhaseManager
13
+
14
+ logger = logging.getLogger(__name__)
15
+
16
+ class McpServerPrewarmingStep(BaseBootstrapStep):
17
+ """
18
+ Bootstrap step to eagerly start all MCP servers associated with an agent's tools.
19
+ This ensures servers are running and ready before the agent becomes idle.
20
+ """
21
+
22
+ def __init__(self):
23
+ self._config_service = McpConfigService()
24
+ self._instance_manager = McpServerInstanceManager()
25
+ logger.debug("McpServerPrewarmingStep initialized.")
26
+
27
+ async def execute(self,
28
+ context: 'AgentContext',
29
+ phase_manager: 'AgentPhaseManager') -> bool:
30
+ agent_id = context.agent_id
31
+ logger.info(f"Agent '{agent_id}': Executing McpServerPrewarmingStep.")
32
+
33
+ # 1. Find all unique server IDs by inspecting tool definitions.
34
+ mcp_server_ids: Set[str] = set()
35
+ for tool in context.config.tools:
36
+ # This is the new, superior check. It relies on abstract metadata, not concrete types.
37
+ if tool.definition and tool.definition.category == ToolCategory.MCP:
38
+ # This is the new, superior way to get the server_id.
39
+ # It does not rely on private attributes of the tool instance.
40
+ server_id = tool.definition.metadata.get("mcp_server_id")
41
+ if server_id:
42
+ mcp_server_ids.add(server_id)
43
+
44
+ if not mcp_server_ids:
45
+ logger.debug(f"Agent '{agent_id}': No MCP tools found. Skipping MCP server pre-warming.")
46
+ return True
47
+
48
+ logger.info(f"Agent '{agent_id}': Found {len(mcp_server_ids)} unique MCP server IDs to pre-warm: {mcp_server_ids}")
49
+
50
+ # 2. For each server ID, unconditionally start its server instance for this agent.
51
+ for server_id in mcp_server_ids:
52
+ try:
53
+ config = self._config_service.get_config(server_id)
54
+ if not config:
55
+ logger.warning(f"Agent '{agent_id}': Could not find config for server_id '{server_id}' used by a tool. Cannot pre-warm.")
56
+ continue
57
+
58
+ logger.info(f"Agent '{agent_id}': Pre-warming MCP server '{server_id}'.")
59
+ # Get the instance for this agent, which creates it if it doesn't exist.
60
+ server_instance = self._instance_manager.get_server_instance(agent_id, server_id)
61
+ # Explicitly connect to start the server process.
62
+ await server_instance.connect()
63
+ logger.info(f"Agent '{agent_id}': Successfully connected to pre-warmed MCP server '{server_id}'.")
64
+
65
+ except Exception as e:
66
+ error_message = f"Agent '{agent_id}': Failed to pre-warm MCP server '{server_id}': {e}"
67
+ logger.error(error_message, exc_info=True)
68
+ # A failure to pre-warm a server is a critical bootstrap failure.
69
+ return False
70
+
71
+ return True
@@ -0,0 +1,83 @@
1
+ # file: autobyteus/autobyteus/agent/llm_response_processor/provider_aware_tool_usage_processor.py
2
+ import logging
3
+ from typing import TYPE_CHECKING, List
4
+
5
+ from .base_processor import BaseLLMResponseProcessor
6
+ from autobyteus.agent.events import PendingToolInvocationEvent
7
+ from autobyteus.agent.tool_invocation import ToolInvocation
8
+ from autobyteus.tools.usage.parsers import ProviderAwareToolUsageParser
9
+ from autobyteus.tools.usage.parsers.exceptions import ToolUsageParseException
10
+
11
+ if TYPE_CHECKING:
12
+ from autobyteus.agent.context import AgentContext
13
+ from autobyteus.agent.events import LLMCompleteResponseReceivedEvent
14
+ from autobyteus.llm.utils.response_types import CompleteResponse
15
+
16
+ logger = logging.getLogger(__name__)
17
+
18
+ class ProviderAwareToolUsageProcessor(BaseLLMResponseProcessor):
19
+ """
20
+ A "master" tool usage processor that uses a high-level parser from the
21
+ `tools` module to extract tool invocations. It then ensures each invocation
22
+ has a session-unique ID before enqueuing the necessary agent events.
23
+ """
24
+ INVOCATION_COUNTS_KEY = "agent_tool_invocation_counts"
25
+
26
+ def __init__(self):
27
+ self._parser = ProviderAwareToolUsageParser()
28
+ logger.debug("ProviderAwareToolUsageProcessor initialized.")
29
+
30
+ async def process_response(self, response: 'CompleteResponse', context: 'AgentContext', triggering_event: 'LLMCompleteResponseReceivedEvent') -> bool:
31
+ """
32
+ Uses a ProviderAwareToolUsageParser to get tool invocations, makes their
33
+ IDs unique within the agent's session, and then enqueues a
34
+ PendingToolInvocationEvent for each one.
35
+ Propagates ToolUsageParseException if parsing fails.
36
+ """
37
+ try:
38
+ # Delegate parsing to the high-level parser
39
+ tool_invocations = self._parser.parse(response, context)
40
+ except ToolUsageParseException:
41
+ # Re-raise the exception to be caught by the event handler
42
+ raise
43
+
44
+ if not tool_invocations:
45
+ return False
46
+
47
+ # --- NEW LOGIC FOR UNIQUE ID GENERATION ---
48
+
49
+ # Ensure the counter map exists in the agent's state's custom data
50
+ if self.INVOCATION_COUNTS_KEY not in context.custom_data:
51
+ context.custom_data[self.INVOCATION_COUNTS_KEY] = {}
52
+
53
+ invocation_counts = context.custom_data[self.INVOCATION_COUNTS_KEY]
54
+
55
+ processed_invocations: List[ToolInvocation] = []
56
+
57
+ for invocation in tool_invocations:
58
+ base_id = invocation.id
59
+
60
+ # Get the current count for this base ID, default to 0
61
+ count = invocation_counts.get(base_id, 0)
62
+
63
+ # Create the new session-unique ID
64
+ unique_id = f"{base_id}_{count}"
65
+
66
+ # Update the invocation's ID in-place
67
+ invocation.id = unique_id
68
+
69
+ # Increment the counter for the next time this base ID is seen
70
+ invocation_counts[base_id] = count + 1
71
+
72
+ processed_invocations.append(invocation)
73
+
74
+ # --- END NEW LOGIC ---
75
+
76
+ logger.info(f"Agent '{context.agent_id}': Parsed {len(processed_invocations)} tool invocations. Enqueuing events with unique IDs.")
77
+ for invocation in processed_invocations:
78
+ logger.info(f"Agent '{context.agent_id}' ({self.get_name()}) identified tool invocation: {invocation.name} with unique ID {invocation.id}. Enqueuing event.")
79
+ await context.input_event_queues.enqueue_tool_invocation_request(
80
+ PendingToolInvocationEvent(tool_invocation=invocation)
81
+ )
82
+
83
+ return True
@@ -15,6 +15,7 @@ from autobyteus.agent.events import (
15
15
  from autobyteus.agent.events import WorkerEventDispatcher
16
16
  from autobyteus.agent.runtime.agent_thread_pool_manager import AgentThreadPoolManager
17
17
  from autobyteus.agent.bootstrap_steps.agent_bootstrapper import AgentBootstrapper
18
+ from autobyteus.agent.shutdown_steps import AgentShutdownOrchestrator
18
19
 
19
20
  if TYPE_CHECKING:
20
21
  from autobyteus.agent.context import AgentContext
@@ -176,41 +177,22 @@ class AgentWorker:
176
177
  logger.error(f"Fatal error in AgentWorker '{agent_id}' async_run() loop: {e}", exc_info=True)
177
178
  finally:
178
179
  logger.info(f"AgentWorker '{agent_id}' async_run() loop has finished.")
180
+ # --- Shutdown sequence moved here, inside the original task's finally block ---
181
+ logger.info(f"AgentWorker '{agent_id}': Running shutdown sequence on worker loop.")
182
+ orchestrator = AgentShutdownOrchestrator()
183
+ cleanup_successful = await orchestrator.run(self.context)
179
184
 
180
- async def _signal_internal_stop(self):
181
- if self._async_stop_event and not self._async_stop_event.is_set():
182
- self._async_stop_event.set()
183
- if self.context.state.input_event_queues:
184
- await self.context.state.input_event_queues.enqueue_internal_system_event(AgentStoppedEvent())
185
+ if not cleanup_successful:
186
+ logger.critical(f"AgentWorker '{agent_id}': Shutdown resource cleanup failed. The agent may not have shut down cleanly.")
187
+ else:
188
+ logger.info(f"AgentWorker '{agent_id}': Shutdown resource cleanup completed successfully.")
189
+ logger.info(f"AgentWorker '{agent_id}': Shutdown sequence completed.")
185
190
 
186
- async def _shutdown_sequence(self):
187
- """
188
- The explicit, ordered shutdown sequence for the worker, executed on its own event loop.
189
- """
190
- agent_id = self.context.agent_id
191
- logger.info(f"AgentWorker '{agent_id}': Running shutdown sequence on worker loop.")
192
-
193
- # 1. Clean up resources like the LLM instance.
194
- if self.context.llm_instance and hasattr(self.context.llm_instance, 'cleanup'):
195
- logger.info(f"AgentWorker '{agent_id}': Running LLM instance cleanup.")
196
- try:
197
- cleanup_func = self.context.llm_instance.cleanup
198
- if asyncio.iscoroutinefunction(cleanup_func):
199
- await cleanup_func()
200
- else:
201
- cleanup_func()
202
- logger.info(f"AgentWorker '{agent_id}': LLM instance cleanup completed.")
203
- except Exception as e:
204
- logger.error(f"AgentWorker '{agent_id}': Error during LLM instance cleanup: {e}", exc_info=True)
205
-
206
- # 2. Signal the main event loop to stop.
207
- await self._signal_internal_stop()
208
- logger.info(f"AgentWorker '{agent_id}': Shutdown sequence completed.")
209
191
 
210
192
  async def stop(self, timeout: float = 10.0) -> None:
211
193
  """
212
- Gracefully stops the worker by scheduling a final shutdown sequence on its
213
- event loop, then waiting for the thread to terminate.
194
+ Gracefully stops the worker by signaling its event loop to terminate,
195
+ then waiting for the thread to complete its cleanup and exit.
214
196
  """
215
197
  if not self._is_active or self._stop_initiated:
216
198
  return
@@ -219,14 +201,22 @@ class AgentWorker:
219
201
  logger.info(f"AgentWorker '{agent_id}': Stop requested.")
220
202
  self._stop_initiated = True
221
203
 
222
- # Schedule the explicit shutdown sequence on the worker's loop.
204
+ # Schedule a coroutine on the worker's loop to set the stop event.
223
205
  if self.get_worker_loop():
224
- future = self.schedule_coroutine_on_worker_loop(self._shutdown_sequence)
206
+ def _coro_factory():
207
+ async def _signal_coro():
208
+ if self._async_stop_event and not self._async_stop_event.is_set():
209
+ self._async_stop_event.set()
210
+ if self.context.state.input_event_queues:
211
+ await self.context.state.input_event_queues.enqueue_internal_system_event(AgentStoppedEvent())
212
+ return _signal_coro()
213
+
214
+ future = self.schedule_coroutine_on_worker_loop(_coro_factory)
225
215
  try:
226
- # Wait for the cleanup and stop signal to be processed.
216
+ # Wait for the signal to be processed.
227
217
  future.result(timeout=max(1.0, timeout-1))
228
218
  except Exception as e:
229
- logger.error(f"AgentWorker '{agent_id}': Error during scheduled shutdown sequence: {e}", exc_info=True)
219
+ logger.error(f"AgentWorker '{agent_id}': Error signaling stop event: {e}", exc_info=True)
230
220
 
231
221
  # Wait for the main thread future to complete.
232
222
  if self._thread_future:
@@ -0,0 +1,17 @@
1
+ # file: autobyteus/autobyteus/agent/shutdown_steps/__init__.py
2
+ """
3
+ Defines individual, self-contained steps for the agent shutdown process.
4
+ These steps are orchestrated by the AgentShutdownOrchestrator.
5
+ """
6
+
7
+ from .base_shutdown_step import BaseShutdownStep
8
+ from .llm_instance_cleanup_step import LLMInstanceCleanupStep
9
+ from .mcp_server_cleanup_step import McpServerCleanupStep
10
+ from .agent_shutdown_orchestrator import AgentShutdownOrchestrator
11
+
12
+ __all__ = [
13
+ "BaseShutdownStep",
14
+ "LLMInstanceCleanupStep",
15
+ "McpServerCleanupStep",
16
+ "AgentShutdownOrchestrator",
17
+ ]
@@ -0,0 +1,63 @@
1
+ # file: autobyteus/autobyteus/agent/shutdown_steps/agent_shutdown_orchestrator.py
2
+ import logging
3
+ from typing import TYPE_CHECKING, List, Optional
4
+
5
+ from .base_shutdown_step import BaseShutdownStep
6
+ from .llm_instance_cleanup_step import LLMInstanceCleanupStep
7
+ from .mcp_server_cleanup_step import McpServerCleanupStep
8
+
9
+ if TYPE_CHECKING:
10
+ from autobyteus.agent.context import AgentContext
11
+
12
+ logger = logging.getLogger(__name__)
13
+
14
+ class AgentShutdownOrchestrator:
15
+ """
16
+ Orchestrates the agent's shutdown process by executing a sequence of
17
+ self-contained cleanup steps.
18
+ """
19
+ def __init__(self, steps: Optional[List[BaseShutdownStep]] = None):
20
+ """
21
+ Initializes the AgentShutdownOrchestrator.
22
+
23
+ Args:
24
+ steps: An optional list of shutdown steps to execute. If not provided,
25
+ a default sequence will be used.
26
+ """
27
+ if steps is None:
28
+ self.shutdown_steps: List[BaseShutdownStep] = [
29
+ LLMInstanceCleanupStep(),
30
+ McpServerCleanupStep(),
31
+ ]
32
+ logger.debug("AgentShutdownOrchestrator initialized with default steps.")
33
+ else:
34
+ self.shutdown_steps = steps
35
+ logger.debug(f"AgentShutdownOrchestrator initialized with {len(steps)} custom steps.")
36
+
37
+ async def run(self, context: 'AgentContext') -> bool:
38
+ """
39
+ Executes the configured sequence of shutdown steps.
40
+
41
+ Args:
42
+ context: The agent's context.
43
+
44
+ Returns:
45
+ True if all steps completed successfully, False otherwise.
46
+ """
47
+ agent_id = context.agent_id
48
+ logger.info(f"Agent '{agent_id}': AgentShutdownOrchestrator starting execution.")
49
+
50
+ for step_index, step_instance in enumerate(self.shutdown_steps):
51
+ step_name = step_instance.__class__.__name__
52
+ logger.debug(f"Agent '{agent_id}': Executing shutdown step {step_index + 1}/{len(self.shutdown_steps)}: {step_name}")
53
+
54
+ success = await step_instance.execute(context)
55
+
56
+ if not success:
57
+ error_message = f"Shutdown step {step_name} failed."
58
+ logger.error(f"Agent '{agent_id}': {error_message} Halting shutdown orchestration.")
59
+ # The step itself is responsible for detailed error logging.
60
+ return False
61
+
62
+ logger.info(f"Agent '{agent_id}': All shutdown steps completed successfully.")
63
+ return True
@@ -0,0 +1,33 @@
1
+ # file: autobyteus/autobyteus/agent/shutdown_steps/base_shutdown_step.py
2
+ import logging
3
+ from abc import ABC, abstractmethod
4
+ from typing import TYPE_CHECKING
5
+
6
+ if TYPE_CHECKING:
7
+ from autobyteus.agent.context import AgentContext
8
+
9
+ logger = logging.getLogger(__name__)
10
+
11
+ class BaseShutdownStep(ABC):
12
+ """
13
+ Abstract base class for individual steps in the agent shutdown process.
14
+ Each step is responsible for a specific part of the cleanup and
15
+ for reporting its success or failure.
16
+ """
17
+
18
+ @abstractmethod
19
+ async def execute(self, context: 'AgentContext') -> bool:
20
+ """
21
+ Executes the shutdown step.
22
+
23
+ Args:
24
+ context: The agent's context, providing access to state and resources.
25
+
26
+ Returns:
27
+ True if the step completed successfully, False otherwise.
28
+ If False, the step is expected to have handled its own detailed logging.
29
+ """
30
+ raise NotImplementedError("Subclasses must implement the 'execute' method.")
31
+
32
+ def __repr__(self) -> str:
33
+ return f"<{self.__class__.__name__}>"
@@ -0,0 +1,45 @@
1
+ # file: autobyteus/autobyteus/agent/shutdown_steps/llm_instance_cleanup_step.py
2
+ import asyncio
3
+ import logging
4
+ from typing import TYPE_CHECKING
5
+
6
+ from .base_shutdown_step import BaseShutdownStep
7
+
8
+ if TYPE_CHECKING:
9
+ from autobyteus.agent.context import AgentContext
10
+
11
+ logger = logging.getLogger(__name__)
12
+
13
+ class LLMInstanceCleanupStep(BaseShutdownStep):
14
+ """
15
+ Shutdown step for cleaning up the agent's LLM instance.
16
+ """
17
+ def __init__(self):
18
+ logger.debug("LLMInstanceCleanupStep initialized.")
19
+
20
+ async def execute(self, context: 'AgentContext') -> bool:
21
+ agent_id = context.agent_id
22
+ logger.info(f"Agent '{agent_id}': Executing LLMInstanceCleanupStep.")
23
+
24
+ llm_instance = context.llm_instance
25
+ if not llm_instance:
26
+ logger.debug(f"Agent '{agent_id}': No LLM instance found in context. Skipping cleanup.")
27
+ return True
28
+
29
+ if hasattr(llm_instance, 'cleanup') and callable(getattr(llm_instance, 'cleanup')):
30
+ try:
31
+ logger.info(f"Agent '{agent_id}': Running LLM instance cleanup for '{llm_instance.__class__.__name__}'.")
32
+ cleanup_func = llm_instance.cleanup
33
+ if asyncio.iscoroutinefunction(cleanup_func):
34
+ await cleanup_func()
35
+ else:
36
+ cleanup_func()
37
+ logger.info(f"Agent '{agent_id}': LLM instance cleanup completed successfully.")
38
+ return True
39
+ except Exception as e:
40
+ error_message = f"Agent '{agent_id}': Error during LLM instance cleanup: {e}"
41
+ logger.error(error_message, exc_info=True)
42
+ return False
43
+ else:
44
+ logger.debug(f"Agent '{agent_id}': LLM instance of type '{llm_instance.__class__.__name__}' does not have a 'cleanup' method. Skipping.")
45
+ return True
@@ -0,0 +1,32 @@
1
+ # file: autobyteus/autobyteus/agent/shutdown_steps/mcp_server_cleanup_step.py
2
+ import logging
3
+ from typing import TYPE_CHECKING
4
+
5
+ from .base_shutdown_step import BaseShutdownStep
6
+ from autobyteus.tools.mcp.server_instance_manager import McpServerInstanceManager
7
+
8
+ if TYPE_CHECKING:
9
+ from autobyteus.agent.context import AgentContext
10
+
11
+ logger = logging.getLogger(__name__)
12
+
13
+ class McpServerCleanupStep(BaseShutdownStep):
14
+ """
15
+ Shutdown step for cleaning up all MCP server instances associated with an agent.
16
+ """
17
+ def __init__(self):
18
+ self._instance_manager = McpServerInstanceManager()
19
+ logger.debug("McpServerCleanupStep initialized.")
20
+
21
+ async def execute(self, context: 'AgentContext') -> bool:
22
+ agent_id = context.agent_id
23
+ logger.info(f"Agent '{agent_id}': Executing McpServerCleanupStep.")
24
+
25
+ try:
26
+ await self._instance_manager.cleanup_mcp_server_instances_for_agent(agent_id)
27
+ logger.info(f"Agent '{agent_id}': MCP server instance cleanup completed successfully.")
28
+ return True
29
+ except Exception as e:
30
+ error_message = f"Agent '{agent_id}': Critical failure during McpServerCleanupStep: {e}"
31
+ logger.error(error_message, exc_info=True)
32
+ return False
@@ -16,6 +16,7 @@ if TYPE_CHECKING:
16
16
  from autobyteus.tools.parameter_schema import ParameterSchema
17
17
  from autobyteus.tools.tool_config import ToolConfig
18
18
  from .tool_state import ToolState
19
+ from autobyteus.tools.registry import ToolDefinition
19
20
 
20
21
  logger = logging.getLogger('autobyteus')
21
22
 
@@ -26,6 +27,7 @@ class BaseTool(ABC, EventEmitter, metaclass=ToolMeta):
26
27
  def __init__(self, config: Optional['ToolConfig'] = None):
27
28
  super().__init__()
28
29
  self.agent_id: Optional[str] = None
30
+ self.definition: Optional['ToolDefinition'] = None # Link back to its definition
29
31
  # The config is stored primarily for potential use by subclasses or future base features.
30
32
  self._config = config
31
33
  # Add a dedicated state dictionary for the tool instance
@@ -2,14 +2,15 @@
2
2
  """
3
3
  This package implements the Model Context Protocol (MCP) integration for AutoByteUs.
4
4
  It allows AutoByteUs to connect to external MCP servers, discover tools,
5
- and register them as standard AutoByteUs tools using a handler-based architecture.
5
+ and register them as standard AutoByteUs tools using a stateful, server-centric
6
+ architecture with per-agent isolation.
6
7
  """
7
8
  import logging
8
9
 
9
10
  logger = logging.getLogger(__name__)
10
11
 
11
12
  # The actual 'mcp' library and its components are expected to be installed
12
- # in the environment and are used by the internal handlers.
13
+ # in the environment and are used by the internal components.
13
14
 
14
15
  logger.info("AutoByteUs MCP integration package initialized. Expects 'mcp' library to be available.")
15
16
 
@@ -17,9 +18,9 @@ logger.info("AutoByteUs MCP integration package initialized. Expects 'mcp' libra
17
18
  from .types import (
18
19
  BaseMcpConfig,
19
20
  StdioMcpServerConfig,
20
- SseMcpServerConfig,
21
21
  StreamableHttpMcpServerConfig,
22
- McpTransportType
22
+ McpTransportType,
23
+ McpServerInstanceKey,
23
24
  )
24
25
  # Import McpConfigService from config_service.py
25
26
  from .config_service import McpConfigService
@@ -28,17 +29,19 @@ from .config_service import McpConfigService
28
29
  from .schema_mapper import McpSchemaMapper
29
30
  from .tool import GenericMcpTool
30
31
  from .factory import McpToolFactory
31
- from .registrar import McpToolRegistrar
32
+ from .tool_registrar import McpToolRegistrar
33
+ from .server_instance_manager import McpServerInstanceManager
32
34
 
33
35
  __all__ = [
34
36
  # Types from types.py
35
37
  "BaseMcpConfig",
36
38
  "StdioMcpServerConfig",
37
- "SseMcpServerConfig",
38
39
  "StreamableHttpMcpServerConfig",
39
40
  "McpTransportType",
40
- # Service from config_service.py
41
+ "McpServerInstanceKey",
42
+ # Services and Managers
41
43
  "McpConfigService",
44
+ "McpServerInstanceManager",
42
45
  # Other public components
43
46
  "McpSchemaMapper",
44
47
  "GenericMcpTool",
@@ -8,11 +8,9 @@ for a specific transport protocol (e.g., STDIO, Streamable HTTP).
8
8
  from .base_handler import McpCallHandler
9
9
  from .stdio_handler import StdioMcpCallHandler
10
10
  from .streamable_http_handler import StreamableHttpMcpCallHandler
11
- from .sse_handler import SseMcpCallHandler
12
11
 
13
12
  __all__ = [
14
13
  "McpCallHandler",
15
14
  "StdioMcpCallHandler",
16
15
  "StreamableHttpMcpCallHandler",
17
- "SseMcpCallHandler",
18
16
  ]
@@ -8,7 +8,6 @@ from typing import List, Dict, Any, Optional, Union, Type
8
8
  from .types import (
9
9
  BaseMcpConfig,
10
10
  StdioMcpServerConfig,
11
- SseMcpServerConfig,
12
11
  StreamableHttpMcpServerConfig,
13
12
  McpTransportType
14
13
  )
@@ -38,7 +37,7 @@ class McpConfigService(metaclass=SingletonMeta):
38
37
  @staticmethod
39
38
  def _create_specific_config(server_id: str, transport_type: McpTransportType, config_data: Dict[str, Any]) -> BaseMcpConfig:
40
39
  """
41
- Creates a specific McpServerConfig (Stdio, Sse, StreamableHttp) based on transport_type.
40
+ Creates a specific McpServerConfig (Stdio, StreamableHttp) based on transport_type.
42
41
  The 'server_id' is injected.
43
42
  Parameters from nested structures like 'stdio_params' are un-nested.
44
43
  """
@@ -50,7 +49,6 @@ class McpConfigService(metaclass=SingletonMeta):
50
49
 
51
50
  transport_specific_params_key_map = {
52
51
  McpTransportType.STDIO: "stdio_params",
53
- McpTransportType.SSE: "sse_params",
54
52
  McpTransportType.STREAMABLE_HTTP: "streamable_http_params"
55
53
  }
56
54
 
@@ -62,7 +60,6 @@ class McpConfigService(metaclass=SingletonMeta):
62
60
  constructor_params.update(specific_params_dict)
63
61
 
64
62
  constructor_params.pop(transport_specific_params_key_map.get(McpTransportType.STDIO), None)
65
- constructor_params.pop(transport_specific_params_key_map.get(McpTransportType.SSE), None)
66
63
  constructor_params.pop(transport_specific_params_key_map.get(McpTransportType.STREAMABLE_HTTP), None)
67
64
  constructor_params.pop('transport_type', None)
68
65
 
@@ -75,8 +72,6 @@ class McpConfigService(metaclass=SingletonMeta):
75
72
  try:
76
73
  if transport_type == McpTransportType.STDIO:
77
74
  return StdioMcpServerConfig(**constructor_params)
78
- elif transport_type == McpTransportType.SSE:
79
- return SseMcpServerConfig(**constructor_params)
80
75
  elif transport_type == McpTransportType.STREAMABLE_HTTP:
81
76
  return StreamableHttpMcpServerConfig(**constructor_params)
82
77
  else: