From b9d3f65fb6fc315d7450885c10629b1bd34173c7 Mon Sep 17 00:00:00 2001 From: Harsh Sinha Date: Thu, 29 Jan 2026 04:26:23 +0530 Subject: [PATCH] docs: Fix cookbook workflows and teams --- cookbook/teams/ai_support_team.mdx | 33 ++++++++++------------ cookbook/workflows/blog-post-generator.mdx | 1 + cookbook/workflows/employee-recruiter.mdx | 14 ++++----- cookbook/workflows/overview.mdx | 6 ++-- 4 files changed, 25 insertions(+), 29 deletions(-) diff --git a/cookbook/teams/ai_support_team.mdx b/cookbook/teams/ai_support_team.mdx index cdd87dc8a..7499a4d2f 100644 --- a/cookbook/teams/ai_support_team.mdx +++ b/cookbook/teams/ai_support_team.mdx @@ -31,16 +31,16 @@ Each agent has specific tools and instructions for their domain of responsibilit ## Code -```python ai_support_team.py +```python ai_customer_support_team.py from agno.agent import Agent from agno.knowledge.knowledge import Knowledge from agno.knowledge.reader.website_reader import WebsiteReader -from agno.models.openai import OpenAIResponses -from agno.team import Team -from agno.tools.duckduckgo import DuckDuckGoTools +from agno.models.openai import OpenAIChat +from agno.team.team import Team from agno.tools.exa import ExaTools from agno.tools.slack import SlackTools -from agno.vectordb.pgvector import PgVector +from agno.tools.websearch import WebSearchTools +from agno.vectordb.pgvector.pgvector import PgVector knowledge = Knowledge( vector_db=PgVector( @@ -62,8 +62,8 @@ feedback_channel = "testing" doc_researcher_agent = Agent( name="Doc researcher Agent", role="Search the knowledge base for information", - model=OpenAIResponses(id="gpt-5.2"), - tools=[DuckDuckGoTools(), ExaTools()], + model=OpenAIChat(id="gpt-4o"), + tools=[WebSearchTools(), ExaTools()], knowledge=knowledge, search_knowledge=True, instructions=[ @@ -74,7 +74,7 @@ doc_researcher_agent = Agent( "If you're unsure about an answer, acknowledge it and suggest where the user might find more information.", "Format your responses clearly with headings, bullet points, and code examples when appropriate.", "Always verify that your answer directly addresses the user's specific question.", - "If you cannot find the answer in the documentation knowledge base, use the DuckDuckGoTools or ExaTools to search the web for relevant information to answer the user's question.", + "If you cannot find the answer in the documentation knowledge base, use the WebSearchTools or ExaTools to search the web for relevant information to answer the user's question.", ], ) @@ -82,7 +82,7 @@ doc_researcher_agent = Agent( escalation_manager_agent = Agent( name="Escalation Manager Agent", role="Escalate the issue to the slack channel", - model=OpenAIResponses(id="gpt-5.2"), + model=OpenAIChat(id="gpt-4o"), tools=[SlackTools()], instructions=[ "You are an escalation manager responsible for routing critical issues to the support team.", @@ -98,7 +98,7 @@ escalation_manager_agent = Agent( feedback_collector_agent = Agent( name="Feedback Collector Agent", role="Collect feedback from the user", - model=OpenAIResponses(id="gpt-5.2"), + model=OpenAIChat(id="gpt-4o"), tools=[SlackTools()], description="You are an AI agent that can collect feedback from the user.", instructions=[ @@ -115,7 +115,7 @@ feedback_collector_agent = Agent( customer_support_team = Team( name="Customer Support Team", - model=OpenAIResponses(id="gpt-5.2"), + model=OpenAIChat(id="gpt-4o"), members=[doc_researcher_agent, escalation_manager_agent, feedback_collector_agent], markdown=True, debug_mode=True, @@ -185,15 +185,12 @@ You'll see the team's classification decision and responses from the specific ag - - ```bash Mac - python ai_support_team.py - ``` + ```bash + git clone https://github.com/agno-agi/agno.git + cd agno/cookbook/01_showcase/02_teams - ```bash Windows - python ai_support_team.py + python ai_customer_support_team.py ``` - diff --git a/cookbook/workflows/blog-post-generator.mdx b/cookbook/workflows/blog-post-generator.mdx index cfe6c036c..a2aa84acf 100644 --- a/cookbook/workflows/blog-post-generator.mdx +++ b/cookbook/workflows/blog-post-generator.mdx @@ -505,6 +505,7 @@ if __name__ == "__main__": # Generate the blog post resp = await blog_generator_workflow.arun( topic=topic, + session_state={}, use_search_cache=True, use_scrape_cache=True, use_blog_cache=True, diff --git a/cookbook/workflows/employee-recruiter.mdx b/cookbook/workflows/employee-recruiter.mdx index 9239e6f0a..9e6f3ce93 100644 --- a/cookbook/workflows/employee-recruiter.mdx +++ b/cookbook/workflows/employee-recruiter.mdx @@ -30,7 +30,7 @@ The workflow uses simulated Zoom scheduling and email tools for demonstration (r ## Code -```python employee_recruiter.py +```python employee_recruiter_async_stream.py import asyncio import io @@ -322,6 +322,7 @@ if __name__ == "__main__": asyncio.run( recruitment_workflow.aprint_response( input="Process candidates for backend engineer position", + session_state={}, candidate_resume_urls=[ "https://agno-public.s3.us-east-1.amazonaws.com/demo_data/filters/cv_1.pdf", "https://agno-public.s3.us-east-1.amazonaws.com/demo_data/filters/cv_2.pdf", @@ -367,15 +368,12 @@ The workflow caches resume content in session state to avoid re-processing. Note - - ```bash Mac - python employee_recruiter.py - ``` + ```bash + git clone https://github.com/agno-agi/agno.git + cd agno/cookbook/01_showcase/03_workflows - ```bash Windows - python employee_recruiter.py + python employee_recruiter_async_stream.py ``` - diff --git a/cookbook/workflows/overview.mdx b/cookbook/workflows/overview.mdx index 94b142848..ff2bed481 100644 --- a/cookbook/workflows/overview.mdx +++ b/cookbook/workflows/overview.mdx @@ -17,12 +17,12 @@ writer = Agent(name="Writer", model=OpenAIResponses(id="gpt-5.2")) workflow = Workflow( name="Content Pipeline", steps=[ - Step(agent=researcher, task="Research the topic"), - Step(agent=writer, task="Write based on research"), + Step(name="Research", agent=researcher), + Step(name="Write", agent=writer), ], ) -workflow.run("AI trends in 2025") +workflow.print_response("AI trends in 2025") ``` ## Examples