Feat : browser v0

This commit is contained in:
martin legrand
2025-03-10 21:05:10 +01:00
parent a4008c14ef
commit 68bab4ecac
7 changed files with 190 additions and 3 deletions
+2 -1
View File
@@ -4,5 +4,6 @@ from .code_agent import CoderAgent
from .casual_agent import CasualAgent
from .file_agent import FileAgent
from .planner_agent import PlannerAgent
from .browser_agent import BrowserAgent
__all__ = ["Agent", "CoderAgent", "CasualAgent", "FileAgent", "PlannerAgent"]
__all__ = ["Agent", "CoderAgent", "CasualAgent", "FileAgent", "PlannerAgent", "BrowserAgent"]
+23
View File
@@ -0,0 +1,23 @@
from sources.utility import pretty_print, animate_thinking
from sources.agents.agent import Agent
from sources.tools.webSearch import webSearch
from sources.browser import Browser
class BrowserAgent(Agent):
def __init__(self, model, name, prompt_path, provider):
"""
The casual agent is a special for casual talk to the user without specific tasks.
"""
super().__init__(model, name, prompt_path, provider)
self.tools = {
"web_search": webSearch(),
}
self.role = "deep research and web search"
self.browser = Browser()
self.browser.goTo("https://github.com/")
def process(self, prompt, speech_module) -> str:
raise NotImplementedError("Browser agent is not implemented yet")
if __name__ == "__main__":
browser = Browser()