autobyteus 1.1.5__py3-none-any.whl → 1.1.7__py3-none-any.whl

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 (103) hide show
  1. autobyteus/agent/context/agent_config.py +6 -1
  2. autobyteus/agent/context/agent_runtime_state.py +7 -1
  3. autobyteus/agent/handlers/llm_user_message_ready_event_handler.py +30 -7
  4. autobyteus/agent/handlers/tool_result_event_handler.py +100 -88
  5. autobyteus/agent/handlers/user_input_message_event_handler.py +22 -25
  6. autobyteus/agent/llm_response_processor/provider_aware_tool_usage_processor.py +7 -1
  7. autobyteus/agent/message/__init__.py +7 -5
  8. autobyteus/agent/message/agent_input_user_message.py +6 -16
  9. autobyteus/agent/message/context_file.py +24 -24
  10. autobyteus/agent/message/context_file_type.py +29 -8
  11. autobyteus/agent/message/multimodal_message_builder.py +47 -0
  12. autobyteus/agent/streaming/stream_event_payloads.py +23 -4
  13. autobyteus/agent/system_prompt_processor/tool_manifest_injector_processor.py +6 -2
  14. autobyteus/agent/tool_invocation.py +27 -2
  15. autobyteus/agent_team/agent_team_builder.py +22 -1
  16. autobyteus/agent_team/bootstrap_steps/agent_configuration_preparation_step.py +9 -2
  17. autobyteus/agent_team/context/agent_team_config.py +1 -0
  18. autobyteus/agent_team/context/agent_team_runtime_state.py +0 -2
  19. autobyteus/llm/api/autobyteus_llm.py +33 -33
  20. autobyteus/llm/api/bedrock_llm.py +13 -5
  21. autobyteus/llm/api/claude_llm.py +13 -27
  22. autobyteus/llm/api/gemini_llm.py +108 -42
  23. autobyteus/llm/api/groq_llm.py +4 -3
  24. autobyteus/llm/api/mistral_llm.py +97 -51
  25. autobyteus/llm/api/nvidia_llm.py +6 -5
  26. autobyteus/llm/api/ollama_llm.py +37 -12
  27. autobyteus/llm/api/openai_compatible_llm.py +91 -91
  28. autobyteus/llm/autobyteus_provider.py +1 -1
  29. autobyteus/llm/base_llm.py +42 -139
  30. autobyteus/llm/extensions/base_extension.py +6 -6
  31. autobyteus/llm/extensions/token_usage_tracking_extension.py +3 -2
  32. autobyteus/llm/llm_factory.py +131 -61
  33. autobyteus/llm/ollama_provider_resolver.py +1 -0
  34. autobyteus/llm/providers.py +1 -0
  35. autobyteus/llm/token_counter/token_counter_factory.py +3 -1
  36. autobyteus/llm/user_message.py +43 -35
  37. autobyteus/llm/utils/llm_config.py +34 -18
  38. autobyteus/llm/utils/media_payload_formatter.py +99 -0
  39. autobyteus/llm/utils/messages.py +32 -25
  40. autobyteus/llm/utils/response_types.py +9 -3
  41. autobyteus/llm/utils/token_usage.py +6 -5
  42. autobyteus/multimedia/__init__.py +31 -0
  43. autobyteus/multimedia/audio/__init__.py +11 -0
  44. autobyteus/multimedia/audio/api/__init__.py +4 -0
  45. autobyteus/multimedia/audio/api/autobyteus_audio_client.py +59 -0
  46. autobyteus/multimedia/audio/api/gemini_audio_client.py +219 -0
  47. autobyteus/multimedia/audio/audio_client_factory.py +120 -0
  48. autobyteus/multimedia/audio/audio_model.py +97 -0
  49. autobyteus/multimedia/audio/autobyteus_audio_provider.py +108 -0
  50. autobyteus/multimedia/audio/base_audio_client.py +40 -0
  51. autobyteus/multimedia/image/__init__.py +11 -0
  52. autobyteus/multimedia/image/api/__init__.py +9 -0
  53. autobyteus/multimedia/image/api/autobyteus_image_client.py +97 -0
  54. autobyteus/multimedia/image/api/gemini_image_client.py +188 -0
  55. autobyteus/multimedia/image/api/openai_image_client.py +142 -0
  56. autobyteus/multimedia/image/autobyteus_image_provider.py +109 -0
  57. autobyteus/multimedia/image/base_image_client.py +67 -0
  58. autobyteus/multimedia/image/image_client_factory.py +118 -0
  59. autobyteus/multimedia/image/image_model.py +97 -0
  60. autobyteus/multimedia/providers.py +5 -0
  61. autobyteus/multimedia/runtimes.py +8 -0
  62. autobyteus/multimedia/utils/__init__.py +10 -0
  63. autobyteus/multimedia/utils/api_utils.py +19 -0
  64. autobyteus/multimedia/utils/multimedia_config.py +29 -0
  65. autobyteus/multimedia/utils/response_types.py +13 -0
  66. autobyteus/task_management/tools/publish_task_plan.py +4 -16
  67. autobyteus/task_management/tools/update_task_status.py +4 -19
  68. autobyteus/tools/__init__.py +5 -4
  69. autobyteus/tools/base_tool.py +98 -29
  70. autobyteus/tools/browser/standalone/__init__.py +0 -1
  71. autobyteus/tools/google_search.py +149 -0
  72. autobyteus/tools/mcp/schema_mapper.py +29 -71
  73. autobyteus/tools/multimedia/__init__.py +8 -0
  74. autobyteus/tools/multimedia/audio_tools.py +116 -0
  75. autobyteus/tools/multimedia/image_tools.py +186 -0
  76. autobyteus/tools/parameter_schema.py +82 -89
  77. autobyteus/tools/pydantic_schema_converter.py +81 -0
  78. autobyteus/tools/tool_category.py +1 -0
  79. autobyteus/tools/usage/formatters/default_json_example_formatter.py +89 -20
  80. autobyteus/tools/usage/formatters/default_xml_example_formatter.py +115 -41
  81. autobyteus/tools/usage/formatters/default_xml_schema_formatter.py +50 -20
  82. autobyteus/tools/usage/formatters/gemini_json_example_formatter.py +55 -22
  83. autobyteus/tools/usage/formatters/google_json_example_formatter.py +54 -21
  84. autobyteus/tools/usage/formatters/openai_json_example_formatter.py +53 -23
  85. autobyteus/tools/usage/parsers/default_xml_tool_usage_parser.py +270 -94
  86. autobyteus/tools/usage/parsers/provider_aware_tool_usage_parser.py +5 -2
  87. autobyteus/tools/usage/providers/tool_manifest_provider.py +43 -16
  88. autobyteus/tools/usage/registries/tool_formatting_registry.py +9 -2
  89. autobyteus/tools/usage/registries/tool_usage_parser_registry.py +9 -2
  90. autobyteus-1.1.7.dist-info/METADATA +204 -0
  91. {autobyteus-1.1.5.dist-info → autobyteus-1.1.7.dist-info}/RECORD +98 -71
  92. examples/run_browser_agent.py +1 -1
  93. examples/run_google_slides_agent.py +2 -2
  94. examples/run_mcp_google_slides_client.py +1 -1
  95. examples/run_sqlite_agent.py +1 -1
  96. autobyteus/llm/utils/image_payload_formatter.py +0 -89
  97. autobyteus/tools/ask_user_input.py +0 -40
  98. autobyteus/tools/browser/standalone/factory/google_search_factory.py +0 -25
  99. autobyteus/tools/browser/standalone/google_search_ui.py +0 -126
  100. autobyteus-1.1.5.dist-info/METADATA +0 -161
  101. {autobyteus-1.1.5.dist-info → autobyteus-1.1.7.dist-info}/WHEEL +0 -0
  102. {autobyteus-1.1.5.dist-info → autobyteus-1.1.7.dist-info}/licenses/LICENSE +0 -0
  103. {autobyteus-1.1.5.dist-info → autobyteus-1.1.7.dist-info}/top_level.txt +0 -0
@@ -16,60 +16,87 @@ class ToolManifestProvider:
16
16
  """
17
17
  Generates a complete tool manifest string, which includes the schema
18
18
  and an example for each provided tool. This is suitable for injection
19
+
19
20
  into a system prompt. It uses the central ToolFormattingRegistry to get
20
21
  the correct formatters for the specified provider.
21
22
  """
22
- SCHEMA_HEADER = "## Tool Definition:"
23
- EXAMPLE_HEADER = "## Example Usage:"
24
- # UPDATED: Changed the header to be more descriptive as requested.
23
+ # --- XML Specific Headers and Guidelines ---
24
+ XML_SCHEMA_HEADER = "## Tool Definition:"
25
+ XML_EXAMPLE_HEADER = "## Tool Usage Examples and Guidelines:"
26
+ XML_GENERAL_GUIDELINES = (
27
+ "To use this tool, you must construct an XML block exactly like the examples below. "
28
+ "Ensure all tags are correctly named and nested. Pay close attention to how arguments, "
29
+ "especially complex ones like lists and objects, are formatted."
30
+ )
31
+ XML_ARRAY_GUIDELINES = (
32
+ "Formatting Lists/Arrays: For any argument that is a list (an array), you MUST wrap each "
33
+ "individual value in its own `<item>` tag. Do not use comma-separated strings or JSON-style `[...]` arrays within a single tag.\n\n"
34
+ "Correct:\n"
35
+ '<arg name="dependencies">\n'
36
+ ' <item>task_1</item>\n'
37
+ ' <item>task_2</item>\n'
38
+ '</arg>\n\n'
39
+ "Incorrect:\n"
40
+ '<arg name="dependencies">[task_1, task_2]</arg>\n'
41
+ '<arg name="dependencies">task_1, task_2</arg>'
42
+ )
43
+
44
+ # --- JSON Specific Headers ---
45
+ JSON_SCHEMA_HEADER = "## Tool Definition:"
25
46
  JSON_EXAMPLE_HEADER = "Example: To use this tool, you could provide the following JSON object as a tool call:"
26
47
 
48
+
27
49
  def __init__(self):
28
50
  self._formatting_registry = ToolFormattingRegistry()
29
51
  logger.debug("ToolManifestProvider initialized.")
30
52
 
31
53
  def provide(self,
32
54
  tool_definitions: List['ToolDefinition'],
33
- provider: Optional[LLMProvider] = None) -> str:
55
+ provider: Optional[LLMProvider] = None,
56
+ use_xml_tool_format: bool = False) -> str:
34
57
  """
35
58
  Generates the manifest string for a list of tools.
36
59
 
37
60
  Args:
38
61
  tool_definitions: A list of ToolDefinition objects.
39
62
  provider: The LLM provider, for provider-specific formatting.
63
+ use_xml_tool_format: If True, forces the use of XML formatters.
40
64
 
41
65
  Returns:
42
66
  A single string containing the formatted manifest.
43
67
  """
44
68
  tool_blocks = []
45
69
 
46
- # Get the correct formatting pair from the registry using only the provider.
47
- formatter_pair = self._formatting_registry.get_formatter_pair(provider)
70
+ formatter_pair = self._formatting_registry.get_formatter_pair(provider, use_xml_tool_format=use_xml_tool_format)
48
71
  schema_formatter = formatter_pair.schema_formatter
49
72
  example_formatter = formatter_pair.example_formatter
50
73
 
51
- # Determine if the chosen formatter is XML-based. This determines the final assembly format.
52
74
  is_xml_format = isinstance(schema_formatter, DefaultXmlSchemaFormatter)
53
75
 
54
76
  for td in tool_definitions:
55
77
  try:
56
78
  schema = schema_formatter.provide(td)
57
- example = example_formatter.provide(td)
79
+ example = example_formatter.provide(td) # This is now a pre-formatted string for both XML and JSON
58
80
 
59
81
  if schema and example:
60
82
  if is_xml_format:
61
- tool_blocks.append(f"{self.SCHEMA_HEADER}\n{schema}\n\n{self.EXAMPLE_HEADER}\n{example}")
62
- else: # JSON format
63
- # UPDATED: Removed the redundant {"tool": schema} wrapper.
83
+ tool_blocks.append(f"{self.XML_SCHEMA_HEADER}\n{schema}\n\n{self.XML_EXAMPLE_HEADER}\n{example}")
84
+ else:
85
+ # For JSON, the schema is a dict, but the example is now a pre-formatted string.
64
86
  schema_str = json.dumps(schema, indent=2)
65
- example_str = json.dumps(example, indent=2)
66
- tool_blocks.append(f"{self.SCHEMA_HEADER}\n{schema_str}\n\n{self.JSON_EXAMPLE_HEADER}\n{example_str}")
87
+ # FIX: Do NOT call json.dumps() on the 'example' variable, as it is already a string.
88
+ tool_blocks.append(f"{self.JSON_SCHEMA_HEADER}\n{schema_str}\n\n{self.JSON_EXAMPLE_HEADER}\n{example}")
67
89
  else:
68
90
  logger.warning(f"Could not generate schema or example for tool '{td.name}' using format {'XML' if is_xml_format else 'JSON'}.")
69
91
 
70
92
  except Exception as e:
71
93
  logger.error(f"Failed to generate manifest block for tool '{td.name}': {e}", exc_info=True)
72
94
 
73
- # UPDATED: Unify the return for all formats to provide a consistent structure
74
- # without the incorrect '[]' wrapper for JSON.
75
- return "\n\n---\n\n".join(tool_blocks)
95
+ # Assemble the final manifest string
96
+ manifest_content = "\n\n---\n\n".join(tool_blocks)
97
+
98
+ if is_xml_format and manifest_content:
99
+ # Prepend the general guidelines for XML format
100
+ return f"{self.XML_GENERAL_GUIDELINES}\n\n{self.XML_ARRAY_GUIDELINES}\n\n---\n\n{manifest_content}"
101
+
102
+ return manifest_content
@@ -36,19 +36,26 @@ class ToolFormattingRegistry(metaclass=SingletonMeta):
36
36
  }
37
37
  # A default pair for any provider not explicitly listed (defaults to JSON)
38
38
  self._default_pair = ToolFormatterPair(DefaultJsonSchemaFormatter(), DefaultJsonExampleFormatter())
39
+ # A specific pair for the XML override
40
+ self._xml_override_pair = ToolFormatterPair(DefaultXmlSchemaFormatter(), DefaultXmlExampleFormatter())
39
41
 
40
42
  logger.info("ToolFormattingRegistry initialized with direct provider-to-formatter mappings.")
41
43
 
42
- def get_formatter_pair(self, provider: Optional[LLMProvider]) -> ToolFormatterPair:
44
+ def get_formatter_pair(self, provider: Optional[LLMProvider], use_xml_tool_format: bool = False) -> ToolFormatterPair:
43
45
  """
44
- Retrieves the appropriate formatting pair for a given provider.
46
+ Retrieves the appropriate formatting pair for a given provider, honoring the XML override.
45
47
 
46
48
  Args:
47
49
  provider: The LLMProvider enum member.
50
+ use_xml_tool_format: If True, forces the use of XML formatters.
48
51
 
49
52
  Returns:
50
53
  The corresponding ToolFormatterPair instance.
51
54
  """
55
+ if use_xml_tool_format:
56
+ logger.debug("XML tool format is forced by configuration. Returning XML formatter pair.")
57
+ return self._xml_override_pair
58
+
52
59
  if provider and provider in self._pairs:
53
60
  pair = self._pairs[provider]
54
61
  logger.debug(f"Found specific formatter pair for provider {provider.name}: {pair}")
@@ -34,18 +34,25 @@ class ToolUsageParserRegistry(metaclass=SingletonMeta):
34
34
  }
35
35
  # A default parser for any provider not explicitly listed (defaults to JSON)
36
36
  self._default_parser = DefaultJsonToolUsageParser()
37
+ # A specific parser for the XML override
38
+ self._xml_override_parser = DefaultXmlToolUsageParser()
37
39
  logger.info("ToolUsageParserRegistry initialized with direct provider-to-parser mappings.")
38
40
 
39
- def get_parser(self, provider: Optional[LLMProvider]) -> BaseToolUsageParser:
41
+ def get_parser(self, provider: Optional[LLMProvider], use_xml_tool_format: bool = False) -> BaseToolUsageParser:
40
42
  """
41
- Retrieves the appropriate tool usage parser for a given provider.
43
+ Retrieves the appropriate tool usage parser for a given provider, honoring the XML override.
42
44
 
43
45
  Args:
44
46
  provider: The LLMProvider enum member.
47
+ use_xml_tool_format: If True, forces the use of the XML parser.
45
48
 
46
49
  Returns:
47
50
  The corresponding BaseToolUsageParser instance.
48
51
  """
52
+ if use_xml_tool_format:
53
+ logger.debug("XML tool format is forced by configuration. Returning XML parser.")
54
+ return self._xml_override_parser
55
+
49
56
  if provider and provider in self._parsers:
50
57
  parser = self._parsers[provider]
51
58
  logger.debug(f"Found specific tool usage parser for provider {provider.name}: {parser.get_name()}")
@@ -0,0 +1,204 @@
1
+ Metadata-Version: 2.4
2
+ Name: autobyteus
3
+ Version: 1.1.7
4
+ Summary: Multi-Agent framework
5
+ Home-page: https://github.com/AutoByteus/autobyteus
6
+ Author: Ryan Zheng
7
+ Author-email: ryan.zheng.work@gmail.com
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3.8
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Requires-Python: >=3.8
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: aiohttp
18
+ Requires-Dist: anthropic
19
+ Requires-Dist: autobyteus-llm-client==1.1.3
20
+ Requires-Dist: beautifulsoup4
21
+ Requires-Dist: boto3
22
+ Requires-Dist: botocore
23
+ Requires-Dist: brui-core==1.0.9
24
+ Requires-Dist: certifi==2025.4.26
25
+ Requires-Dist: google-api-python-client
26
+ Requires-Dist: google-generativeai
27
+ Requires-Dist: Jinja2
28
+ Requires-Dist: mcp[cli]
29
+ Requires-Dist: mistral_common
30
+ Requires-Dist: mistralai
31
+ Requires-Dist: numpy
32
+ Requires-Dist: ollama
33
+ Requires-Dist: openai
34
+ Requires-Dist: requests
35
+ Requires-Dist: rich
36
+ Requires-Dist: textual
37
+ Requires-Dist: tiktoken
38
+ Requires-Dist: tokenizers
39
+ Provides-Extra: dev
40
+ Requires-Dist: coverage; extra == "dev"
41
+ Requires-Dist: flake8; extra == "dev"
42
+ Requires-Dist: numpy; extra == "dev"
43
+ Requires-Dist: pre-commit; extra == "dev"
44
+ Requires-Dist: black; extra == "dev"
45
+ Requires-Dist: isort; extra == "dev"
46
+ Requires-Dist: gitpython==3.1.31; extra == "dev"
47
+ Requires-Dist: auto-gpt-plugin-template; extra == "dev"
48
+ Requires-Dist: mkdocs; extra == "dev"
49
+ Requires-Dist: pytest; extra == "dev"
50
+ Requires-Dist: asynctest; extra == "dev"
51
+ Requires-Dist: pytest-asyncio; extra == "dev"
52
+ Requires-Dist: pytest-benchmark; extra == "dev"
53
+ Requires-Dist: pytest-cov; extra == "dev"
54
+ Requires-Dist: pytest-integration; extra == "dev"
55
+ Requires-Dist: pytest-mock; extra == "dev"
56
+ Requires-Dist: vcrpy; extra == "dev"
57
+ Requires-Dist: pytest-vcr; extra == "dev"
58
+ Requires-Dist: load_dotenv; extra == "dev"
59
+ Dynamic: author
60
+ Dynamic: author-email
61
+ Dynamic: classifier
62
+ Dynamic: description
63
+ Dynamic: description-content-type
64
+ Dynamic: home-page
65
+ Dynamic: license-file
66
+ Dynamic: provides-extra
67
+ Dynamic: requires-dist
68
+ Dynamic: requires-python
69
+ Dynamic: summary
70
+
71
+ # Autobyteus
72
+
73
+ Autobyteus is an open-source, application-first agentic framework for Python. It is designed to help developers build, test, and deploy complex, stateful, and extensible AI agents by providing a robust architecture and a powerful set of tools.
74
+
75
+ ![Autobyteus TUI Dashboard](docs/images/image_1.png)
76
+
77
+ ## Architecture
78
+
79
+ Autobyteus is built with a modular, event-driven architecture designed for extensibility and clear separation of concerns. The key components are:
80
+
81
+ - **Agent Core**: The heart of the system. Each agent is a stateful, autonomous entity that runs as a background process in its own thread, managed by a dedicated `AgentWorker`. This design makes every agent a truly independent entity capable of handling long-running tasks.
82
+ - **Agent Teams**: The framework provides powerful constructs for building hierarchical multi-agent systems. The `AgentTeam` module allows you to compose teams of individual agents and even nest teams within other teams, enabling sophisticated, real-world organizational structures and delegation patterns.
83
+ - **Context & Configuration**: Agent behavior is defined through a static configuration (`AgentConfig`) and its dynamic state is managed in `AgentRuntimeState`. These are bundled into a comprehensive `AgentContext` that is passed to all components, providing a single source of truth.
84
+ - **Event-Driven System**: Agents operate on an internal `asyncio` event loop. User messages, tool results, and internal signals are handled as events, which are processed by dedicated `EventHandlers`. This decouples logic and makes the system highly extensible.
85
+ - **Pluggable Processors & Hooks**: The framework provides a chain of extension points to inject custom logic at every major step of an agent's reasoning loop. This architecture powers features like flexible tool format parsing. You can customize behavior by implementing:
86
+ - **`InputProcessors`**: To modify or enrich user messages *before* they are sent to the LLM.
87
+ - **`LLMResponseProcessors`**: To parse the LLM's raw output and extract structured actions, such as tool calls.
88
+ - **`ToolExecutionResultProcessors`**: To modify the result from a tool *before* it is sent back to the LLM for the next step of reasoning.
89
+ - **`PhaseHooks`**: To run custom code on specific agent lifecycle transitions (e.g., when an agent becomes `IDLE`).
90
+ - **Context-Aware Tooling**: Tools are first-class citizens that receive the agent's full `AgentContext` during execution. This allows tools to be deeply integrated with the agent's state, configuration, and workspace, enabling more intelligent and powerful actions.
91
+ - **Tool Approval Flow**: The framework has native support for human-in-the-loop workflows. By setting `auto_execute_tools=False` in the agent's configuration, the agent will pause before executing a tool, emit an event requesting permission, and wait for external approval before proceeding.
92
+ - **MCP Integration**: The framework has native support for the Model Context Protocol (MCP). This allows agents to discover and use tools from external, language-agnostic tool servers, making the ecosystem extremely flexible and ready for enterprise integration.
93
+
94
+ ## Key Features
95
+
96
+ #### 📊 Interactive TUI Dashboard
97
+ Launch and monitor your agent teams with our built-in Textual-based TUI.
98
+ - **Hierarchical View**: See the structure of your team, including sub-teams and their agents.
99
+ - **Real-Time Status**: Agent and team statuses are updated live, showing you who is idle, thinking, or executing a tool.
100
+ - **Detailed Logs**: Select any agent to view a detailed, streaming log of their thoughts, actions, and tool interactions.
101
+ - **Live Task Board**: Watch your team's `TaskBoard` update in real-time as the coordinator publishes a plan and agents complete their tasks.
102
+
103
+ | TUI - Detailed Agent Log | TUI - Task Board with Completed Task |
104
+ | :---: | :---: |
105
+ | ![Autobyteus Agent Log](docs/images/image_4.png) | ![Autobyteus Task Board](docs/images/image_3.png) |
106
+
107
+ #### 🏗️ Fluent Team Building
108
+ Define complex agent and team structures with an intuitive, fluent API. The `AgentTeamBuilder` makes composing your team simple and readable.
109
+
110
+ ```python
111
+ # --- From the Multi-Researcher Team Example ---
112
+ research_team = (
113
+ AgentTeamBuilder(
114
+ name="MultiSpecialistResearchTeam",
115
+ description="A team for delegating to multiple specialists."
116
+ )
117
+ .set_coordinator(coordinator_config)
118
+ .add_agent_node(researcher_web_config)
119
+ .add_agent_node(researcher_db_config)
120
+ .build()
121
+ )
122
+ ```
123
+
124
+ #### 🔁 Flexible Tool Formatting (JSON & XML)
125
+ Autobyteus intelligently handles tool communication with LLMs while giving you full control.
126
+ - **Provider-Aware by Default**: The framework automatically generates tool manifests and parses responses in the optimal format for the selected LLM provider (e.g., JSON for OpenAI/Gemini, XML for Anthropic).
127
+ - **XML Override for Efficiency**: You can set `use_xml_tool_format=True` on an `AgentConfig` or `AgentTeamBuilder` to force the use of XML for tool calls, which can be more efficient and reliable than JSON for complex tool schemas.
128
+
129
+ #### 📈 Flexible Communication Protocols
130
+ Choose the collaboration pattern that best fits your use case with configurable `TaskNotificationMode`s.
131
+ - **`AGENT_MANUAL_NOTIFICATION` (Default)**: A traditional approach where a coordinator agent is responsible for creating a plan and then explicitly notifying other agents to begin their work via messages.
132
+ - **`SYSTEM_EVENT_DRIVEN`**: A more automated approach where the coordinator's only job is to publish a plan to the `TaskBoard`. The framework then monitors the board and automatically notifies agents when their tasks become unblocked, enabling parallel execution and reducing coordinator overhead.
133
+
134
+ ## Requirements
135
+
136
+ - **Python Version**: Python 3.11 is the recommended and tested version for this project. Using newer versions of Python may result in dependency conflicts when installing the required packages. For a stable and tested environment, please use Python 3.11.
137
+
138
+ ## Getting Started
139
+
140
+ ### Installation
141
+
142
+ 1. **Clone the repository:**
143
+ ```bash
144
+ git clone https://github.com/your-username/autobyteus.git
145
+ cd autobyteus
146
+ ```
147
+
148
+ 2. **For users:**
149
+ To install Autobyteus and its core dependencies:
150
+ ```bash
151
+ pip install .
152
+ ```
153
+
154
+ 3. **For developers:**
155
+ To install Autobyteus with all development and example dependencies (including the TUI):
156
+ ```bash
157
+ pip install -r requirements-dev.txt
158
+ ```
159
+
160
+ 4. **Set up Environment Variables:**
161
+ Create a `.env` file in the root of the project and add your LLM provider API keys:
162
+ ```
163
+ # .env
164
+ OPENAI_API_KEY="sk-..."
165
+ KIMI_API_KEY="your-kimi-api-key"
166
+ # etc.
167
+ ```
168
+
169
+ ### Running the Examples
170
+
171
+ The best way to experience Autobyteus is to run one of the included examples. The event-driven software engineering team is a great showcase of the framework's capabilities.
172
+
173
+ ```bash
174
+ # Run the event-driven software engineering team example
175
+ python autobyteus/examples/agent_team/event_driven/run_software_engineering_team.py --llm-model gpt-4o
176
+
177
+ # Run the hierarchical debate team example
178
+ python autobyteus/examples/agent_team/manual_notification/run_debate_team.py --llm-model gpt-4-turbo
179
+ ```
180
+ You can see all available models and their identifiers by running an example with the `--help-models` flag.
181
+
182
+ ### Building the Library
183
+
184
+ To build Autobyteus as a distributable package, follow these steps:
185
+
186
+ 1. Ensure you have the latest version of `setuptools` and `wheel` installed:
187
+ ```
188
+ pip install --upgrade setuptools wheel
189
+ ```
190
+
191
+ 2. Build the distribution packages:
192
+ ```
193
+ python setup.py sdist bdist_wheel
194
+ ```
195
+
196
+ This will create a `dist` directory containing the built `sdist` and `wheel` distributions.
197
+
198
+ ## Contributing
199
+
200
+ (Add guidelines for contributing to the project)
201
+
202
+ ## License
203
+
204
+ This project is licensed under the MIT License.