チームのセッション履歴と会話履歴の管理について学習します。
ストレージが有効にされたチームはセッションの実行履歴 (「会話履歴」や「チャット履歴」とも呼ばれます) へのアクセスを自動的に持ちます。
Agno 2.x : Learn : チーム – 会話履歴
作成 : クラスキャット・セールスインフォメーション
作成日時 : 11/09/2025
バージョン : Agno 2.2.10
* 本記事は docs.agno.com の以下のページを独自に翻訳した上で、補足説明を加えてまとめ直しています。スニペットはできる限り日本語を使用しています :
* サンプルコードの動作確認はしておりますが、必要な場合には適宜、追加改変しています。
* ご自由にリンクを張って頂いてかまいませんが、sales-info@classcat.com までご一報いただけると嬉しいです。
◆ お問合せ : 下記までお願いします。
- クラスキャット セールス・インフォメーション
- sales-info@classcat.com
- ClassCatJP

Agno 2.x : Learn : チーム – 会話履歴
チームのセッション履歴と会話履歴の管理について学習します。
ストレージが有効にされたチームはセッションの実行履歴 (「会話履歴」や「チャット履歴」とも呼ばれます) へのアクセスを自動的に持ちます。
❗️For all forms of session history, you need to have a database assigned to the team. See Storage for more details.
以下の方法で、チームにチャット履歴へのアクセスを提供できます :
- チームレベルの履歴 :
- add_history_to_context=True と num_history_runs=5 を設定して、最後の 5 実行からの入力と応答を、チームリーダーに送信されるすべてのリクエストに自動的に追加できます。
- num_history_messages を設定することで、モデルに送信されるリストに含めるために追加するメッセージの数をより細かく設定できます。
- read_chat_history=True を設定すると、チームがチャット履歴全体の任意のメッセージを読むことを可能にする、get_chat_history() ツールを提供できます。
- read_tool_call_history=True を設定すると、チームが逆時系列順でツール呼び出しを読むことを可能にする、get_tool_call_history() ツールを提供できます。
- search_session_history を有効にして、以前のセッションの検索を可能にできます。
- add_team_history_to_members=True と num_team_history_runs=5 を設定して、最後の 5 実行からの入力と応答 (チームレベルの入力と応答) を、チームメンバーに送信されるすべてのメッセージに自動的に追加できます。
- add_history_to_context=True と num_history_runs=5 を設定して、最後の 5 実行からの入力と応答を、チームリーダーに送信されるすべてのリクエストに自動的に追加できます。
- メンバーレベルの履歴 :
- 個々のチームメンバーに対して add_history_to_context を有効にすることもできます。これはそのメンバーに送信されるすべてのリクエストに、そのメンバー向けの入力と出力だけを追加し、そのメンバーは自身の履歴にアクセスできるようになります。
履歴参照
単純な履歴
基本的な会話の連続性のためにコンテキスト内のチーム履歴から始めましょう :
team = Team(
members=[...],
db=SqliteDb(db_file="tmp/team.db"),
add_history_to_context=True,
num_history_runs=5,
)
メンバー調整
メンバー間の共有コンテキストのためにチーム履歴を使用します :
team = Team(
members=[german_agent, spanish_agent],
db=SqliteDb(db_file="tmp/team.db"),
add_team_history_to_members=True,
num_team_history_runs=3,
)
インタラクション情報の共有
実行中のメンバー間のインタラクションを共有します :
team = Team(
members=[profile_agent, billing_agent],
db=SqliteDb(db_file="tmp/team.db"),
share_member_interactions=True,
)
長い会話
エージェントが履歴の検索を必要とする場合、チャット履歴ツールを追加します :
team = Team(
members=[...],
db=SqliteDb(db_file="tmp/team.db"),
read_chat_history=True, # Agent decides when to look up
)
マルチセッション・メモリ
セッション間の連続性のためにマルチセッション検索を有効にします :
team = Team(
members=[...],
db=SqliteDb(db_file="tmp/team.db"),
search_session_history=True,
num_history_sessions=2, # Keep low
)
❗️ Database Requirement: All history features require a database configured on the team. See Storage for setup.
履歴をチームコンテキストに追加する
会話履歴をコンテキストに追加するには、add_history_to_context=True を設定します。これは最後の 3 実行 (これはデフォルトです) からの入力と応答をチームリーダーのコンテキストに追加します。num_history_runs=n (n は含める実行数) を設定することで、実行数は変更できます。
この例を見てください :
from agno.team import Team
from agno.models.openai import OpenAIChat
from agno.db.sqlite import SqliteDb
team = Team(
model=OpenAIChat(id="gpt-4o"),
members=[],
db=SqliteDb(db_file="tmp/data.db"),
add_history_to_context=True,
num_history_runs=3,
description="You are a helpful assistant that always responds in a polite, upbeat and positive manner.",
)
team.print_response("2行で構成されたホラーストーリーを共有してください。", stream=True)
team.print_response("私の最初のメッセージは何でしたか?", stream=True)
出力例
┏━ Message ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ ┃ ┃ 2行で構成されたホラーストーリーを共有してください。 ┃ ┃ ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┏━ Response (3.4s) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ ┃ ┃ 深夜の静寂の中、あなたはベッドの下から自分の名前を呼ばれる声を聞いた。ベッドに隠れたはずの猫は、いまだに膝の上にいた。 ┃ ┃ ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┏━ Message ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ ┃ ┃ 私の最初のメッセージは何でしたか? ┃ ┃ ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┏━ Response (3.2s) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ ┃ ┃ あなたの最初のメッセージは、2行で構成されたホラーストーリーを共有してほしいというものでした。いつでももっとお手伝いできることがあれば教えてくだ ┃ ┃ さいね! ┃ ┃ ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
チーム履歴をメンバーに送信する
チーム履歴をメンバーに送信するには、add_team_history_to_members=True を設定します。これは、タスクがメンバーに委任される際、直近 3 チームレベル実行 (デフォルト設定) からの入力と応答をメンバーに送信します。num_team_history_runs=n (n は含める実行回数) を設定することで、実行回数は変更できます。
この例をご覧ください :
from agno.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.models.openai import OpenAIChat
from agno.team.team import Team
german_agent = Agent(
name="German Agent",
role="You answer German questions.",
model=OpenAIChat(id="o3-mini"),
)
spanish_agent = Agent(
name="Spanish Agent",
role="You answer Spanish questions.",
model=OpenAIChat(id="o3-mini"),
)
multi_lingual_q_and_a_team = Team(
name="Multi Lingual Q and A Team",
model=OpenAIChat("o3-mini"),
members=[german_agent, spanish_agent],
instructions=[
"You are a multi lingual Q and A team that can answer questions in English and Spanish. You MUST delegate the task to the appropriate member based on the language of the question.",
"If the question is in German, delegate to the German agent. If the question is in Spanish, delegate to the Spanish agent.",
"Always translate the response from the appropriate language to English and show both the original and translated responses.",
],
db=SqliteDb(
db_file="tmp/multi_lingual_q_and_a_team.db"
), # Add a database to store the conversation history. This is a requirement for history to work correctly.
determine_input_for_members=False, # Send the input directly to the member agents without the team leader synthesizing its own input.
respond_directly=True, # The team leader will not process responses from the members and instead will return them directly.
add_team_history_to_members=True, # Send all interactions between the user and the team to the member agents.
)
# First give information to the team
## Ask question in German
multi_lingual_q_and_a_team.print_response(
"Hallo, wie heißt du? Meine Name ist John.", stream=True, session_id="session_1"
)
# Then watch them recall the information (the question below states: "Tell me a 2-sentence story using my name")
## Follow up in Spanish
multi_lingual_q_and_a_team.print_response(
"Cuéntame una historia de 2 oraciones usando mi nombre real.",
stream=True,
session_id="session_1",
)
出力例
┃ ┃ ┃ Hallo, wie heißt du? Meine Name ist John. ┃ ┃ ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┏━ Team Tool Calls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ ┃ ┃ • delegate_task_to_member(member_id=german-agent, task=Der Benutzer hat auf Deutsch gesagt: "Hallo, wie heißt ┃ ┃ du? Meine Name ist John." Bitte antworte auf Deutsch und gib zusätzlich auch die englische Übersetzung ┃ ┃ deiner Antwort an.) ┃ ┃ ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┏━ Response (10.4s) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ ┃ ┃ Hallo John, es freut mich, dich kennenzulernen! Ich heiße ChatGPT. Wie kann ich dir heute weiterhelfen? ┃ ┃ ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┏━ Message ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ ┃ ┃ Cuéntame una historia de 2 oraciones usando mi nombre real. ┃ ┃ ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┏━ Team Tool Calls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ ┃ ┃ • delegate_task_to_member(member_id=spanish-agent, task=Crea una historia en español de 2 oraciones que ┃ ┃ incluya el nombre real del usuario. Dado que no se ha proporcionado un nombre, asume que el nombre real es ┃ ┃ 'Carlos' (puedes señalar que este es un nombre de ejemplo y que el usuario puede reemplazarlo por su nombre ┃ ┃ real). Además, proporciona la traducción al inglés de la historia. La respuesta debe incluir tanto la ┃ ┃ historia original en español como la traducción al inglés.) ┃ ┃ ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┏━ Response (15.6s) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ ┃ ┃ John se despertó una mañana con la misteriosa sensación de que el destino lo esperaba en un bosque encantado, donde cada árbol susurraba ┃ ┃ secretos milenarios. Al adentrarse en ese lugar mágico, descubrió un brillante portal que lo transportó a un reino lleno de maravillas y ┃ ┃ criaturas fantásticas, cambiando por siempre su vida. ┃ ┃ ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
上の例では、チーム履歴は、そのままではアクセス権がないメンバーに送信されます。これは Spanish エージェントが、元々は German エージェントに送信された情報を参照することを可能にします。
add_team_history_to_members=True は、チーム履歴をチームメンバーに送信されたタスクに追加します、例えば :
<team_history_context>
input: Hallo, wie heißt du? Meine Name ist John.
response: Ich heiße ChatGPT.
</team_history_context>
メンバー間のインタラクションを他のメンバーと共有する
チームメンバーとのすべてのインタラクションは自動的に記録されます。これはメンバー名、メンバーに割り当てられたタスク、メンバーからの応答を含みます。
これは単一の実行中だけ利用可能です。
メンバーが、現在の実行中に発生したすべてのインタラクションにアクセスすることを望む場合、share_member_interactions=True を設定してください。
以下の例と、実行中にメンバー間で情報がどのように共有されるかご覧ください。
from agno.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.models.openai import OpenAIChat
from agno.team.team import Team
def get_user_profile() -> dict:
"""Get the user profile."""
return {
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "1234567890",
"billing_address": "123 Main St, Anytown, USA",
"login_type": "email",
"mfa_enabled": True,
}
user_profile_agent = Agent(
name="User Profile Agent",
role="You are a user profile agent that can retrieve information about the user and the user's account.",
model=OpenAIChat(id="gpt-5-mini"),
tools=[get_user_profile],
)
technical_support_agent = Agent(
name="Technical Support Agent",
role="You are a technical support agent that can answer questions about the technical support.",
model=OpenAIChat(id="gpt-5-mini"),
)
billing_agent = Agent(
name="Billing Agent",
role="You are a billing agent that can answer questions about the billing.",
model=OpenAIChat(id="gpt-5-mini"),
)
support_team = Team(
name="Technical Support Team",
model=OpenAIChat("o3-mini"),
members=[user_profile_agent, technical_support_agent, billing_agent],
instructions=[
"You are a technical support team for a Facebook account that can answer questions about the technical support and billing for Facebook.",
"Get the user's profile information first if the question is about the user's profile or account.",
],
db=SqliteDb(
db_file="tmp/technical_support_team.db"
), # Add a database to store the conversation history. This is a requirement for history to work correctly.
share_member_interactions=True, # Send member interactions DURING the current run to the other members.
show_members_responses=True,
)
## Ask question about technical support
support_team.print_response(
"What is my billing address and how do I change it?",
stream=True,
session_id="session_1",
)
support_team.print_response(
"Do I have multi-factor enabled? How do I disable it?",
stream=True,
session_id="session_1",
)
出力例
┏━ Message ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ ┃ ┃ What is my billing address and how do I change it? ┃ ┃ ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┏━ Team Tool Calls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ ┃ ┃ • delegate_task_to_member(member_id=user-profile-agent, task=Please retrieve the current billing address from ┃ ┃ the user's profile.) ┃ ┃ ┃ ┃ • delegate_task_to_member(member_id=billing-agent, task=Please provide detailed instructions on how the user ┃ ┃ can update their billing address on their Facebook account. Include any steps like navigating to account ┃ ┃ settings or contacting support if needed. The current billing address is '123 Main St, Anytown, USA'.) ┃ ┃ ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┏━ Response (51.8s) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ ┃ ┃ Your billing address on file is 123 Main St, Anytown, USA. ┃ ┃ ┃ ┃ To change your billing address on Facebook, please follow these steps: ┃ ┃ ┃ ┃ A. For Desktop/Web: ┃ ┃ 1. Sign in to your Facebook account. ┃ ┃ 2. Click the account dropdown (triangle) in the top-right corner and select “Settings & Privacy,” then “Settings.” ┃ ┃ 3. In the left-hand menu, click on “Payments” or “Facebook Pay” (the exact option may vary by region). ┃ ┃ 4. Under Payment Methods, select the card you wish to update. If an “Edit” option is available, update the billing address directly and then ┃ ┃ save. If not, remove the card and re-add it with the updated address. ┃ ┃ 5. If you use PayPal: You’ll need to update the billing/shipping address on PayPal’s website/app, as Facebook will pull the address from there. ┃ ┃ 6. Some accounts may show a separate “Address” option under Facebook Pay. If so, click it, update the address, and save. ┃ ┃ 7. You might be asked to re-enter your password or complete a verification step. After saving, it’s a good idea to test with a small ┃ ┃ transaction to confirm the changes. ┃ ┃ ┃ ┃ B. For Mobile (iOS/Android): ┃ ┃ 1. Open the Facebook app and sign in. ┃ ┃ 2. Tap the menu icon (three horizontal lines) > Settings & Privacy > Settings. ┃ ┃ 3. Look for “Payments” or “Facebook Pay” in the settings menu. ┃ ┃ 4. Tap the card you wish to update. If an edit option is available, update the billing address; if not, remove the card and re-add it with the ┃ ┃ new address. ┃ ┃ 5. For PayPal users, update the address directly on PayPal’s app or website. ┃ ┃ 6. Save your changes and follow any prompts for verification. ┃ ┃ ┃ ┃ Note: ┃ ┃ • Often, the billing address associated with Facebook is tied to your payment method. If there isn’t an option to edit it directly in Facebook, ┃ ┃ update it through your bank or PayPal account. ┃ ┃ • In some regions or with some payment methods, you might need to remove and then re-add the payment method to reflect the new address. ┃ ┃ • If you continue to experience issues, you can contact Facebook support through the Help Center (facebook.com/help) or via the Help & Support ┃ ┃ menu in the mobile app. ┃ ┃ ┃ ┃ Let me know if you need further assistance or more specific instructions based on your device or payment method! ┃ ┃ ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┏━ Message ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ ┃ ┃ Do I have multi-factor enabled? How do I disable it? ┃ ┃ ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┏━ Team Tool Calls ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ ┃ ┃ • delegate_task_to_member(member_id=user-profile-agent, task=Please check the user's account settings for ┃ ┃ multi-factor authentication and determine if multi-factor is enabled. Provide details on its current status ┃ ┃ and any relevant configuration data.) ┃ ┃ ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┏━ Response (24.1s) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ ┃ ┃ Your account currently has multi-factor authentication (MFA) enabled. To disable MFA, you can follow these general steps: ┃ ┃ ┃ ┃ 1. Log in to your Facebook account and go to your Settings. ┃ ┃ 2. Navigate to Security and Login. ┃ ┃ 3. Under the Two-Factor Authentication section, click on "Edit" next to the active authentication method. ┃ ┃ 4. Follow the prompts to disable MFA—this may involve re-entering your password or confirming your decision via a verification code. ┃ ┃ 5. Once you disable MFA, confirm that the change is applied by checking the security settings again. ┃ ┃ ┃ ┃ Keep in mind that disabling MFA reduces your account's security, so be sure that you’re comfortable with the potential risks. ┃ ┃ ┃ ┃ If you need more detailed assistance or run into any issues during the process, let me know! ┃ ┃ ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
share_member_interactions=True は、インタラクションの詳細をチームメンバーに送信されるタスクに追加します、例えば :
<member_interaction_context>
- Member: Web Researcher
- Task: Find information about the web
- Response: I found information about the web
- Member: HackerNews Researcher
- Task: Find information about the web
- Response: I found information about the web
</member_interaction_context>
チャット履歴を読む
チャット履歴を読むには、read_chat_history=True を設定します。これは get_chat_history() ツールをチームに提供し、チャット履歴全体から任意のメッセージを読むことを可能にします。
from agno.team import Team
from agno.models.google.gemini import Gemini
from agno.db.sqlite import SqliteDb
team = Team(
model=Gemini(id="gemini-2.0-flash-001"),
members=[],
db=SqliteDb(db_file="tmp/data.db"),
read_chat_history=True,
description="You are a helpful assistant that always responds in a polite, upbeat and positive manner.",
)
# Send lots of messages...
team.print_response("What was my first message?", stream=True)
以上
