Skip to main content
This example demonstrates how to enable sharing of 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.
1

Create a Python file

Create a file share_member_interactions.py
2

Add code to file

share_member_interactions.py
from agno.agent.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.models.openai import OpenAIChat
from agno.team.team import Team
from agno.tools.duckduckgo import DuckDuckGoTools

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

web_research_agent = Agent(
    name="Web Research Agent",
    model=OpenAIChat(id="gpt-5-mini"),
    tools=[DuckDuckGoTools()],
    instructions="You are a web research agent that can answer questions from the web.",
)

report_agent = Agent(
    name="Report Agent",
    model=OpenAIChat(id="gpt-5-mini"),
    instructions="You are a report agent that can write a report from the web research.",
)

team = Team(
    model=OpenAIChat(id="gpt-5-mini"),
    db=db,
    members=[web_research_agent, report_agent],
    share_member_interactions=True,
    instructions=[
        "You are a team of agents that can research the web and write a report.",
        "First, research the web for information about the topic.",
        "Then, use your report agent to write a report from the web research.",
    ],
    show_members_responses=True,
    debug_mode=True,
)

team.print_response("How are LEDs made?")
3

Create a virtual environment

Open the Terminal and create a python virtual environment.
python3 -m venv .venv
source .venv/bin/activate
4

Install libraries

pip install agno openai ddgs
5
Set OpenAI Key
6
Set your OPENAI_API_KEY as an environment variable. You can get one from OpenAI.
7
Mac
export OPENAI_API_KEY=sk-***
Windows
setx OPENAI_API_KEY sk-***
8

Run the team

python share_member_interactions.py