Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.
docs: roll back modify crew.py example
Tony Kipkemboiefc8323c6303
diff --git a/docs/quickstart.mdx b/docs/quickstart.mdxindex ddaf33865..3062cdd0d 100644--- a/docs/quickstart.mdx+++ b/docs/quickstart.mdx@@ -75,6 +75,56 @@ Follow the steps below to get crewing! 🚣♂️```</Step><Step title="Modify your `crew.py` file">+ ```python crew.py+ # src/latest_ai_development/crew.py+ from crewai import Agent, Crew, Process, Task+ from crewai.project import CrewBase, agent, crew, task+ from crewai_tools import SerperDevTool++ @CrewBase+ class LatestAiDevelopmentCrew():+ """LatestAiDevelopment crew"""++ @agent+ def researcher(self) -> Agent:+ return Agent(+ config=self.agents_config['researcher'],+ verbose=True,+ tools=[SerperDevTool()]+ )++ @agent+ def reporting_analyst(self) -> Agent:+ return Agent(+ config=self.agents_config['reporting_analyst'],+ verbose=True+ )++ @task+ def research_task(self) -> Task:+ return Task(+ config=self.tasks_config['research_task'],+ )++ @task+ def reporting_task(self) -> Task:+ return Task(+ config=self.tasks_config['reporting_task'],+ output_file='output/report.md' # This is the file that will be contain the final report.+ )++ @crew+ def crew(self) -> Crew:+ """Creates the LatestAiDevelopment crew"""+ return Crew(+ agents=self.agents, # Automatically created by the @agent decorator+ tasks=self.tasks, # Automatically created by the @task decorator+ process=Process.sequential,+ verbose=True,+ )+ ```+ </Step>+ <Step title="[Optional] Add before and after crew functions">```python crew.py# src/latest_ai_development/crew.pyfrom crewai import Agent, Crew, Process, Task@@ -95,16 +145,6 @@ Follow the steps below to get crewing! 🚣♂️print(f"After kickoff function with result: {result}")return result # You can return the result or modify it as needed- @callback- def log_progress(self, task: Task, output: str):- """Log task completion progress."""- print(f"\n{'='*50}")- print(f"Task Completed: {task.description}")- print(f"Agent: {task.agent.role}")- print(f"Output Length: {len(output)} characters")- print(f"Completed at: {datetime.now().isoformat()}")- print(f"{'='*50}\n")-# ... remaining code```</Step>