Share Member Interactions

Set share_member_interactions to True so team members see and build on each other's responses.

Share member interactions within a team. When share_member_interactions is set to True, team members can see and build upon each other's responses, creating a collaborative workflow.

Create a Python file

share_member_interactions.py
from agno.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.models.openai import OpenAIResponses
from agno.team import Team
from agno.tools.hackernews import HackerNewsTools

db = SqliteDb(db_file="tmp/agents.db")

research_agent = Agent(
    name="Research Agent",
    model=OpenAIResponses(id="gpt-5.2"),
    tools=[HackerNewsTools()],
    instructions="You are a research agent that finds information on HackerNews.",
)

report_agent = Agent(
    name="Report Agent",
    model=OpenAIResponses(id="gpt-5.2"),
    instructions="You are a report agent that writes reports from research.",
)

team = Team(
    model=OpenAIResponses(id="gpt-5.2"),
    db=db,
    members=[research_agent, report_agent],
    share_member_interactions=True,
    instructions=[
        "You are a team of agents that can research topics and write reports.",
        "First, research the topic using HackerNews.",
        "Then, use your report agent to write a report from the research.",
    ],
    show_members_responses=True,
)

team.print_response("What are the latest AI trends?", stream=True)

Set up your virtual environment

uv venv --python 3.12
source .venv/bin/activate

Install dependencies

uv pip install -U agno openai sqlalchemy

Export your OpenAI API key

Set OpenAI Key

Set your OPENAI_API_KEY as an environment variable. You can get one from OpenAI.

export OPENAI_API_KEY=sk-***

Run Team

python share_member_interactions.py