Toolkit

Toolkit(tools: list[Tool])
A class representing a set of tools that can be used by an agent for various tasks.
Create a new Toolkit object.
Parameters:
NameDescription
toolsType: list[Tool]

Instance Attributes

tools


Get the list of tools in the set.

Instance Methods

get_tool

get_tool(self, tool_name: str) -> Tool
Get a tool from the set by name.
Parameters:
NameDescription
tool_nameThe name of the tool to get.

Type: str
Returns:
TypeDescription
ToolTool: The tool with the given name.

register_for_execution

register_for_execution(self, agent: ConversableAgent) -> 
Register the tools in the set with an agent for Parameters:
NameDescription
agentThe agent to register the tools with.

Type: ConversableAgent

register_for_llm

register_for_llm(self, agent: ConversableAgent) -> 
Register the tools in the set with an LLM agent.
Parameters:
NameDescription
agentThe LLM agent to register the tools with.

Type: ConversableAgent

remove_tool

remove_tool(self, tool_name: str) -> None
Remove a tool from the set by name.
Parameters:
NameDescription
tool_nameThe name of the tool to remove.

Type: str

set_tool

set_tool(self, tool: Tool) -> None
Set a tool in the set.
Parameters:
NameDescription
toolThe tool to set.

Type: Tool