Skip to content

Agents

An Agent is an autonomous unit designed to perform tasks, make decisions, and possibly interact with other Agents. Agents can be specialized by role or configured for different goals.

Represents an AI-driven entity, configured with a model and optional default Task.

Source code in fsdk/anote-sdk.py
class Agent:
    """
    Represents an AI-driven entity, configured with a model and optional default Task.
    """

    def __init__(
        self,
        name: str,
        model: str,
        system_prompt: str,
        task: Optional["Task"] = None,
        tools: Optional[List[str]] = None,
        verbose: bool = False
    ):
        """
        Args:
            name (str): Short identifier for the agent (e.g., 'FinanceAgent').
            model (str): Underlying LLM (e.g., 'gpt4', 'gpt3.5turbo', 'llama').
            system_prompt (str): A top-level prompt or role instruction (e.g., 'You are an event planner.').
            task (Task, optional): A default Task object this Agent is responsible for.
            tools (list of str, optional): Names of tools the Agent can call (e.g., 'ScrapeWebsiteTool').
            verbose (bool): If True, logs extra debug info.
        """
        self.name = name
        self.model = model
        self.system_prompt = system_prompt
        self.task = task
        self.tools = tools or []
        self.verbose = verbose

    def __repr__(self):
        return f"<Agent name={self.name} model={self.model} verbose={self.verbose}>"

__init__(name, model, system_prompt, task=None, tools=None, verbose=False)

Parameters:

Name Type Description Default
name str

Short identifier for the agent (e.g., 'FinanceAgent').

required
model str

Underlying LLM (e.g., 'gpt4', 'gpt3.5turbo', 'llama').

required
system_prompt str

A top-level prompt or role instruction (e.g., 'You are an event planner.').

required
task Task

A default Task object this Agent is responsible for.

None
tools list of str

Names of tools the Agent can call (e.g., 'ScrapeWebsiteTool').

None
verbose bool

If True, logs extra debug info.

False
Source code in fsdk/anote-sdk.py
def __init__(
    self,
    name: str,
    model: str,
    system_prompt: str,
    task: Optional["Task"] = None,
    tools: Optional[List[str]] = None,
    verbose: bool = False
):
    """
    Args:
        name (str): Short identifier for the agent (e.g., 'FinanceAgent').
        model (str): Underlying LLM (e.g., 'gpt4', 'gpt3.5turbo', 'llama').
        system_prompt (str): A top-level prompt or role instruction (e.g., 'You are an event planner.').
        task (Task, optional): A default Task object this Agent is responsible for.
        tools (list of str, optional): Names of tools the Agent can call (e.g., 'ScrapeWebsiteTool').
        verbose (bool): If True, logs extra debug info.
    """
    self.name = name
    self.model = model
    self.system_prompt = system_prompt
    self.task = task
    self.tools = tools or []
    self.verbose = verbose

Agents Fields

  • name: Short identifier for the Agent (e.g., "FinanceAgent").
  • model: Underlying LLM (e.g., "gpt4", "gpt3.5turbo", "llama").
  • system_prompt: A top-level prompt or role instruction (e.g., "You are an event planner.").
  • task: A default Task this Agent is responsible for (optional).
  • tools: Names of tools the Agent can call (e.g., "ScrapeWebsiteTool").
  • verbose: If True, logs extra debug info.

Example:

from anote_agents import Agent

agent = Agent(
    name="FinanceAgent",
    model="gpt4",
    system_prompt="You analyze financial data.",
    task=None,
    tools=["SerperDevTool", "ScrapeWebsiteTool"],
    verbose=True
)

Agents can autonomously execute tasks, leverage tools to gather information or take actions, and collaborate with other agents within a crew.

Example 2:

from anote_agents import Agent

customer_support_agent = Agent(
    role="Customer Support Agent",
    goal="Assist users with common troubleshooting steps",
    tools=[],
    verbose=True,
    backstory="You are friendly and patient, helping customers find solutions."
)
By defining Agents carefully, you ensure they remain focused on their intended purpose and handle tasks efficiently.