From 4e3acdf7009f1c4974c96b26d770d99a372ccb93 Mon Sep 17 00:00:00 2001 From: Farah Abdou Date: Sat, 23 May 2026 20:10:26 +0300 Subject: [PATCH 1/9] Add materials for CrewAI tutorial --- .../01_single_agent.py | 25 ++++++++ .../02_research_and_writer_crew.py | 53 +++++++++++++++++ .../03_explicit_context.py | 56 ++++++++++++++++++ .../04_agent_with_tools.py | 58 +++++++++++++++++++ .../README.md | 58 +++++++++++++++++++ .../requirements.txt | 1 + 6 files changed, 251 insertions(+) create mode 100644 coordinating-teams-of-ai-agents-with-crewai-in-python/01_single_agent.py create mode 100644 coordinating-teams-of-ai-agents-with-crewai-in-python/02_research_and_writer_crew.py create mode 100644 coordinating-teams-of-ai-agents-with-crewai-in-python/03_explicit_context.py create mode 100644 coordinating-teams-of-ai-agents-with-crewai-in-python/04_agent_with_tools.py create mode 100644 coordinating-teams-of-ai-agents-with-crewai-in-python/README.md create mode 100644 coordinating-teams-of-ai-agents-with-crewai-in-python/requirements.txt diff --git a/coordinating-teams-of-ai-agents-with-crewai-in-python/01_single_agent.py b/coordinating-teams-of-ai-agents-with-crewai-in-python/01_single_agent.py new file mode 100644 index 0000000000..9b39e71a72 --- /dev/null +++ b/coordinating-teams-of-ai-agents-with-crewai-in-python/01_single_agent.py @@ -0,0 +1,25 @@ +from crewai import Agent, Task, Crew, LLM + +llm = LLM(model="gemini/gemini-2.5-flash") + +travel_agent = Agent( + role="Travel Advisor", + goal="Provide helpful travel recommendations", + backstory=( + "You're an experienced travel advisor who has visited" + " over fifty countries and specializes in budget-friendly" + " adventure travel." + ), + llm=llm, + verbose=True, +) + +task = Task( + description="Suggest three budget-friendly destinations in Southeast Asia", + expected_output="A short list of three destinations with brief descriptions", + agent=travel_agent, +) + +crew = Crew(agents=[travel_agent], tasks=[task]) +result = crew.kickoff() +print(result.raw) \ No newline at end of file diff --git a/coordinating-teams-of-ai-agents-with-crewai-in-python/02_research_and_writer_crew.py b/coordinating-teams-of-ai-agents-with-crewai-in-python/02_research_and_writer_crew.py new file mode 100644 index 0000000000..77365c654e --- /dev/null +++ b/coordinating-teams-of-ai-agents-with-crewai-in-python/02_research_and_writer_crew.py @@ -0,0 +1,53 @@ +from crewai import Agent, Task, Crew, Process, LLM + +llm = LLM(model="gemini/gemini-2.5-flash") + +researcher = Agent( + role="Senior Research Analyst", + goal="Find comprehensive information about a given topic", + backstory=( + "You're a seasoned research analyst with a knack for" + " uncovering the most relevant and accurate information." + " You're known for your thorough and well-organized research." + ), + llm=llm, +) + +writer = Agent( + role="Content Writer", + goal="Write clear, engaging content based on research findings", + backstory=( + "You're an experienced writer who excels at transforming" + " complex research into accessible, well-structured articles" + " that readers enjoy." + ), + llm=llm, +) + +research_task = Task( + description="Research the latest trends in renewable energy technology", + expected_output=( + "A detailed list of the top five renewable energy trends" + " with explanations" + ), + agent=researcher, +) + +writing_task = Task( + description="Write a short article based on the research findings", + expected_output=( + "A well-structured article of about three hundred words" + " on renewable energy trends" + ), + agent=writer, +) + +crew = Crew( + agents=[researcher, writer], + tasks=[research_task, writing_task], + process=Process.sequential, + verbose=True, +) + +result = crew.kickoff() +print(result.raw) \ No newline at end of file diff --git a/coordinating-teams-of-ai-agents-with-crewai-in-python/03_explicit_context.py b/coordinating-teams-of-ai-agents-with-crewai-in-python/03_explicit_context.py new file mode 100644 index 0000000000..af6dcb47a0 --- /dev/null +++ b/coordinating-teams-of-ai-agents-with-crewai-in-python/03_explicit_context.py @@ -0,0 +1,56 @@ +from crewai import Agent, Task, Crew, LLM + +llm = LLM(model="gemini/gemini-2.5-flash") + +researcher = Agent( + role="Senior Research Analyst", + goal="Find comprehensive information about a given topic", + backstory=( + "You're a seasoned research analyst with a knack for" + " uncovering the most relevant and accurate information." + " You're known for your thorough and well-organized research." + ), + llm=llm, +) + +writer = Agent( + role="Content Writer", + goal="Write clear, engaging content based on research findings", + backstory=( + "You're an experienced writer who excels at transforming" + " complex research into accessible, well-structured articles" + " that readers enjoy." + ), + llm=llm, +) + +research_task = Task( + description=( + "Research the current state of electric vehicle adoption" + " worldwide" + ), + expected_output=( + "A bullet-point list of key statistics and trends" + " in EV adoption" + ), + agent=researcher, +) + +writing_task = Task( + description=( + "Using the provided research, write a concise summary article" + " about electric vehicle adoption" + ), + expected_output="A two hundred word article summarizing EV adoption trends", + agent=writer, + context=[research_task], +) + +crew = Crew( + agents=[researcher, writer], + tasks=[research_task, writing_task], + verbose=True, +) + +result = crew.kickoff() +print(result.raw) \ No newline at end of file diff --git a/coordinating-teams-of-ai-agents-with-crewai-in-python/04_agent_with_tools.py b/coordinating-teams-of-ai-agents-with-crewai-in-python/04_agent_with_tools.py new file mode 100644 index 0000000000..f5030e4099 --- /dev/null +++ b/coordinating-teams-of-ai-agents-with-crewai-in-python/04_agent_with_tools.py @@ -0,0 +1,58 @@ +from crewai import Agent, Task, Crew, LLM +from crewai_tools import ScrapeWebsiteTool + +llm = LLM(model="gemini/gemini-2.5-flash") + +scrape_tool = ScrapeWebsiteTool() + +researcher = Agent( + role="Python Release Analyst", + goal="Find the latest Python release information", + backstory=( + "You're a developer advocate who tracks Python releases" + " and summarizes what's new for the community." + ), + tools=[scrape_tool], + llm=llm, +) + +writer = Agent( + role="Tech Blogger", + goal="Write concise release summaries for a developer audience", + backstory=( + "You write clear, engaging blog posts that help developers" + " stay up to date with the Python ecosystem." + ), + llm=llm, +) + +research_task = Task( + description=( + "Scrape https://www.python.org/downloads/ and report" + " the latest stable Python version number and its release date" + ), + expected_output="The latest Python version number and release date", + agent=researcher, +) + +writing_task = Task( + description=( + "Write a one-paragraph announcement based on the Python" + " release information provided by the research task" + ), + expected_output=( + "A concise one hundred word announcement covering the" + " latest Python version number and release date" + ), + agent=writer, + context=[research_task], +) + +crew = Crew( + agents=[researcher, writer], + tasks=[research_task, writing_task], + verbose=True, +) + +result = crew.kickoff() +print(result.raw) \ No newline at end of file diff --git a/coordinating-teams-of-ai-agents-with-crewai-in-python/README.md b/coordinating-teams-of-ai-agents-with-crewai-in-python/README.md new file mode 100644 index 0000000000..5e72c9805a --- /dev/null +++ b/coordinating-teams-of-ai-agents-with-crewai-in-python/README.md @@ -0,0 +1,58 @@ +# Coordinating Teams of AI Agents with CrewAI in Python + +Sample code for the Real Python tutorial +[Coordinating Teams of AI Agents with CrewAI in Python](https://realpython.com/coordinating-teams-of-ai-agents-with-crewai-in-python/). + +## Requirements + +- Python 3.10 to 3.13 (CrewAI does not support 3.14+) +- A free [Google AI Studio](https://aistudio.google.com/) API key for Gemini + +## Setup + +Create and activate a virtual environment, then install the dependencies: + +```console +$ python -m venv venv +$ source venv/bin/activate # On Windows: .\venv\Scripts\activate +$ python -m pip install -r requirements.txt +``` + +Set your Gemini API key as an environment variable: + +```console +$ export GEMINI_API_KEY="your-gemini-api-key-here" +``` + +On Windows PowerShell: + +```pscon +PS> $ENV:GEMINI_API_KEY = "your-gemini-api-key-here" +``` + +## Running the Examples + +Each script corresponds to one section of the tutorial: + +| File | Tutorial Section | +|------|------------------| +| `01_single_agent.py` | Start Using CrewAI to Create Agent Teams | +| `02_research_and_writer_crew.py` | Build Your First Multi-Agent Team | +| `03_explicit_context.py` | Control Task Dependencies Explicitly | +| `04_agent_with_tools.py` | Expand Agent Capabilities With Tools | + +Run any script with: + +```console +$ python 01_single_agent.py +``` + +## Notes + +- The `verbose=True` flag prints detailed agent reasoning logs — useful for + learning, but noisy for production. +- If CrewAI complains about a missing `OPENAI_API_KEY` (e.g., when memory + or certain tools are enabled), set it to any non-empty string to suppress + the error. +- On first run, CrewAI may show a "Would you like to view your execution + traces?" prompt that auto-dismisses after twenty seconds. \ No newline at end of file diff --git a/coordinating-teams-of-ai-agents-with-crewai-in-python/requirements.txt b/coordinating-teams-of-ai-agents-with-crewai-in-python/requirements.txt new file mode 100644 index 0000000000..d75623b71e --- /dev/null +++ b/coordinating-teams-of-ai-agents-with-crewai-in-python/requirements.txt @@ -0,0 +1 @@ +crewai[tools,google-genai] \ No newline at end of file From 4ca8374bc08f62f8c352452191bdafb9641fd4f8 Mon Sep 17 00:00:00 2001 From: Farah Abdou Date: Sat, 23 May 2026 20:53:14 +0300 Subject: [PATCH 2/9] Apply Black formatting --- .../01_single_agent.py | 2 +- .../02_research_and_writer_crew.py | 5 ++--- .../03_explicit_context.py | 8 +++----- .../04_agent_with_tools.py | 2 +- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/coordinating-teams-of-ai-agents-with-crewai-in-python/01_single_agent.py b/coordinating-teams-of-ai-agents-with-crewai-in-python/01_single_agent.py index 9b39e71a72..98acee857a 100644 --- a/coordinating-teams-of-ai-agents-with-crewai-in-python/01_single_agent.py +++ b/coordinating-teams-of-ai-agents-with-crewai-in-python/01_single_agent.py @@ -22,4 +22,4 @@ crew = Crew(agents=[travel_agent], tasks=[task]) result = crew.kickoff() -print(result.raw) \ No newline at end of file +print(result.raw) diff --git a/coordinating-teams-of-ai-agents-with-crewai-in-python/02_research_and_writer_crew.py b/coordinating-teams-of-ai-agents-with-crewai-in-python/02_research_and_writer_crew.py index 77365c654e..8ad7e27640 100644 --- a/coordinating-teams-of-ai-agents-with-crewai-in-python/02_research_and_writer_crew.py +++ b/coordinating-teams-of-ai-agents-with-crewai-in-python/02_research_and_writer_crew.py @@ -27,8 +27,7 @@ research_task = Task( description="Research the latest trends in renewable energy technology", expected_output=( - "A detailed list of the top five renewable energy trends" - " with explanations" + "A detailed list of the top five renewable energy trends" " with explanations" ), agent=researcher, ) @@ -50,4 +49,4 @@ ) result = crew.kickoff() -print(result.raw) \ No newline at end of file +print(result.raw) diff --git a/coordinating-teams-of-ai-agents-with-crewai-in-python/03_explicit_context.py b/coordinating-teams-of-ai-agents-with-crewai-in-python/03_explicit_context.py index af6dcb47a0..d7ac973879 100644 --- a/coordinating-teams-of-ai-agents-with-crewai-in-python/03_explicit_context.py +++ b/coordinating-teams-of-ai-agents-with-crewai-in-python/03_explicit_context.py @@ -26,12 +26,10 @@ research_task = Task( description=( - "Research the current state of electric vehicle adoption" - " worldwide" + "Research the current state of electric vehicle adoption" " worldwide" ), expected_output=( - "A bullet-point list of key statistics and trends" - " in EV adoption" + "A bullet-point list of key statistics and trends" " in EV adoption" ), agent=researcher, ) @@ -53,4 +51,4 @@ ) result = crew.kickoff() -print(result.raw) \ No newline at end of file +print(result.raw) diff --git a/coordinating-teams-of-ai-agents-with-crewai-in-python/04_agent_with_tools.py b/coordinating-teams-of-ai-agents-with-crewai-in-python/04_agent_with_tools.py index f5030e4099..cc33d20131 100644 --- a/coordinating-teams-of-ai-agents-with-crewai-in-python/04_agent_with_tools.py +++ b/coordinating-teams-of-ai-agents-with-crewai-in-python/04_agent_with_tools.py @@ -55,4 +55,4 @@ ) result = crew.kickoff() -print(result.raw) \ No newline at end of file +print(result.raw) From c4856cb8567e76d12fc30b0efe7fc3da8670e9f5 Mon Sep 17 00:00:00 2001 From: Farah Abdou Date: Sat, 23 May 2026 20:59:07 +0300 Subject: [PATCH 3/9] Apply Ruff formatting --- .../02_research_and_writer_crew.py | 3 ++- .../03_explicit_context.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/coordinating-teams-of-ai-agents-with-crewai-in-python/02_research_and_writer_crew.py b/coordinating-teams-of-ai-agents-with-crewai-in-python/02_research_and_writer_crew.py index 8ad7e27640..04e1aaffef 100644 --- a/coordinating-teams-of-ai-agents-with-crewai-in-python/02_research_and_writer_crew.py +++ b/coordinating-teams-of-ai-agents-with-crewai-in-python/02_research_and_writer_crew.py @@ -27,7 +27,8 @@ research_task = Task( description="Research the latest trends in renewable energy technology", expected_output=( - "A detailed list of the top five renewable energy trends" " with explanations" + "A detailed list of the top five renewable energy trends" + " with explanations" ), agent=researcher, ) diff --git a/coordinating-teams-of-ai-agents-with-crewai-in-python/03_explicit_context.py b/coordinating-teams-of-ai-agents-with-crewai-in-python/03_explicit_context.py index d7ac973879..28fe576400 100644 --- a/coordinating-teams-of-ai-agents-with-crewai-in-python/03_explicit_context.py +++ b/coordinating-teams-of-ai-agents-with-crewai-in-python/03_explicit_context.py @@ -26,10 +26,10 @@ research_task = Task( description=( - "Research the current state of electric vehicle adoption" " worldwide" + "Research the current state of electric vehicle adoption worldwide" ), expected_output=( - "A bullet-point list of key statistics and trends" " in EV adoption" + "A bullet-point list of key statistics and trends in EV adoption" ), agent=researcher, ) From 60d1b9fbefe6b2eae08cb4ed045a4c81627f93b4 Mon Sep 17 00:00:00 2001 From: Farah <91642487+FarahAbdo@users.noreply.github.com> Date: Tue, 9 Jun 2026 14:38:30 +0300 Subject: [PATCH 4/9] Update coordinating-teams-of-ai-agents-with-crewai-in-python/README.md Co-authored-by: Martin Breuss --- coordinating-teams-of-ai-agents-with-crewai-in-python/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coordinating-teams-of-ai-agents-with-crewai-in-python/README.md b/coordinating-teams-of-ai-agents-with-crewai-in-python/README.md index 5e72c9805a..af3cf1df96 100644 --- a/coordinating-teams-of-ai-agents-with-crewai-in-python/README.md +++ b/coordinating-teams-of-ai-agents-with-crewai-in-python/README.md @@ -1,7 +1,7 @@ # Coordinating Teams of AI Agents with CrewAI in Python Sample code for the Real Python tutorial -[Coordinating Teams of AI Agents with CrewAI in Python](https://realpython.com/coordinating-teams-of-ai-agents-with-crewai-in-python/). +[CrewAI in Python: Coordinating Teams of AI Agents](https://realpython.com/crewai-python/). ## Requirements From 7a87285fcb449d1a33c43b6a398786d710c73d06 Mon Sep 17 00:00:00 2001 From: Farah <91642487+FarahAbdo@users.noreply.github.com> Date: Tue, 9 Jun 2026 14:40:10 +0300 Subject: [PATCH 5/9] Update coordinating-teams-of-ai-agents-with-crewai-in-python/requirements.txt Co-authored-by: Martin Breuss --- .../requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coordinating-teams-of-ai-agents-with-crewai-in-python/requirements.txt b/coordinating-teams-of-ai-agents-with-crewai-in-python/requirements.txt index d75623b71e..aaa90d042a 100644 --- a/coordinating-teams-of-ai-agents-with-crewai-in-python/requirements.txt +++ b/coordinating-teams-of-ai-agents-with-crewai-in-python/requirements.txt @@ -1 +1 @@ -crewai[tools,google-genai] \ No newline at end of file +crewai[tools,google-genai]==1.14.6 From caa2bd64bb249f0cad1bd52815a94f370da67472 Mon Sep 17 00:00:00 2001 From: brendaweles <160772586+brendaweles@users.noreply.github.com> Date: Mon, 29 Jun 2026 17:54:25 -0600 Subject: [PATCH 6/9] Update README.md --- .../README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coordinating-teams-of-ai-agents-with-crewai-in-python/README.md b/coordinating-teams-of-ai-agents-with-crewai-in-python/README.md index af3cf1df96..442f102fb9 100644 --- a/coordinating-teams-of-ai-agents-with-crewai-in-python/README.md +++ b/coordinating-teams-of-ai-agents-with-crewai-in-python/README.md @@ -36,7 +36,7 @@ Each script corresponds to one section of the tutorial: | File | Tutorial Section | |------|------------------| -| `01_single_agent.py` | Start Using CrewAI to Create Agent Teams | +| `01_single_agent.py` | Get Started With CrewAI in Python | | `02_research_and_writer_crew.py` | Build Your First Multi-Agent Team | | `03_explicit_context.py` | Control Task Dependencies Explicitly | | `04_agent_with_tools.py` | Expand Agent Capabilities With Tools | @@ -55,4 +55,4 @@ $ python 01_single_agent.py or certain tools are enabled), set it to any non-empty string to suppress the error. - On first run, CrewAI may show a "Would you like to view your execution - traces?" prompt that auto-dismisses after twenty seconds. \ No newline at end of file + traces?" prompt that auto-dismisses after twenty seconds. From 7e899452f2ac5bb3ff363fcacac7732245e3d22b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Zaczy=C5=84ski?= Date: Thu, 2 Jul 2026 19:48:39 +0200 Subject: [PATCH 7/9] Rename the folder to reflect the keyphrase --- .../01_single_agent.py | 0 .../02_research_and_writer_crew.py | 0 .../03_explicit_context.py | 0 .../04_agent_with_tools.py | 0 .../README.md | 0 .../requirements.txt | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename {coordinating-teams-of-ai-agents-with-crewai-in-python => crewai-python}/01_single_agent.py (100%) rename {coordinating-teams-of-ai-agents-with-crewai-in-python => crewai-python}/02_research_and_writer_crew.py (100%) rename {coordinating-teams-of-ai-agents-with-crewai-in-python => crewai-python}/03_explicit_context.py (100%) rename {coordinating-teams-of-ai-agents-with-crewai-in-python => crewai-python}/04_agent_with_tools.py (100%) rename {coordinating-teams-of-ai-agents-with-crewai-in-python => crewai-python}/README.md (100%) rename {coordinating-teams-of-ai-agents-with-crewai-in-python => crewai-python}/requirements.txt (100%) diff --git a/coordinating-teams-of-ai-agents-with-crewai-in-python/01_single_agent.py b/crewai-python/01_single_agent.py similarity index 100% rename from coordinating-teams-of-ai-agents-with-crewai-in-python/01_single_agent.py rename to crewai-python/01_single_agent.py diff --git a/coordinating-teams-of-ai-agents-with-crewai-in-python/02_research_and_writer_crew.py b/crewai-python/02_research_and_writer_crew.py similarity index 100% rename from coordinating-teams-of-ai-agents-with-crewai-in-python/02_research_and_writer_crew.py rename to crewai-python/02_research_and_writer_crew.py diff --git a/coordinating-teams-of-ai-agents-with-crewai-in-python/03_explicit_context.py b/crewai-python/03_explicit_context.py similarity index 100% rename from coordinating-teams-of-ai-agents-with-crewai-in-python/03_explicit_context.py rename to crewai-python/03_explicit_context.py diff --git a/coordinating-teams-of-ai-agents-with-crewai-in-python/04_agent_with_tools.py b/crewai-python/04_agent_with_tools.py similarity index 100% rename from coordinating-teams-of-ai-agents-with-crewai-in-python/04_agent_with_tools.py rename to crewai-python/04_agent_with_tools.py diff --git a/coordinating-teams-of-ai-agents-with-crewai-in-python/README.md b/crewai-python/README.md similarity index 100% rename from coordinating-teams-of-ai-agents-with-crewai-in-python/README.md rename to crewai-python/README.md diff --git a/coordinating-teams-of-ai-agents-with-crewai-in-python/requirements.txt b/crewai-python/requirements.txt similarity index 100% rename from coordinating-teams-of-ai-agents-with-crewai-in-python/requirements.txt rename to crewai-python/requirements.txt From 1fcf74a29d59c321fa01b205ae540fddebd71fc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Zaczy=C5=84ski?= Date: Thu, 2 Jul 2026 19:52:35 +0200 Subject: [PATCH 8/9] Pin requirements for a reproducible environment --- crewai-python/requirements.txt | 150 ++++++++++++++++++++++++++++++++- 1 file changed, 149 insertions(+), 1 deletion(-) diff --git a/crewai-python/requirements.txt b/crewai-python/requirements.txt index aaa90d042a..821a46020b 100644 --- a/crewai-python/requirements.txt +++ b/crewai-python/requirements.txt @@ -1 +1,149 @@ -crewai[tools,google-genai]==1.14.6 +aiofiles==24.1.0 +aiohappyeyeballs==2.7.1 +aiohttp==3.14.1 +aiosignal==1.4.0 +aiosqlite==0.21.0 +annotated-doc==0.0.4 +annotated-types==0.7.0 +anyio==4.14.1 +appdirs==1.4.4 +attrs==26.1.0 +backoff==2.2.1 +bcrypt==5.0.0 +beautifulsoup4==4.13.5 +build==1.5.0 +cel-python==0.5.0 +certifi==2026.6.17 +cffi==2.0.0 +charset-normalizer==3.4.7 +chromadb==1.1.1 +click==8.4.2 +crewai==1.15.1 +crewai-cli==1.15.1 +crewai-core==1.15.1 +crewai-tools==1.15.1 +cryptography==49.0.0 +defusedxml==0.7.1 +deprecation==2.1.0 +distro==1.9.0 +docstring-parser==0.18.0 +durationpy==0.10 +et-xmlfile==2.0.0 +filelock==3.29.4 +flatbuffers==25.12.19 +frozenlist==1.8.0 +fsspec==2026.6.0 +google-auth==2.55.1 +google-genai==1.65.0 +google-re2==1.1.20251105 +googleapis-common-protos==1.75.0 +grpcio==1.81.1 +h11==0.16.0 +hf-xet==1.5.1 +httpcore==1.0.9 +httptools==0.8.0 +httpx==0.28.1 +httpx-sse==0.4.3 +huggingface-hub==1.21.0 +idna==3.18 +importlib-resources==7.1.0 +instructor==1.15.4 +jinja2==3.1.6 +jiter==0.14.0 +jmespath==1.1.0 +json-repair==0.25.3 +json5==0.10.0 +jsonref==1.1.0 +jsonschema==4.26.0 +jsonschema-specifications==2025.9.1 +kubernetes==36.0.2 +lance-namespace==0.9.0 +lance-namespace-urllib3-client==0.9.0 +lancedb==0.30.0 +lark==1.3.1 +linkify-it-py==2.1.0 +lxml==6.1.1 +markdown-it-py==4.2.0 +markupsafe==3.0.3 +mcp==1.26.0 +mdit-py-plugins==0.6.1 +mdurl==0.1.2 +mmh3==5.2.1 +multidict==6.7.1 +numpy==2.5.0 +oauthlib==3.3.1 +onnxruntime==1.27.0 +openai==2.44.0 +openpyxl==3.1.5 +opentelemetry-api==1.42.1 +opentelemetry-exporter-otlp-proto-common==1.42.1 +opentelemetry-exporter-otlp-proto-grpc==1.42.1 +opentelemetry-exporter-otlp-proto-http==1.42.1 +opentelemetry-proto==1.42.1 +opentelemetry-sdk==1.42.1 +opentelemetry-semantic-conventions==0.63b1 +orjson==3.11.9 +overrides==7.7.0 +packaging==26.2 +pdfminer-six==20260107 +pdfplumber==0.11.10 +pendulum==3.2.0 +pillow==12.3.0 +platformdirs==4.10.0 +portalocker==2.7.0 +posthog==5.4.0 +propcache==0.5.2 +protobuf==6.33.6 +pyarrow==24.0.0 +pyasn1==0.6.3 +pyasn1-modules==0.4.2 +pybase64==1.4.3 +pycparser==3.0 +pydantic==2.12.5 +pydantic-core==2.41.5 +pydantic-settings==2.10.1 +pygments==2.20.0 +pyjwt==2.13.0 +pymupdf==1.26.7 +pypdfium2==5.11.0 +pypika==0.51.1 +pyproject-hooks==1.2.0 +python-dateutil==2.9.0.post0 +python-docx==1.2.0 +python-dotenv==1.2.2 +python-multipart==0.0.32 +pytube==15.0.0 +pyyaml==6.0.3 +referencing==0.37.0 +regex==2026.1.15 +requests==2.34.2 +requests-oauthlib==2.0.0 +rich==14.3.4 +rpds-py==2026.6.3 +shellingham==1.5.4 +six==1.17.0 +sniffio==1.3.1 +soupsieve==2.8.4 +sse-starlette==3.4.5 +starlette==1.3.1 +tenacity==9.1.4 +textual==8.2.8 +tiktoken==0.12.0 +tokenizers==0.23.1 +tomli==2.0.2 +tomli-w==1.1.0 +tqdm==4.68.3 +typer==0.25.1 +typing-extensions==4.16.0 +typing-inspection==0.4.2 +tzdata==2026.2 +uc-micro-py==2.0.0 +urllib3==2.7.0 +uv==0.11.26 +uvicorn==0.49.0 +uvloop==0.22.1 +watchfiles==1.2.0 +websocket-client==1.9.0 +websockets==16.0 +yarl==1.24.2 +youtube-transcript-api==1.2.4 From e8b84e5b0744664704652c6c77d2d4d6d7f5283d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Zaczy=C5=84ski?= Date: Thu, 2 Jul 2026 20:33:54 +0200 Subject: [PATCH 9/9] Bump the model to avoid hallucinations and sort import statements --- crewai-python/01_single_agent.py | 2 +- crewai-python/02_research_and_writer_crew.py | 2 +- crewai-python/03_explicit_context.py | 2 +- crewai-python/04_agent_with_tools.py | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crewai-python/01_single_agent.py b/crewai-python/01_single_agent.py index 98acee857a..0f747522c7 100644 --- a/crewai-python/01_single_agent.py +++ b/crewai-python/01_single_agent.py @@ -1,4 +1,4 @@ -from crewai import Agent, Task, Crew, LLM +from crewai import LLM, Agent, Crew, Task llm = LLM(model="gemini/gemini-2.5-flash") diff --git a/crewai-python/02_research_and_writer_crew.py b/crewai-python/02_research_and_writer_crew.py index 04e1aaffef..7c677f61a2 100644 --- a/crewai-python/02_research_and_writer_crew.py +++ b/crewai-python/02_research_and_writer_crew.py @@ -1,4 +1,4 @@ -from crewai import Agent, Task, Crew, Process, LLM +from crewai import LLM, Agent, Crew, Process, Task llm = LLM(model="gemini/gemini-2.5-flash") diff --git a/crewai-python/03_explicit_context.py b/crewai-python/03_explicit_context.py index 28fe576400..98a5ac024e 100644 --- a/crewai-python/03_explicit_context.py +++ b/crewai-python/03_explicit_context.py @@ -1,4 +1,4 @@ -from crewai import Agent, Task, Crew, LLM +from crewai import LLM, Agent, Crew, Task llm = LLM(model="gemini/gemini-2.5-flash") diff --git a/crewai-python/04_agent_with_tools.py b/crewai-python/04_agent_with_tools.py index cc33d20131..94a5721e28 100644 --- a/crewai-python/04_agent_with_tools.py +++ b/crewai-python/04_agent_with_tools.py @@ -1,7 +1,7 @@ -from crewai import Agent, Task, Crew, LLM +from crewai import LLM, Agent, Crew, Task from crewai_tools import ScrapeWebsiteTool -llm = LLM(model="gemini/gemini-2.5-flash") +llm = LLM(model="gemini/gemini-2.5-pro") scrape_tool = ScrapeWebsiteTool()