Teams can generate structured data using Pydantic models, just like individual agents. This feature is perfect for coordinated data extraction, analysis, and report generation where multiple agents work together to produce a structured result.

Example

Let’s create a Stock Research Team that produces a structured StockReport.
research_team.py
from typing import List
from pydantic import BaseModel, Field
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.team.team import Team
from agno.tools.duckduckgo import DuckDuckGoTools

class NewsAnalysis(BaseModel):
    topic: str
    headline: str
    analysis: str

class TopicAnalysis(BaseModel):
    topic_name: str
    analysis: str

class ResearchReport(BaseModel):
    topic: str = Field(..., description="Research topic")
    summary: str = Field(..., description="Brief summary of the topic")
    latest_news: str = Field(..., description="Latest news about the topic")
    analysis: str = Field(..., description="Comprehensive analysis combining multiple perspectives")
    recommendation: str = Field(..., description="Key insights and recommendations")

# Create specialized agents
news_searcher = Agent(
    name="News Searcher",
    model=OpenAIChat("gpt-4o"),
    response_model=NewsAnalysis,
    role="Searches for current news and trending information.",
    tools=[
        DuckDuckGoTools(
            search=True,
            news=True,
        )
    ],
)

topic_info_agent = Agent(
    name="Topic Info Searcher", 
    model=OpenAIChat("gpt-4o"),
    role="Researches topic background and provides detailed information.",
    response_model=TopicAnalysis,
    tools=[
        DuckDuckGoTools(
            search=True,
            news=False,
        )
    ],
)

# Create team with structured output
research_team = Team(
    name="Research Team",
    mode="coordinate",
    model=OpenAIChat("gpt-4o"),
    members=[news_searcher, topic_info_agent],
    response_model=ResearchReport,
    markdown=True,
    show_members_responses=True,
)

research_team.print_response("Give me a comprehensive research report on artificial intelligence developments")
The team will coordinate between its members and produce a structured ResearchReport object:
ResearchReport(
topic='artificial intelligence developments',
summary='AI technology advances across multiple domains',
latest_news='Major breakthroughs in large language models, computer vision, and robotics',
analysis='Artificial intelligence continues to evolve rapidly with significant advances in transformer architectures, multimodal models, and practical applications. Recent developments show increased focus on efficiency, safety, and real-world deployment. Major companies are investing heavily in AI infrastructure while addressing concerns about responsible development.',
recommendation='Key areas to watch: multimodal AI, AI safety research, and practical enterprise applications'
)

Using a Parser Model

You can use an additional model to parse and structure the output from your primary model. This approach is particularly effective when the primary model is optimized for reasoning tasks, as such models may not consistently produce detailed structured responses.
team = Team(
    name="Research Team",
    mode="coordinate",
    model=Claude(id="claude-sonnet-4-20250514"),
    members=[news_searcher, topic_info_agent],
    response_model=ResearchReport,
    parser_model=OpenAIChat(id="gpt-4o"),
)
You can also provide a custom parser_model_prompt to your Parser Model.

Streaming Structured Output

Teams support streaming with structured output, where the content event contains the complete structured result as a single event.
streaming_team.py
from typing import List
from pydantic import BaseModel, Field
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.team.team import Team
from agno.tools.duckduckgo import DuckDuckGoTools

class TechnologyAnalysis(BaseModel):
    sector: str = Field(..., description="Technology sector being analyzed")
    key_trends: List[str] = Field(..., description="Major trends affecting the sector")
    top_developments: List[str] = Field(..., description="Most significant developments in the sector")
    market_outlook: str = Field(..., description="Overall sector outlook and predictions")
    risk_factors: List[str] = Field(..., description="Key risks to consider")

# Create research agents
trend_analyst = Agent(
    name="Trend Analyst",
    model=OpenAIChat("gpt-4o"),
    role="Analyzes technology trends and sector developments.",
    tools=[DuckDuckGoTools(search=True, news=True)]
)

risk_assessor = Agent(
    name="Risk Assessor", 
    model=OpenAIChat("gpt-4o"),
    role="Identifies and evaluates technology risks and opportunities.",
    tools=[DuckDuckGoTools(search=True, news=True)]
)

# Create streaming team
technology_research_team = Team(
    name="Technology Research Team",
    mode="coordinate", 
    model=OpenAIChat("gpt-4o"),
    members=[trend_analyst, risk_assessor],
    response_model=TechnologyAnalysis,
    markdown=True,
    show_members_responses=True,
)

# Stream the team response
technology_research_team.print_response(
    "Analyze the artificial intelligence sector developments for 2024", 
    stream=True, 
    stream_intermediate_steps=True
)
When streaming with teams and structured output, you’ll see intermediate steps from individual team members, but the final structured result is delivered as a single complete chunk rather than being streamed progressively.

Developer Resources