Skip to content

Tools

Tools extend the capabilities of an Agent, allowing it to perform specialized actions—like web searches, website scraping, or data lookups.

Represents an external capability or integration (e.g., web search, data fetch).

Source code in fsdk/anote-sdk.py
class Tools:
    """
    Represents an external capability or integration (e.g., web search, data fetch).
    """

    def __init__(
        self,
        tool_name: str,
        config: Optional[Dict[str, Any]] = None
    ):
        """
        Args:
            tool_name (str): Identifier for the tool (e.g., 'ScrapeWebsiteTool').
            config (dict, optional): Configuration details (e.g., API keys, parameters).
        """
        self.tool_name = tool_name
        self.config = config or {}

    def __repr__(self):
        return f"<Tool tool_name={self.tool_name}>"

__init__(tool_name, config=None)

Parameters:

Name Type Description Default
tool_name str

Identifier for the tool (e.g., 'ScrapeWebsiteTool').

required
config dict

Configuration details (e.g., API keys, parameters).

None
Source code in fsdk/anote-sdk.py
def __init__(
    self,
    tool_name: str,
    config: Optional[Dict[str, Any]] = None
):
    """
    Args:
        tool_name (str): Identifier for the tool (e.g., 'ScrapeWebsiteTool').
        config (dict, optional): Configuration details (e.g., API keys, parameters).
    """
    self.tool_name = tool_name
    self.config = config or {}

Tools Fields

  • tool_name: Identifier for the Tool (e.g., "ScrapeWebsiteTool").
  • config: Configuration details (e.g., API keys, search parameters) (optional).

Example 1:

from anote_agents import Agent

# Agent referencing two tools by name
agent_with_tools = Agent(
    name="ResearchAgent",
    model="gpt3.5turbo",
    system_prompt="You are skilled at finding online resources.",
    tools=["SerperDevTool", "ScrapeWebsiteTool"],
    verbose=False
)

Tools act as plugins or external functions the Agent can call.

Example 2:

from anote_agents.tools import SerperDevTool

search_tool = SerperDevTool()
# Provides web search functionality
# Typically requires an API key or developer token

scrape_tool = ScrapeWebsiteTool()
# Allows Agents to fetch and parse HTML from websites
# Assigning Tools to Agents

venue_coordinator.tools = [search_tool, scrape_tool]

Building Custom Tools

You can implement custom tools by extending a base Tool class and overriding a run() method. This approach unifies external integrations under a single interface.