From 571da68fab7bfca9a8b76cac937936cee6c076ce Mon Sep 17 00:00:00 2001 From: JamesChannel1 <89313019+JamesChannel1@users.noreply.github.com> Date: Mon, 25 Dec 2023 00:38:21 +0000 Subject: [PATCH] Update agent.py updated docstring --- crewai/agent.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/crewai/agent.py b/crewai/agent.py index b0e5100a1..fe13447de 100644 --- a/crewai/agent.py +++ b/crewai/agent.py @@ -13,7 +13,22 @@ from langchain.memory import ConversationSummaryMemory from .prompts import Prompts class Agent(BaseModel): - """Generic agent implementation.""" + """ + Represents an agent in a system. + + Each agent has a role, a goal, a backstory, and an optional language model (llm). + The agent can also have memory, can operate in verbose mode, and can delegate tasks to other agents. + + Attributes: + agent_executor: An instance of the AgentExecutor class. + role: The role of the agent. + goal: The objective of the agent. + backstory: The backstory of the agent. + llm: The language model that will run the agent. + memory: Whether the agent should have memory or not. + verbose: Whether the agent execution should be in verbose mode. + allow_delegation: Whether the agent is allowed to delegate tasks to other agents. + """ agent_executor: AgentExecutor = None role: str = Field(description="Role of the agent") goal: str = Field(description="Objective of the agent") @@ -110,4 +125,4 @@ class Agent(BaseModel): })['output'] def __tools_names(self, tools) -> str: - return ", ".join([t.name for t in tools]) \ No newline at end of file + return ", ".join([t.name for t in tools])