- Notifications
You must be signed in to change notification settings - Fork1k
Closed
Description
Toolsets live again! Phoenix of#110
Rough working:
fromabcimportabstractmethod,ABCfromcontextlibimportasynccontextmanagermcp_thing=MCPThing()agent=Agent(mcp_servers=[mcp_thing],)# ---#classToolset(ABC):asyncdef__aenter__(self,run_context,sampling_callback,agent_name:str):passasyncdef__aexit__(self,exc_type,exc_val,exc_tb):pass@abstractmethodasyncdeflist_tools(self):return []asyncdefcall_tools(self,tools)->list[Part]: ...agent=Agent(toolset=mcp_thing,)agent=Agent(toolset=[FilterToolsToolset(MCPToolset(mcp_thing1),exclude='foo'),MCPToolset(mcp_thing2), ],)@agent.tooldeffoo():passagent.run_sync()asyncdefmain():asyncwithagent.run_toolsets():
Metadata
Metadata
Assignees
Labels
No labels