Examples
- Examples
- Getting Started
- Agents
- Teams
- Workflows
- Applications
- Streamlit Apps
- Evals
- Accuracy
- Performance
- Reliability
Agent Concepts
- Reasoning
- Multimodal
- RAG
- User Control Flows
- Knowledge
- Memory
- Async
- Hybrid Search
- Storage
- Tools
- Vector Databases
- Context
- Embedders
- Agent State
- Observability
- Miscellaneous
Models
- Anthropic
- AWS Bedrock
- AWS Bedrock Claude
- Azure AI Foundry
- Azure OpenAI
- Cerebras
- Cerebras OpenAI
- Cohere
- DeepInfra
- DeepSeek
- Fireworks
- Gemini
- Groq
- Hugging Face
- IBM
- LM Studio
- LiteLLM
- LiteLLM OpenAI
- Meta
- Mistral
- NVIDIA
- Ollama
- OpenAI
- Perplexity
- Together
- XAI
- Vercel
Reliability
Reliability with Teams
Learn how to assert an Agno Team is making the expected tool calls.
Code
from typing import Optional
from agno.agent import Agent
from agno.eval.reliability import ReliabilityEval, ReliabilityResult
from agno.models.openai import OpenAIChat
from agno.run.team import TeamRunResponse
from agno.team.team import Team
from agno.tools.yfinance import YFinanceTools
team_member = Agent(
name="Stock Searcher",
model=OpenAIChat("gpt-4o"),
role="Searches the web for information on a stock.",
tools=[YFinanceTools(stock_price=True)],
)
team = Team(
name="Stock Research Team",
model=OpenAIChat("gpt-4o"),
members=[team_member],
markdown=True,
show_members_responses=True,
)
expected_tool_calls = [
"transfer_task_to_member", # Tool call used to transfer a task to a Team member
"get_current_stock_price", # Tool call used to get the current stock price of a stock
]
def evaluate_team_reliability():
response: TeamRunResponse = team.run("What is the current stock price of NVDA?")
evaluation = ReliabilityEval(
team_response=response,
expected_tool_calls=expected_tool_calls,
)
result: Optional[ReliabilityResult] = evaluation.run(print_results=True)
result.assert_passed()
if __name__ == "__main__":
evaluate_team_reliability()
Was this page helpful?
On this page
Assistant
Responses are generated using AI and may contain mistakes.