autobyteus 1.2.0__py3-none-any.whl → 1.2.1__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.
- autobyteus/agent/context/agent_runtime_state.py +4 -0
- autobyteus/agent/events/notifiers.py +5 -1
- autobyteus/agent/message/send_message_to.py +5 -4
- autobyteus/agent/streaming/agent_event_stream.py +5 -0
- autobyteus/agent/streaming/stream_event_payloads.py +25 -0
- autobyteus/agent/streaming/stream_events.py +13 -1
- autobyteus/agent_team/bootstrap_steps/task_notifier_initialization_step.py +4 -4
- autobyteus/agent_team/bootstrap_steps/team_context_initialization_step.py +12 -12
- autobyteus/agent_team/context/agent_team_runtime_state.py +2 -2
- autobyteus/agent_team/streaming/agent_team_event_notifier.py +4 -4
- autobyteus/agent_team/streaming/agent_team_stream_event_payloads.py +3 -3
- autobyteus/agent_team/streaming/agent_team_stream_events.py +8 -8
- autobyteus/agent_team/task_notification/activation_policy.py +1 -1
- autobyteus/agent_team/task_notification/system_event_driven_agent_task_notifier.py +22 -22
- autobyteus/agent_team/task_notification/task_notification_mode.py +1 -1
- autobyteus/cli/agent_team_tui/app.py +4 -4
- autobyteus/cli/agent_team_tui/state.py +8 -8
- autobyteus/cli/agent_team_tui/widgets/focus_pane.py +3 -3
- autobyteus/cli/agent_team_tui/widgets/shared.py +1 -1
- autobyteus/cli/agent_team_tui/widgets/{task_board_panel.py → task_plan_panel.py} +5 -5
- autobyteus/events/event_types.py +4 -3
- autobyteus/multimedia/audio/api/__init__.py +3 -2
- autobyteus/multimedia/audio/api/openai_audio_client.py +112 -0
- autobyteus/multimedia/audio/audio_client_factory.py +37 -0
- autobyteus/multimedia/image/image_client_factory.py +1 -1
- autobyteus/task_management/__init__.py +43 -20
- autobyteus/task_management/{base_task_board.py → base_task_plan.py} +16 -13
- autobyteus/task_management/converters/__init__.py +2 -2
- autobyteus/task_management/converters/{task_board_converter.py → task_plan_converter.py} +13 -13
- autobyteus/task_management/events.py +7 -7
- autobyteus/task_management/{in_memory_task_board.py → in_memory_task_plan.py} +34 -22
- autobyteus/task_management/schemas/__init__.py +3 -0
- autobyteus/task_management/schemas/task_status_report.py +2 -2
- autobyteus/task_management/schemas/todo_definition.py +15 -0
- autobyteus/task_management/todo.py +29 -0
- autobyteus/task_management/todo_list.py +75 -0
- autobyteus/task_management/tools/__init__.py +24 -8
- autobyteus/task_management/tools/task_tools/__init__.py +19 -0
- autobyteus/task_management/tools/{assign_task_to.py → task_tools/assign_task_to.py} +18 -18
- autobyteus/task_management/tools/{publish_task.py → task_tools/create_task.py} +16 -18
- autobyteus/task_management/tools/{publish_tasks.py → task_tools/create_tasks.py} +19 -19
- autobyteus/task_management/tools/{get_my_tasks.py → task_tools/get_my_tasks.py} +15 -15
- autobyteus/task_management/tools/{get_task_board_status.py → task_tools/get_task_plan_status.py} +16 -16
- autobyteus/task_management/tools/{update_task_status.py → task_tools/update_task_status.py} +16 -16
- autobyteus/task_management/tools/todo_tools/__init__.py +18 -0
- autobyteus/task_management/tools/todo_tools/add_todo.py +78 -0
- autobyteus/task_management/tools/todo_tools/create_todo_list.py +79 -0
- autobyteus/task_management/tools/todo_tools/get_todo_list.py +55 -0
- autobyteus/task_management/tools/todo_tools/update_todo_status.py +85 -0
- autobyteus/tools/__init__.py +15 -11
- autobyteus/tools/bash/bash_executor.py +3 -3
- autobyteus/tools/browser/session_aware/browser_session_aware_navigate_to.py +5 -5
- autobyteus/tools/browser/session_aware/browser_session_aware_web_element_trigger.py +4 -4
- autobyteus/tools/browser/session_aware/browser_session_aware_webpage_reader.py +3 -3
- autobyteus/tools/browser/session_aware/browser_session_aware_webpage_screenshot_taker.py +3 -3
- autobyteus/tools/browser/standalone/navigate_to.py +13 -9
- autobyteus/tools/browser/standalone/web_page_pdf_generator.py +9 -5
- autobyteus/tools/browser/standalone/webpage_image_downloader.py +10 -6
- autobyteus/tools/browser/standalone/webpage_reader.py +13 -9
- autobyteus/tools/browser/standalone/webpage_screenshot_taker.py +9 -5
- autobyteus/tools/file/__init__.py +13 -0
- autobyteus/tools/file/{file_editor.py → edit_file.py} +11 -11
- autobyteus/tools/file/list_directory.py +168 -0
- autobyteus/tools/file/{file_reader.py → read_file.py} +3 -3
- autobyteus/tools/file/search_files.py +188 -0
- autobyteus/tools/file/{file_writer.py → write_file.py} +3 -3
- autobyteus/tools/functional_tool.py +10 -8
- autobyteus/tools/mcp/tool.py +3 -3
- autobyteus/tools/mcp/tool_registrar.py +5 -2
- autobyteus/tools/multimedia/__init__.py +2 -1
- autobyteus/tools/multimedia/audio_tools.py +2 -2
- autobyteus/tools/{download_media_tool.py → multimedia/download_media_tool.py} +3 -3
- autobyteus/tools/multimedia/image_tools.py +4 -4
- autobyteus/tools/multimedia/media_reader_tool.py +1 -1
- autobyteus/tools/registry/tool_definition.py +66 -13
- autobyteus/tools/registry/tool_registry.py +29 -0
- autobyteus/tools/search/__init__.py +17 -0
- autobyteus/tools/search/base_strategy.py +35 -0
- autobyteus/tools/search/client.py +24 -0
- autobyteus/tools/search/factory.py +81 -0
- autobyteus/tools/search/google_cse_strategy.py +68 -0
- autobyteus/tools/search/providers.py +10 -0
- autobyteus/tools/search/serpapi_strategy.py +65 -0
- autobyteus/tools/search/serper_strategy.py +87 -0
- autobyteus/tools/search_tool.py +83 -0
- autobyteus/tools/timer.py +4 -0
- autobyteus/tools/tool_meta.py +4 -24
- autobyteus/workflow/bootstrap_steps/coordinator_prompt_preparation_step.py +1 -2
- {autobyteus-1.2.0.dist-info → autobyteus-1.2.1.dist-info}/METADATA +5 -5
- {autobyteus-1.2.0.dist-info → autobyteus-1.2.1.dist-info}/RECORD +95 -80
- examples/run_agentic_software_engineer.py +239 -0
- examples/run_poem_writer.py +3 -3
- autobyteus/person/__init__.py +0 -0
- autobyteus/person/examples/__init__.py +0 -0
- autobyteus/person/examples/sample_persons.py +0 -14
- autobyteus/person/examples/sample_roles.py +0 -14
- autobyteus/person/person.py +0 -29
- autobyteus/person/role.py +0 -14
- autobyteus/tools/google_search.py +0 -149
- {autobyteus-1.2.0.dist-info → autobyteus-1.2.1.dist-info}/WHEEL +0 -0
- {autobyteus-1.2.0.dist-info → autobyteus-1.2.1.dist-info}/licenses/LICENSE +0 -0
- {autobyteus-1.2.0.dist-info → autobyteus-1.2.1.dist-info}/top_level.txt +0 -0
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
from autobyteus.person.examples.sample_roles import RESEARCHER_ROLE, WRITER_ROLE
|
|
2
|
-
from autobyteus.person.person import Person
|
|
3
|
-
|
|
4
|
-
ANNA = Person(
|
|
5
|
-
name="Anna",
|
|
6
|
-
role=RESEARCHER_ROLE,
|
|
7
|
-
characteristics=["detail-oriented", "analytical", "curious"]
|
|
8
|
-
)
|
|
9
|
-
|
|
10
|
-
RYAN = Person(
|
|
11
|
-
name="Ryan",
|
|
12
|
-
role=WRITER_ROLE,
|
|
13
|
-
characteristics=["creative", "empathetic", "articulate"]
|
|
14
|
-
)
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
from autobyteus.person.role import Role
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
RESEARCHER_ROLE = Role(
|
|
5
|
-
name="Researcher",
|
|
6
|
-
skills=["data analysis", "literature review", "critical thinking"],
|
|
7
|
-
responsibilities=["gather information", "analyze data", "report findings"]
|
|
8
|
-
)
|
|
9
|
-
|
|
10
|
-
WRITER_ROLE = Role(
|
|
11
|
-
name="Writer",
|
|
12
|
-
skills=["content creation", "editing", "storytelling"],
|
|
13
|
-
responsibilities=["draft articles", "revise content", "adapt to different styles"]
|
|
14
|
-
)
|
autobyteus/person/person.py
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
from typing import List
|
|
2
|
-
from autobyteus.person.role import Role
|
|
3
|
-
|
|
4
|
-
class Person:
|
|
5
|
-
def __init__(self, name: str, role: Role, characteristics: List[str]):
|
|
6
|
-
self.name = name
|
|
7
|
-
self.role = role
|
|
8
|
-
self.characteristics = characteristics
|
|
9
|
-
self.tasks = []
|
|
10
|
-
|
|
11
|
-
def get_description(self) -> str:
|
|
12
|
-
characteristics_str = ", ".join(self.characteristics)
|
|
13
|
-
return (f"Person: {self.name}\n"
|
|
14
|
-
f"{self.role.get_description()}\n"
|
|
15
|
-
f"Characteristics: {characteristics_str}")
|
|
16
|
-
|
|
17
|
-
def __str__(self) -> str:
|
|
18
|
-
return f"{self.name} ({self.role.name})"
|
|
19
|
-
|
|
20
|
-
def assign_task(self, task):
|
|
21
|
-
if task not in self.tasks:
|
|
22
|
-
self.tasks.append(task)
|
|
23
|
-
|
|
24
|
-
def unassign_task(self, task):
|
|
25
|
-
if task in self.tasks:
|
|
26
|
-
self.tasks.remove(task)
|
|
27
|
-
|
|
28
|
-
def get_tasks(self):
|
|
29
|
-
return self.tasks
|
autobyteus/person/role.py
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
from typing import List
|
|
2
|
-
|
|
3
|
-
class Role:
|
|
4
|
-
def __init__(self, name: str, skills: List[str], responsibilities: List[str]):
|
|
5
|
-
self.name = name
|
|
6
|
-
self.skills = skills
|
|
7
|
-
self.responsibilities = responsibilities
|
|
8
|
-
|
|
9
|
-
def get_description(self) -> str:
|
|
10
|
-
skills_str = ", ".join(self.skills)
|
|
11
|
-
responsibilities_str = ", ".join(self.responsibilities)
|
|
12
|
-
return (f"Role: {self.name}\n"
|
|
13
|
-
f"Skills: {skills_str}\n"
|
|
14
|
-
f"Responsibilities: {responsibilities_str}")
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import json
|
|
3
|
-
import logging
|
|
4
|
-
import aiohttp
|
|
5
|
-
from typing import Optional, TYPE_CHECKING, Any, Dict, List
|
|
6
|
-
|
|
7
|
-
from autobyteus.tools.base_tool import BaseTool
|
|
8
|
-
from autobyteus.tools.tool_config import ToolConfig
|
|
9
|
-
from autobyteus.utils.parameter_schema import ParameterSchema, ParameterDefinition, ParameterType
|
|
10
|
-
from autobyteus.tools.tool_category import ToolCategory
|
|
11
|
-
|
|
12
|
-
if TYPE_CHECKING:
|
|
13
|
-
from autobyteus.agent.context import AgentContext
|
|
14
|
-
|
|
15
|
-
logger = logging.getLogger(__name__)
|
|
16
|
-
|
|
17
|
-
class GoogleSearch(BaseTool):
|
|
18
|
-
"""
|
|
19
|
-
Performs a Google search using the Serper.dev API and returns a structured summary of the results.
|
|
20
|
-
This tool requires a Serper API key, which should be set in the SERPER_API_KEY environment variable.
|
|
21
|
-
"""
|
|
22
|
-
CATEGORY = ToolCategory.WEB
|
|
23
|
-
API_URL = "https://google.serper.dev/search"
|
|
24
|
-
|
|
25
|
-
def __init__(self, config: Optional[ToolConfig] = None):
|
|
26
|
-
super().__init__(config=config)
|
|
27
|
-
self.api_key: Optional[str] = None
|
|
28
|
-
|
|
29
|
-
if config:
|
|
30
|
-
self.api_key = config.get('api_key')
|
|
31
|
-
|
|
32
|
-
if not self.api_key:
|
|
33
|
-
self.api_key = os.getenv("SERPER_API_KEY")
|
|
34
|
-
|
|
35
|
-
if not self.api_key:
|
|
36
|
-
raise ValueError(
|
|
37
|
-
"GoogleSearch tool requires a Serper API key. "
|
|
38
|
-
"Please provide it via the 'api_key' config parameter or set the 'SERPER_API_KEY' environment variable."
|
|
39
|
-
)
|
|
40
|
-
logger.debug("GoogleSearch (API-based) tool initialized.")
|
|
41
|
-
|
|
42
|
-
@classmethod
|
|
43
|
-
def get_name(cls) -> str:
|
|
44
|
-
return "GoogleSearch"
|
|
45
|
-
|
|
46
|
-
@classmethod
|
|
47
|
-
def get_description(cls) -> str:
|
|
48
|
-
return (
|
|
49
|
-
"Searches Google for a given query using the Serper API. "
|
|
50
|
-
"Returns a concise, structured summary of search results, including direct answers and top organic links."
|
|
51
|
-
)
|
|
52
|
-
|
|
53
|
-
@classmethod
|
|
54
|
-
def get_argument_schema(cls) -> Optional[ParameterSchema]:
|
|
55
|
-
schema = ParameterSchema()
|
|
56
|
-
schema.add_parameter(ParameterDefinition(
|
|
57
|
-
name="query",
|
|
58
|
-
param_type=ParameterType.STRING,
|
|
59
|
-
description="The search query string.",
|
|
60
|
-
required=True
|
|
61
|
-
))
|
|
62
|
-
schema.add_parameter(ParameterDefinition(
|
|
63
|
-
name="num_results",
|
|
64
|
-
param_type=ParameterType.INTEGER,
|
|
65
|
-
description="The number of organic search results to return.",
|
|
66
|
-
required=False,
|
|
67
|
-
default_value=5,
|
|
68
|
-
min_value=1,
|
|
69
|
-
max_value=10
|
|
70
|
-
))
|
|
71
|
-
return schema
|
|
72
|
-
|
|
73
|
-
@classmethod
|
|
74
|
-
def get_config_schema(cls) -> Optional[ParameterSchema]:
|
|
75
|
-
schema = ParameterSchema()
|
|
76
|
-
schema.add_parameter(ParameterDefinition(
|
|
77
|
-
name="api_key",
|
|
78
|
-
param_type=ParameterType.STRING,
|
|
79
|
-
description="The API key for the Serper.dev service. Overrides the SERPER_API_KEY environment variable.",
|
|
80
|
-
required=False
|
|
81
|
-
))
|
|
82
|
-
return schema
|
|
83
|
-
|
|
84
|
-
def _format_results(self, data: Dict[str, Any]) -> str:
|
|
85
|
-
"""Formats the JSON response from Serper into a clean string for an LLM."""
|
|
86
|
-
summary_parts = []
|
|
87
|
-
|
|
88
|
-
# 1. Answer Box (most important for direct questions)
|
|
89
|
-
if "answerBox" in data:
|
|
90
|
-
answer_box = data["answerBox"]
|
|
91
|
-
title = answer_box.get("title", "")
|
|
92
|
-
snippet = answer_box.get("snippet") or answer_box.get("answer")
|
|
93
|
-
summary_parts.append(f"Direct Answer for '{title}':\n{snippet}")
|
|
94
|
-
|
|
95
|
-
# 2. Knowledge Graph (for entity information)
|
|
96
|
-
if "knowledgeGraph" in data:
|
|
97
|
-
kg = data["knowledgeGraph"]
|
|
98
|
-
title = kg.get("title", "")
|
|
99
|
-
description = kg.get("description")
|
|
100
|
-
summary_parts.append(f"Summary for '{title}':\n{description}")
|
|
101
|
-
|
|
102
|
-
# 3. Organic Results (the main search links)
|
|
103
|
-
if "organic" in data and data["organic"]:
|
|
104
|
-
organic_results = data["organic"]
|
|
105
|
-
results_str = "\n".join(
|
|
106
|
-
f"{i+1}. {result.get('title', 'No Title')}\n"
|
|
107
|
-
f" Link: {result.get('link', 'No Link')}\n"
|
|
108
|
-
f" Snippet: {result.get('snippet', 'No Snippet')}"
|
|
109
|
-
for i, result in enumerate(organic_results)
|
|
110
|
-
)
|
|
111
|
-
summary_parts.append(f"Search Results:\n{results_str}")
|
|
112
|
-
|
|
113
|
-
if not summary_parts:
|
|
114
|
-
return "No relevant information found for the query."
|
|
115
|
-
|
|
116
|
-
return "\n\n---\n\n".join(summary_parts)
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
async def _execute(self, context: 'AgentContext', query: str, num_results: int = 5) -> str:
|
|
120
|
-
logger.info(f"Executing GoogleSearch (API) for agent {context.agent_id} with query: '{query}'")
|
|
121
|
-
|
|
122
|
-
headers = {
|
|
123
|
-
'X-API-KEY': self.api_key,
|
|
124
|
-
'Content-Type': 'application/json'
|
|
125
|
-
}
|
|
126
|
-
payload = json.dumps({
|
|
127
|
-
"q": query,
|
|
128
|
-
"num": num_results
|
|
129
|
-
})
|
|
130
|
-
|
|
131
|
-
try:
|
|
132
|
-
async with aiohttp.ClientSession() as session:
|
|
133
|
-
async with session.post(self.API_URL, headers=headers, data=payload) as response:
|
|
134
|
-
if response.status == 200:
|
|
135
|
-
data = await response.json()
|
|
136
|
-
return self._format_results(data)
|
|
137
|
-
else:
|
|
138
|
-
error_text = await response.text()
|
|
139
|
-
logger.error(
|
|
140
|
-
f"Serper API returned a non-200 status code: {response.status}. "
|
|
141
|
-
f"Response: {error_text}"
|
|
142
|
-
)
|
|
143
|
-
raise RuntimeError(f"API request failed with status {response.status}: {error_text}")
|
|
144
|
-
except aiohttp.ClientError as e:
|
|
145
|
-
logger.error(f"Network error during GoogleSearch API call: {e}", exc_info=True)
|
|
146
|
-
raise RuntimeError(f"A network error occurred: {e}")
|
|
147
|
-
except Exception as e:
|
|
148
|
-
logger.error(f"An unexpected error occurred in GoogleSearch tool: {e}", exc_info=True)
|
|
149
|
-
raise
|
|
File without changes
|
|
File without changes
|
|
File without changes
|