members | List[Union[Agent, Team]] | - | List of agents or teams that make up this team | | | | |
id | Optional[str] | None | Team UUID (autogenerated if not set) | | | | |
model | Optional[Union[Model, str]] | None | Model to use for the team. Can be a Model object or a model string (provider:model_id) | | | | |
name | Optional[str] | None | Name of the team | | | | |
role | Optional[str] | None | Role of the team within its parent team | | | | |
respond_directly | bool | False | If True, the team leader won’t process responses from the members and instead will return them directly | | | | |
determine_input_for_members | bool | True | Set to False if you want to send the run input directly to the member agents | | | | |
delegate_task_to_all_members | bool | False | If True, the team leader will delegate tasks to all members automatically, without any decision from the team leader | | | | |
user_id | Optional[str] | None | Default user ID for this team | | | | |
session_id | Optional[str] | None | Default session ID for this team (autogenerated if not set) | | | | |
session_state | Optional[Dict[str, Any]] | None | Session state (stored in the database to persist across runs) | | | | |
add_session_state_to_context | bool | False | Set to True to add the session_state to the context | | | | |
enable_agentic_state | bool | False | Set to True to give the team tools to update the session_state dynamically | | | | |
overwrite_db_session_state | bool | False | Set to True to overwrite the session state in the database with the session state provided in the run | | | | |
cache_session | bool | False | If True, cache the current Team session in memory for faster access | | | | |
resolve_in_context | bool | True | If True, resolve the session_state, dependencies, and metadata in the user and system messages | | | | |
description | Optional[str] | None | A description of the Team that is added to the start of the system message | | | | |
instructions | Optional[Union[str, List[str], Callable]] | None | List of instructions for the team | | | | |
expected_output | Optional[str] | None | Provide the expected output from the Team | | | | |
additional_context | Optional[str] | None | Additional context added to the end of the system message | | | | |
markdown | bool | False | If markdown=true, add instructions to format the output using markdown | | | | |
add_datetime_to_context | bool | False | If True, add the current datetime to the instructions to give the team a sense of time | | | | |
add_location_to_context | bool | False | If True, add the current location to the instructions to give the team a sense of location | | | | |
timezone_identifier | Optional[str] | None | Allows for custom timezone for datetime instructions following the TZ Database format | | | | |
add_name_to_context | bool | False | If True, add the team name to the instructions | | | | |
add_member_tools_to_context | bool | True | If True, add the tools available to team members to the context | | | | |
system_message | Optional[Union[str, Callable, Message]] | None | Provide the system message as a string or function | | | | |
system_message_role | str | "system" | Role for the system message | | | | |
additional_input | Optional[List[Union[str, Dict, BaseModel, Message]]] | None | A list of extra messages added after the system message and before the user message | | | | |
db | Optional[BaseDb] | None | Database to use for this team | | | | |
memory_manager | Optional[MemoryManager] | None | Memory manager to use for this team | | | | |
dependencies | Optional[Dict[str, Any]] | None | User provided dependencies | | | | |
add_dependencies_to_context | bool | False | If True, add the dependencies to the user prompt | | | | |
knowledge | Optional[Knowledge] | None | Add a knowledge base to the team | | | | |
knowledge_filters | Optional[Dict[str, Any]] | None | Filters to apply to knowledge base searches | | | | |
enable_agentic_knowledge_filters | Optional[bool] | False | Let the team choose the knowledge filters | | | | |
update_knowledge | bool | False | Add a tool that allows the Team to update Knowledge | | | | |
add_knowledge_to_context | bool | False | If True, add references to the user prompt | | | | |
knowledge_retriever | Optional[Callable[..., Optional[List[Union[Dict, str]]]]] | None | Retrieval function to get references | | | | |
references_format | Literal["json", "yaml"] | "json" | Format of the references | | | | |
share_member_interactions | bool | False | If True, send all member interactions (request/response) during the current run to members that have been delegated a task to | | | | |
get_member_information_tool | bool | False | If True, add a tool to get information about the team members | | | | |
search_knowledge | bool | True | Add a tool to search the knowledge base (aka Agentic RAG) | | | | |
send_media_to_model | bool | True | If False, media (images, videos, audio, files) is only available to tools and not sent to the LLM | | | | |
store_media | bool | True | If True, store media in the database | | | | |
store_tool_messages | bool | True | If True, store tool results in the database | | | | |
store_history_messages | bool | True | If True, store history messages in the database | | | | |
tools | Optional[List[Union[Toolkit, Callable, Function, Dict]]] | None | A list of tools provided to the Model | | | | |
tool_choice | Optional[Union[str, Dict[str, Any]]] | None | Controls which (if any) tool is called by the team model | | | | |
tool_call_limit | Optional[int] | None | Maximum number of tool calls allowed | | | | |
max_tool_calls_from_history | Optional[int] | None | Maximum number of tool calls from history to keep in context. If None, all tool calls from history are included. If set to N, only the last N tool calls from history are added to the context for memory management | | | | |
tool_hooks | Optional[List[Callable]] | None | A list of hooks to be called before and after the tool call | | | | |
pre_hooks | Optional[Union[List[Callable[..., Any]], List[BaseGuardrail]]] | None | Functions called right after team session is loaded, before processing starts | | | | |
post_hooks | Optional[Union[List[Callable[..., Any]], List[BaseGuardrail]]] | None | Functions called after output is generated but before the response is returned | | | | |
input_schema | Optional[Type[BaseModel]] | None | Input schema for validating input | | | | |
output_schema | Optional[Type[BaseModel]] | None | Output schema for the team response | | | | |
parser_model | Optional[Union[Model, str]] | None | Provide a secondary model to parse the response from the primary model. Can be a Model object or a model string (provider:model_id) | | | | |
parser_model_prompt | Optional[str] | None | Provide a prompt for the parser model | | | | |
output_model | Optional[Union[Model, str]] | None | Provide an output model to parse the response from the team. Can be a Model object or a model string (provider:model_id) | | | | |
output_model_prompt | Optional[str] | None | Provide a prompt for the output model | | | | |
use_json_mode | bool | False | If output_schema is set, sets the response mode of the model | | | | |
parse_response | bool | True | If True, parse the response | | | | |
enable_agentic_memory | bool | False | Enable the team to manage memories of the user | | | | |
enable_user_memories | bool | False | If True, the team creates/updates user memories at the end of runs | | | | |
add_memories_to_context | Optional[bool] | None | If True, the team adds a reference to the user memories in the response | | | | |
enable_session_summaries | bool | False | If True, the team creates/updates session summaries at the end of runs | | | | |
session_summary_manager | Optional[SessionSummaryManager] | None | Session summary manager | | | | |
add_session_summary_to_context | Optional[bool] | None | If True, the team adds session summaries to the context | | | | |
add_history_to_context | bool | False | Add messages from the chat history to the messages list sent to the Model. This only applies to the team leader, not the members. | | | | |
num_history_runs | Optional[int] | None | Number of historical runs to include in the messages. | | | | |
num_history_messages | Optional[int] | None | Number of historical messages to include messages list sent to the Model. | add_team_history_to_members | bool | False | If True, send the team-level history to the members, not the agent-level history |
num_team_history_runs | int | 3 | Number of historical runs to include in the messages sent to the members | | | | |
search_session_history | Optional[bool] | False | If True, adds a tool to allow searching through previous sessions | | | | |
num_history_sessions | Optional[int] | None | Number of past sessions to include in the search | | | | |
read_team_history | bool | False | If True, adds a tool to allow the team to read the team history (deprecated and will be removed in a future version) | | | | |
read_chat_history | bool | False | If True, adds a tool to allow the team to read the chat history | | | | |
metadata | Optional[Dict[str, Any]] | None | Metadata stored with this team | | | | |
reasoning | bool | False | Enable reasoning for the team | | | | |
reasoning_model | Optional[Union[Model, str]] | None | Model to use for reasoning. Can be a Model object or a model string (provider:model_id) | | | | |
reasoning_agent | Optional[Agent] | None | Agent to use for reasoning | | | | |
reasoning_min_steps | int | 1 | Minimum number of reasoning steps | | | | |
reasoning_max_steps | int | 10 | Maximum number of reasoning steps | | | | |
stream | Optional[bool] | None | Stream the response from the Team | | | | |
stream_events | bool | False | Stream the intermediate steps from the Team | | | | |
stream_member_events | bool | True | Stream the member events from the Team members | | | | |
store_events | bool | False | Store the events from the Team | | | | |
events_to_skip | Optional[List[Union[RunEvent, TeamRunEvent]]] | None | List of events to skip from the Team | | | | |
store_member_responses | bool | False | Store member agent runs inside the team’s RunOutput | | | | |
debug_mode | bool | False | Enable debug logs | | | | |
debug_level | Literal[1, 2] | 1 | Debug level: 1 = basic, 2 = detailed | | | | |
show_members_responses | bool | False | Enable member logs - Sets the debug_mode for team and members | | | | |
retries | int | 0 | Number of retries to attempt | | | | |
delay_between_retries | int | 1 | Delay between retries (in seconds) | | | | |
exponential_backoff | bool | False | Exponential backoff: if True, the delay between retries is doubled each time | | | | |
telemetry | bool | True | Log minimal telemetry for analytics | | | | |