From 15d4871b525b4ead7220e532eb19dc4f0a8de908 Mon Sep 17 00:00:00 2001 From: Joao Moura Date: Sun, 5 Nov 2023 14:26:59 -0300 Subject: [PATCH] initial crew class --- crewai/crew.py | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/crewai/crew.py b/crewai/crew.py index b03396e8a..c5d403414 100644 --- a/crewai/crew.py +++ b/crewai/crew.py @@ -1,7 +1,24 @@ -"""Crew of agents.""" - +from typing import List from pydantic import BaseModel, Field +from .process import Process +from .agent import Agent +from .task import Task + class Crew(BaseModel): - description: str = Field(description="Description and of the crew being created.") - goal: str = Field(description="Objective of the crew being created.") + """ + Class that represents a group of agents, how they should work together and + their tasks. + """ + goal: str = Field(description="Objective of the crew being created.") + process: Process = Field(description="Process that the crew will follow.") + tasks: List[Task] = Field(description="List of tasks") + agents: List[Agent] = Field(description="List of agents in this crew.") + + def kickoff(self) -> str: + """ + Kickoff the crew to work on it's tasks. + Returns: + output (List[str]): Output of the crew for each task. + """ + return "Crew is executing task"