Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/tool/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from app.tool.base import BaseTool
from app.tool.bash import Bash
from app.tool.browser_use_tool import BrowserUseTool
from app.tool.crawl4ai import Crawl4aiTool
from app.tool.create_chat_completion import CreateChatCompletion
from app.tool.planning import PlanningTool
from app.tool.str_replace_editor import StrReplaceEditor
from app.tool.terminate import Terminate
from app.tool.tool_collection import ToolCollection
from app.tool.web_search import WebSearch
from app.tool.crawl4ai import Crawl4aiTool


__all__ = [
Expand All @@ -20,5 +20,5 @@
"ToolCollection",
"CreateChatCompletion",
"PlanningTool",
"Crawl4aiTool"
"Crawl4aiTool",
]
2 changes: 1 addition & 1 deletion app/tool/crawl4ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ async def execute(

return ToolResult(output="\n".join(output_lines))

except ImportError as e:
except ImportError:
error_msg = "Crawl4AI is not installed. Please install it with: pip install crawl4ai"
logger.error(error_msg)
return ToolResult(error=error_msg)
Expand Down
1 change: 0 additions & 1 deletion protocol/a2a/app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,3 @@ Response:
## Learn More

- [A2A Protocol Documentation](https://google.github.io/A2A/#/documentation)

1 change: 0 additions & 1 deletion protocol/a2a/app/README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,3 @@ Response:
## Learn More

- [A2A Protocol Documentation](https://google.github.io/A2A/#/documentation)

6 changes: 3 additions & 3 deletions protocol/a2a/app/agent.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import httpx
from typing import Any, Dict, AsyncIterable, Literal, List, ClassVar
from typing import Any, AsyncIterable, ClassVar, Dict, List, Literal

from pydantic import BaseModel

from app.agent.manus import Manus


Expand All @@ -12,7 +13,6 @@ class ResponseFormat(BaseModel):


class A2AManus(Manus):

async def invoke(self, query, sessionId) -> str:
config = {"configurable": {"thread_id": sessionId}}
response = await self.run(query)
Expand Down
14 changes: 6 additions & 8 deletions protocol/a2a/app/agent_executor.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
import logging
from typing import Awaitable, Callable

from a2a.server.agent_execution import AgentExecutor, RequestContext
from a2a.server.events import Event, EventQueue
from a2a.server.tasks import TaskUpdater
from a2a.server.events import EventQueue
from a2a.types import (
InvalidParamsError,
Part,
Task,
TextPart,
UnsupportedOperationError,
)
from a2a.utils import (
completed_task,
new_artifact,
)
from .agent import A2AManus
from a2a.utils import completed_task, new_artifact
from a2a.utils.errors import ServerError
from typing import Callable, Awaitable

from .agent import A2AManus


logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
Expand Down
25 changes: 11 additions & 14 deletions protocol/a2a/app/main.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
import httpx
import argparse
import asyncio
import logging
from typing import Optional

import httpx
from a2a.server.apps import A2AStarletteApplication
from a2a.server.request_handlers import DefaultRequestHandler
from a2a.server.tasks import InMemoryTaskStore, InMemoryPushNotifier
from a2a.types import (
AgentCapabilities,
AgentCard,
AgentSkill,
)

from .agent_executor import ManusExecutor
from a2a.server.tasks import InMemoryPushNotifier, InMemoryTaskStore
from a2a.types import AgentCapabilities, AgentCard, AgentSkill
from dotenv import load_dotenv

from .agent import A2AManus
from app.tool.browser_use_tool import _BROWSER_DESCRIPTION
from app.tool.str_replace_editor import _STR_REPLACE_EDITOR_DESCRIPTION
from app.tool.terminate import _TERMINATE_DESCRIPTION
import logging
from dotenv import load_dotenv
import asyncio
from typing import Optional

from .agent import A2AManus
from .agent_executor import ManusExecutor


load_dotenv()

Expand Down
52 changes: 26 additions & 26 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
pydantic~=2.10.6
openai~=1.66.3
tenacity~=9.0.0
pydantic~=2.11.7
openai~=1.99.9
tenacity~=9.1.2
pyyaml~=6.0.2
loguru~=0.7.3
numpy
datasets~=3.4.1
fastapi~=0.115.11
tiktoken~=0.9.0
numpy~=2.3.2
datasets~=4.0.0
fastapi~=0.116.1
tiktoken~=0.11.0

html2text~=2024.2.26
gymnasium~=1.1.1
pillow~=11.1.0
html2text~=2025.4.15
gymnasium~=1.2.0
pillow~=11.3.0
browsergym~=0.13.3
uvicorn~=0.34.0
uvicorn~=0.35.0
unidiff~=0.7.5
browser-use~=0.1.40
browser-use~=0.5.9
googlesearch-python~=1.3.0
baidusearch~=1.0.3
duckduckgo_search~=7.5.3
duckduckgo-search~=8.1.1

aiofiles~=24.1.0
pydantic_core~=2.27.2
pydantic-core~=2.33.2
colorama~=0.4.6
playwright~=1.51.0
playwright~=1.54.0

docker~=7.1.0
pytest~=8.3.5
pytest-asyncio~=0.25.3
pytest~=8.4.1
pytest-asyncio~=1.1.0

mcp~=1.5.0
httpx>=0.27.0
tomli>=2.0.0
mcp~=1.12.4
httpx>=0.28.1
tomli>=2.2.1

boto3~=1.37.18
boto3~=1.40.8

requests~=2.32.3
beautifulsoup4~=4.13.3
crawl4ai~=0.6.3
requests~=2.32.4
beautifulsoup4~=4.13.4
crawl4ai~=0.7.3

huggingface-hub~=0.29.2
setuptools~=75.8.0
huggingface-hub~=0.34.4
setuptools~=80.9.0