Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions examples/agno/agno_basic_agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,10 @@ def demonstrate_basic_agents():
)

# Create a team with coordination mode
# The "coordinate" mode allows agents to work together and share information
# The team allows agents to work together and share information
team = Team(
name="News and Weather Team",
mode="coordinate", # Agents will coordinate their responses
members=[news_agent, weather_agent],
name="News and Weather Team",
)

# Run a task that requires team coordination
Expand Down
9 changes: 2 additions & 7 deletions examples/agno/agno_research_team.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,26 +167,21 @@ def demonstrate_research_team():

# Create collaborative team with advanced features
agent_team = Team(
name="Discussion Team",
mode="collaborate",
model=OpenAIChat("gpt-4o"),
members=[
reddit_researcher,
hackernews_researcher,
academic_paper_researcher,
twitter_researcher,
],
name="Discussion Team",
model=OpenAIChat("gpt-4o"),
instructions=[
"You are a discussion master coordinating a research team.",
"Facilitate productive discussion between all researchers.",
"Ensure each researcher contributes their unique perspective.",
"Guide the team towards a comprehensive understanding of the topic.",
"You have to stop the discussion when you think the team has reached a consensus.",
],
success_criteria="The team has reached a consensus with insights from all perspectives.",
enable_agentic_context=True,
add_context=True,
show_tool_calls=True,
markdown=True,
debug_mode=True,
show_members_responses=True,
Expand Down
12 changes: 6 additions & 6 deletions examples/agno/agno_workflow_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

"""

from agno.agent import Agent, RunResponse
from agno.agent import Agent, RunOutput
import agentops
from dotenv import load_dotenv
from agno.workflow import Workflow
Expand Down Expand Up @@ -52,7 +52,7 @@ class CacheWorkflow(Workflow):
# This agent will be used to generate responses when cache misses occur
agent = Agent(model=OpenAIChat(id="gpt-4o-mini"), description="General purpose agent for generating responses")

def run(self, message: str) -> Iterator[RunResponse]:
def run(self, message: str) -> Iterator[RunOutput]:
"""
Execute the workflow with caching logic.

Expand All @@ -66,14 +66,14 @@ def run(self, message: str) -> Iterator[RunResponse]:
message: The input query to process

Yields:
RunResponse: Streamed response chunks
RunOutput: Streamed response chunks
"""
logger.info(f"Checking cache for '{message}'")

if self.session_state.get(message):
logger.info(f"Cache hit for '{message}'")
# Return cached response immediately (no API call needed)
yield RunResponse(run_id=self.run_id, content=self.session_state.get(message))
yield RunOutput(run_id=self.run_id, content=self.session_state.get(message))
return

logger.info(f"Cache miss for '{message}'")
Expand All @@ -99,11 +99,11 @@ def demonstrate_workflows():
try:
workflow = CacheWorkflow()

response: Iterator[RunResponse] = workflow.run(message="Tell me a joke.")
response: Iterator[RunOutput] = workflow.run(message="Tell me a joke.")

pprint_run_response(response, markdown=True, show_time=True)

response: Iterator[RunResponse] = workflow.run(message="Tell me a joke.")
response: Iterator[RunOutput] = workflow.run(message="Tell me a joke.")

pprint_run_response(response, markdown=True, show_time=True)

Expand Down
2 changes: 1 addition & 1 deletion examples/agno/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ googlesearch-python
pycountry
arxiv
pypdf
duckduckgo-search
ddgs
Loading