autogen_agentchat.state#
State management for agents, teams and termination conditions.
- pydantic model AssistantAgentState[source]#
Bases:
BaseState
State for an assistant agent.
Show JSON schema
{ "title": "AssistantAgentState", "description": "State for an assistant agent.", "type": "object", "properties": { "type": { "default": "AssistantAgentState", "title": "Type", "type": "string" }, "version": { "default": "1.0.0", "title": "Version", "type": "string" }, "llm_context": { "title": "Llm Context", "type": "object" } } }
- Fields:
llm_context (Mapping[str, Any])
type (str)
- pydantic model BaseGroupChatManagerState[source]#
Bases:
BaseState
Base state for all group chat managers.
Show JSON schema
{ "title": "BaseGroupChatManagerState", "description": "Base state for all group chat managers.", "type": "object", "properties": { "type": { "default": "BaseGroupChatManagerState", "title": "Type", "type": "string" }, "version": { "default": "1.0.0", "title": "Version", "type": "string" }, "message_thread": { "items": { "discriminator": { "mapping": { "HandoffMessage": "#/$defs/HandoffMessage", "MultiModalMessage": "#/$defs/MultiModalMessage", "StopMessage": "#/$defs/StopMessage", "TextMessage": "#/$defs/TextMessage", "ToolCallExecutionEvent": "#/$defs/ToolCallExecutionEvent", "ToolCallRequestEvent": "#/$defs/ToolCallRequestEvent", "ToolCallSummaryMessage": "#/$defs/ToolCallSummaryMessage" }, "propertyName": "type" }, "oneOf": [ { "$ref": "#/$defs/ToolCallRequestEvent" }, { "$ref": "#/$defs/ToolCallExecutionEvent" }, { "$ref": "#/$defs/TextMessage" }, { "$ref": "#/$defs/MultiModalMessage" }, { "$ref": "#/$defs/StopMessage" }, { "$ref": "#/$defs/ToolCallSummaryMessage" }, { "$ref": "#/$defs/HandoffMessage" } ] }, "title": "Message Thread", "type": "array" }, "current_turn": { "default": 0, "title": "Current Turn", "type": "integer" } }, "$defs": { "FunctionCall": { "properties": { "id": { "title": "Id", "type": "string" }, "arguments": { "title": "Arguments", "type": "string" }, "name": { "title": "Name", "type": "string" } }, "required": [ "id", "arguments", "name" ], "title": "FunctionCall", "type": "object" }, "FunctionExecutionResult": { "properties": { "content": { "title": "Content", "type": "string" }, "call_id": { "title": "Call Id", "type": "string" } }, "required": [ "content", "call_id" ], "title": "FunctionExecutionResult", "type": "object" }, "HandoffMessage": { "description": "A message requesting handoff of a conversation to another agent.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "target": { "title": "Target", "type": "string" }, "content": { "title": "Content", "type": "string" }, "type": { "const": "HandoffMessage", "default": "HandoffMessage", "title": "Type", "type": "string" } }, "required": [ "source", "target", "content" ], "title": "HandoffMessage", "type": "object" }, "MultiModalMessage": { "description": "A multimodal message.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "items": { "anyOf": [ { "type": "string" }, {} ] }, "title": "Content", "type": "array" }, "type": { "const": "MultiModalMessage", "default": "MultiModalMessage", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "MultiModalMessage", "type": "object" }, "RequestUsage": { "properties": { "prompt_tokens": { "title": "Prompt Tokens", "type": "integer" }, "completion_tokens": { "title": "Completion Tokens", "type": "integer" } }, "required": [ "prompt_tokens", "completion_tokens" ], "title": "RequestUsage", "type": "object" }, "StopMessage": { "description": "A message requesting stop of a conversation.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "title": "Content", "type": "string" }, "type": { "const": "StopMessage", "default": "StopMessage", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "StopMessage", "type": "object" }, "TextMessage": { "description": "A text message.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "title": "Content", "type": "string" }, "type": { "const": "TextMessage", "default": "TextMessage", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "TextMessage", "type": "object" }, "ToolCallExecutionEvent": { "description": "An event signaling the execution of tool calls.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "items": { "$ref": "#/$defs/FunctionExecutionResult" }, "title": "Content", "type": "array" }, "type": { "const": "ToolCallExecutionEvent", "default": "ToolCallExecutionEvent", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "ToolCallExecutionEvent", "type": "object" }, "ToolCallRequestEvent": { "description": "An event signaling a request to use tools.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "items": { "$ref": "#/$defs/FunctionCall" }, "title": "Content", "type": "array" }, "type": { "const": "ToolCallRequestEvent", "default": "ToolCallRequestEvent", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "ToolCallRequestEvent", "type": "object" }, "ToolCallSummaryMessage": { "description": "A message signaling the summary of tool call results.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "title": "Content", "type": "string" }, "type": { "const": "ToolCallSummaryMessage", "default": "ToolCallSummaryMessage", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "ToolCallSummaryMessage", "type": "object" } } }
- Fields:
current_turn (int)
message_thread (List[autogen_agentchat.messages.ToolCallRequestEvent | autogen_agentchat.messages.ToolCallExecutionEvent | autogen_agentchat.messages.TextMessage | autogen_agentchat.messages.MultiModalMessage | autogen_agentchat.messages.StopMessage | autogen_agentchat.messages.ToolCallSummaryMessage | autogen_agentchat.messages.HandoffMessage])
type (str)
- field message_thread: List[Annotated[Annotated[ToolCallRequestEvent | ToolCallExecutionEvent, FieldInfo(annotation=NoneType, required=True, discriminator='type')] | Annotated[TextMessage | MultiModalMessage | StopMessage | ToolCallSummaryMessage | HandoffMessage, FieldInfo(annotation=NoneType, required=True, discriminator='type')], FieldInfo(annotation=NoneType, required=True, discriminator='type')]] [Optional]#
- pydantic model BaseState[source]#
Bases:
BaseModel
Base class for all saveable state
Show JSON schema
{ "title": "BaseState", "description": "Base class for all saveable state", "type": "object", "properties": { "type": { "default": "BaseState", "title": "Type", "type": "string" }, "version": { "default": "1.0.0", "title": "Version", "type": "string" } } }
- Fields:
type (str)
version (str)
- pydantic model ChatAgentContainerState[source]#
Bases:
BaseState
State for a container of chat agents.
Show JSON schema
{ "title": "ChatAgentContainerState", "description": "State for a container of chat agents.", "type": "object", "properties": { "type": { "default": "ChatAgentContainerState", "title": "Type", "type": "string" }, "version": { "default": "1.0.0", "title": "Version", "type": "string" }, "agent_state": { "title": "Agent State", "type": "object" }, "message_buffer": { "items": { "discriminator": { "mapping": { "HandoffMessage": "#/$defs/HandoffMessage", "MultiModalMessage": "#/$defs/MultiModalMessage", "StopMessage": "#/$defs/StopMessage", "TextMessage": "#/$defs/TextMessage", "ToolCallSummaryMessage": "#/$defs/ToolCallSummaryMessage" }, "propertyName": "type" }, "oneOf": [ { "$ref": "#/$defs/TextMessage" }, { "$ref": "#/$defs/MultiModalMessage" }, { "$ref": "#/$defs/StopMessage" }, { "$ref": "#/$defs/ToolCallSummaryMessage" }, { "$ref": "#/$defs/HandoffMessage" } ] }, "title": "Message Buffer", "type": "array" } }, "$defs": { "HandoffMessage": { "description": "A message requesting handoff of a conversation to another agent.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "target": { "title": "Target", "type": "string" }, "content": { "title": "Content", "type": "string" }, "type": { "const": "HandoffMessage", "default": "HandoffMessage", "title": "Type", "type": "string" } }, "required": [ "source", "target", "content" ], "title": "HandoffMessage", "type": "object" }, "MultiModalMessage": { "description": "A multimodal message.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "items": { "anyOf": [ { "type": "string" }, {} ] }, "title": "Content", "type": "array" }, "type": { "const": "MultiModalMessage", "default": "MultiModalMessage", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "MultiModalMessage", "type": "object" }, "RequestUsage": { "properties": { "prompt_tokens": { "title": "Prompt Tokens", "type": "integer" }, "completion_tokens": { "title": "Completion Tokens", "type": "integer" } }, "required": [ "prompt_tokens", "completion_tokens" ], "title": "RequestUsage", "type": "object" }, "StopMessage": { "description": "A message requesting stop of a conversation.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "title": "Content", "type": "string" }, "type": { "const": "StopMessage", "default": "StopMessage", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "StopMessage", "type": "object" }, "TextMessage": { "description": "A text message.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "title": "Content", "type": "string" }, "type": { "const": "TextMessage", "default": "TextMessage", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "TextMessage", "type": "object" }, "ToolCallSummaryMessage": { "description": "A message signaling the summary of tool call results.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "title": "Content", "type": "string" }, "type": { "const": "ToolCallSummaryMessage", "default": "ToolCallSummaryMessage", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "ToolCallSummaryMessage", "type": "object" } } }
- Fields:
agent_state (Mapping[str, Any])
message_buffer (List[Annotated[autogen_agentchat.messages.TextMessage | autogen_agentchat.messages.MultiModalMessage | autogen_agentchat.messages.StopMessage | autogen_agentchat.messages.ToolCallSummaryMessage | autogen_agentchat.messages.HandoffMessage, FieldInfo(annotation=NoneType, required=True, discriminator='type')]])
type (str)
- field message_buffer: List[Annotated[TextMessage | MultiModalMessage | StopMessage | ToolCallSummaryMessage | HandoffMessage, FieldInfo(annotation=NoneType, required=True, discriminator='type')]] [Optional]#
- pydantic model MagenticOneOrchestratorState[source]#
Bases:
BaseGroupChatManagerState
State for
MagneticOneGroupChat
orchestrator.Show JSON schema
{ "title": "MagenticOneOrchestratorState", "description": "State for :class:`~autogen_agentchat.teams.MagneticOneGroupChat` orchestrator.", "type": "object", "properties": { "type": { "default": "MagenticOneOrchestratorState", "title": "Type", "type": "string" }, "version": { "default": "1.0.0", "title": "Version", "type": "string" }, "message_thread": { "items": { "discriminator": { "mapping": { "HandoffMessage": "#/$defs/HandoffMessage", "MultiModalMessage": "#/$defs/MultiModalMessage", "StopMessage": "#/$defs/StopMessage", "TextMessage": "#/$defs/TextMessage", "ToolCallExecutionEvent": "#/$defs/ToolCallExecutionEvent", "ToolCallRequestEvent": "#/$defs/ToolCallRequestEvent", "ToolCallSummaryMessage": "#/$defs/ToolCallSummaryMessage" }, "propertyName": "type" }, "oneOf": [ { "$ref": "#/$defs/ToolCallRequestEvent" }, { "$ref": "#/$defs/ToolCallExecutionEvent" }, { "$ref": "#/$defs/TextMessage" }, { "$ref": "#/$defs/MultiModalMessage" }, { "$ref": "#/$defs/StopMessage" }, { "$ref": "#/$defs/ToolCallSummaryMessage" }, { "$ref": "#/$defs/HandoffMessage" } ] }, "title": "Message Thread", "type": "array" }, "current_turn": { "default": 0, "title": "Current Turn", "type": "integer" }, "task": { "default": "", "title": "Task", "type": "string" }, "facts": { "default": "", "title": "Facts", "type": "string" }, "plan": { "default": "", "title": "Plan", "type": "string" }, "n_rounds": { "default": 0, "title": "N Rounds", "type": "integer" }, "n_stalls": { "default": 0, "title": "N Stalls", "type": "integer" } }, "$defs": { "FunctionCall": { "properties": { "id": { "title": "Id", "type": "string" }, "arguments": { "title": "Arguments", "type": "string" }, "name": { "title": "Name", "type": "string" } }, "required": [ "id", "arguments", "name" ], "title": "FunctionCall", "type": "object" }, "FunctionExecutionResult": { "properties": { "content": { "title": "Content", "type": "string" }, "call_id": { "title": "Call Id", "type": "string" } }, "required": [ "content", "call_id" ], "title": "FunctionExecutionResult", "type": "object" }, "HandoffMessage": { "description": "A message requesting handoff of a conversation to another agent.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "target": { "title": "Target", "type": "string" }, "content": { "title": "Content", "type": "string" }, "type": { "const": "HandoffMessage", "default": "HandoffMessage", "title": "Type", "type": "string" } }, "required": [ "source", "target", "content" ], "title": "HandoffMessage", "type": "object" }, "MultiModalMessage": { "description": "A multimodal message.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "items": { "anyOf": [ { "type": "string" }, {} ] }, "title": "Content", "type": "array" }, "type": { "const": "MultiModalMessage", "default": "MultiModalMessage", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "MultiModalMessage", "type": "object" }, "RequestUsage": { "properties": { "prompt_tokens": { "title": "Prompt Tokens", "type": "integer" }, "completion_tokens": { "title": "Completion Tokens", "type": "integer" } }, "required": [ "prompt_tokens", "completion_tokens" ], "title": "RequestUsage", "type": "object" }, "StopMessage": { "description": "A message requesting stop of a conversation.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "title": "Content", "type": "string" }, "type": { "const": "StopMessage", "default": "StopMessage", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "StopMessage", "type": "object" }, "TextMessage": { "description": "A text message.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "title": "Content", "type": "string" }, "type": { "const": "TextMessage", "default": "TextMessage", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "TextMessage", "type": "object" }, "ToolCallExecutionEvent": { "description": "An event signaling the execution of tool calls.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "items": { "$ref": "#/$defs/FunctionExecutionResult" }, "title": "Content", "type": "array" }, "type": { "const": "ToolCallExecutionEvent", "default": "ToolCallExecutionEvent", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "ToolCallExecutionEvent", "type": "object" }, "ToolCallRequestEvent": { "description": "An event signaling a request to use tools.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "items": { "$ref": "#/$defs/FunctionCall" }, "title": "Content", "type": "array" }, "type": { "const": "ToolCallRequestEvent", "default": "ToolCallRequestEvent", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "ToolCallRequestEvent", "type": "object" }, "ToolCallSummaryMessage": { "description": "A message signaling the summary of tool call results.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "title": "Content", "type": "string" }, "type": { "const": "ToolCallSummaryMessage", "default": "ToolCallSummaryMessage", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "ToolCallSummaryMessage", "type": "object" } } }
- Fields:
facts (str)
n_rounds (int)
n_stalls (int)
plan (str)
task (str)
type (str)
- pydantic model RoundRobinManagerState[source]#
Bases:
BaseGroupChatManagerState
State for
RoundRobinGroupChat
manager.Show JSON schema
{ "title": "RoundRobinManagerState", "description": "State for :class:`~autogen_agentchat.teams.RoundRobinGroupChat` manager.", "type": "object", "properties": { "type": { "default": "RoundRobinManagerState", "title": "Type", "type": "string" }, "version": { "default": "1.0.0", "title": "Version", "type": "string" }, "message_thread": { "items": { "discriminator": { "mapping": { "HandoffMessage": "#/$defs/HandoffMessage", "MultiModalMessage": "#/$defs/MultiModalMessage", "StopMessage": "#/$defs/StopMessage", "TextMessage": "#/$defs/TextMessage", "ToolCallExecutionEvent": "#/$defs/ToolCallExecutionEvent", "ToolCallRequestEvent": "#/$defs/ToolCallRequestEvent", "ToolCallSummaryMessage": "#/$defs/ToolCallSummaryMessage" }, "propertyName": "type" }, "oneOf": [ { "$ref": "#/$defs/ToolCallRequestEvent" }, { "$ref": "#/$defs/ToolCallExecutionEvent" }, { "$ref": "#/$defs/TextMessage" }, { "$ref": "#/$defs/MultiModalMessage" }, { "$ref": "#/$defs/StopMessage" }, { "$ref": "#/$defs/ToolCallSummaryMessage" }, { "$ref": "#/$defs/HandoffMessage" } ] }, "title": "Message Thread", "type": "array" }, "current_turn": { "default": 0, "title": "Current Turn", "type": "integer" }, "next_speaker_index": { "default": 0, "title": "Next Speaker Index", "type": "integer" } }, "$defs": { "FunctionCall": { "properties": { "id": { "title": "Id", "type": "string" }, "arguments": { "title": "Arguments", "type": "string" }, "name": { "title": "Name", "type": "string" } }, "required": [ "id", "arguments", "name" ], "title": "FunctionCall", "type": "object" }, "FunctionExecutionResult": { "properties": { "content": { "title": "Content", "type": "string" }, "call_id": { "title": "Call Id", "type": "string" } }, "required": [ "content", "call_id" ], "title": "FunctionExecutionResult", "type": "object" }, "HandoffMessage": { "description": "A message requesting handoff of a conversation to another agent.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "target": { "title": "Target", "type": "string" }, "content": { "title": "Content", "type": "string" }, "type": { "const": "HandoffMessage", "default": "HandoffMessage", "title": "Type", "type": "string" } }, "required": [ "source", "target", "content" ], "title": "HandoffMessage", "type": "object" }, "MultiModalMessage": { "description": "A multimodal message.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "items": { "anyOf": [ { "type": "string" }, {} ] }, "title": "Content", "type": "array" }, "type": { "const": "MultiModalMessage", "default": "MultiModalMessage", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "MultiModalMessage", "type": "object" }, "RequestUsage": { "properties": { "prompt_tokens": { "title": "Prompt Tokens", "type": "integer" }, "completion_tokens": { "title": "Completion Tokens", "type": "integer" } }, "required": [ "prompt_tokens", "completion_tokens" ], "title": "RequestUsage", "type": "object" }, "StopMessage": { "description": "A message requesting stop of a conversation.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "title": "Content", "type": "string" }, "type": { "const": "StopMessage", "default": "StopMessage", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "StopMessage", "type": "object" }, "TextMessage": { "description": "A text message.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "title": "Content", "type": "string" }, "type": { "const": "TextMessage", "default": "TextMessage", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "TextMessage", "type": "object" }, "ToolCallExecutionEvent": { "description": "An event signaling the execution of tool calls.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "items": { "$ref": "#/$defs/FunctionExecutionResult" }, "title": "Content", "type": "array" }, "type": { "const": "ToolCallExecutionEvent", "default": "ToolCallExecutionEvent", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "ToolCallExecutionEvent", "type": "object" }, "ToolCallRequestEvent": { "description": "An event signaling a request to use tools.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "items": { "$ref": "#/$defs/FunctionCall" }, "title": "Content", "type": "array" }, "type": { "const": "ToolCallRequestEvent", "default": "ToolCallRequestEvent", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "ToolCallRequestEvent", "type": "object" }, "ToolCallSummaryMessage": { "description": "A message signaling the summary of tool call results.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "title": "Content", "type": "string" }, "type": { "const": "ToolCallSummaryMessage", "default": "ToolCallSummaryMessage", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "ToolCallSummaryMessage", "type": "object" } } }
- Fields:
next_speaker_index (int)
type (str)
- pydantic model SelectorManagerState[source]#
Bases:
BaseGroupChatManagerState
State for
SelectorGroupChat
manager.Show JSON schema
{ "title": "SelectorManagerState", "description": "State for :class:`~autogen_agentchat.teams.SelectorGroupChat` manager.", "type": "object", "properties": { "type": { "default": "SelectorManagerState", "title": "Type", "type": "string" }, "version": { "default": "1.0.0", "title": "Version", "type": "string" }, "message_thread": { "items": { "discriminator": { "mapping": { "HandoffMessage": "#/$defs/HandoffMessage", "MultiModalMessage": "#/$defs/MultiModalMessage", "StopMessage": "#/$defs/StopMessage", "TextMessage": "#/$defs/TextMessage", "ToolCallExecutionEvent": "#/$defs/ToolCallExecutionEvent", "ToolCallRequestEvent": "#/$defs/ToolCallRequestEvent", "ToolCallSummaryMessage": "#/$defs/ToolCallSummaryMessage" }, "propertyName": "type" }, "oneOf": [ { "$ref": "#/$defs/ToolCallRequestEvent" }, { "$ref": "#/$defs/ToolCallExecutionEvent" }, { "$ref": "#/$defs/TextMessage" }, { "$ref": "#/$defs/MultiModalMessage" }, { "$ref": "#/$defs/StopMessage" }, { "$ref": "#/$defs/ToolCallSummaryMessage" }, { "$ref": "#/$defs/HandoffMessage" } ] }, "title": "Message Thread", "type": "array" }, "current_turn": { "default": 0, "title": "Current Turn", "type": "integer" }, "previous_speaker": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Previous Speaker" } }, "$defs": { "FunctionCall": { "properties": { "id": { "title": "Id", "type": "string" }, "arguments": { "title": "Arguments", "type": "string" }, "name": { "title": "Name", "type": "string" } }, "required": [ "id", "arguments", "name" ], "title": "FunctionCall", "type": "object" }, "FunctionExecutionResult": { "properties": { "content": { "title": "Content", "type": "string" }, "call_id": { "title": "Call Id", "type": "string" } }, "required": [ "content", "call_id" ], "title": "FunctionExecutionResult", "type": "object" }, "HandoffMessage": { "description": "A message requesting handoff of a conversation to another agent.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "target": { "title": "Target", "type": "string" }, "content": { "title": "Content", "type": "string" }, "type": { "const": "HandoffMessage", "default": "HandoffMessage", "title": "Type", "type": "string" } }, "required": [ "source", "target", "content" ], "title": "HandoffMessage", "type": "object" }, "MultiModalMessage": { "description": "A multimodal message.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "items": { "anyOf": [ { "type": "string" }, {} ] }, "title": "Content", "type": "array" }, "type": { "const": "MultiModalMessage", "default": "MultiModalMessage", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "MultiModalMessage", "type": "object" }, "RequestUsage": { "properties": { "prompt_tokens": { "title": "Prompt Tokens", "type": "integer" }, "completion_tokens": { "title": "Completion Tokens", "type": "integer" } }, "required": [ "prompt_tokens", "completion_tokens" ], "title": "RequestUsage", "type": "object" }, "StopMessage": { "description": "A message requesting stop of a conversation.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "title": "Content", "type": "string" }, "type": { "const": "StopMessage", "default": "StopMessage", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "StopMessage", "type": "object" }, "TextMessage": { "description": "A text message.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "title": "Content", "type": "string" }, "type": { "const": "TextMessage", "default": "TextMessage", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "TextMessage", "type": "object" }, "ToolCallExecutionEvent": { "description": "An event signaling the execution of tool calls.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "items": { "$ref": "#/$defs/FunctionExecutionResult" }, "title": "Content", "type": "array" }, "type": { "const": "ToolCallExecutionEvent", "default": "ToolCallExecutionEvent", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "ToolCallExecutionEvent", "type": "object" }, "ToolCallRequestEvent": { "description": "An event signaling a request to use tools.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "items": { "$ref": "#/$defs/FunctionCall" }, "title": "Content", "type": "array" }, "type": { "const": "ToolCallRequestEvent", "default": "ToolCallRequestEvent", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "ToolCallRequestEvent", "type": "object" }, "ToolCallSummaryMessage": { "description": "A message signaling the summary of tool call results.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "title": "Content", "type": "string" }, "type": { "const": "ToolCallSummaryMessage", "default": "ToolCallSummaryMessage", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "ToolCallSummaryMessage", "type": "object" } } }
- Fields:
previous_speaker (str | None)
type (str)
- pydantic model SocietyOfMindAgentState[source]#
Bases:
BaseState
State for a Society of Mind agent.
Show JSON schema
{ "title": "SocietyOfMindAgentState", "description": "State for a Society of Mind agent.", "type": "object", "properties": { "type": { "default": "SocietyOfMindAgentState", "title": "Type", "type": "string" }, "version": { "default": "1.0.0", "title": "Version", "type": "string" }, "inner_team_state": { "title": "Inner Team State", "type": "object" } } }
- Fields:
inner_team_state (Mapping[str, Any])
type (str)
- pydantic model SwarmManagerState[source]#
Bases:
BaseGroupChatManagerState
State for
Swarm
manager.Show JSON schema
{ "title": "SwarmManagerState", "description": "State for :class:`~autogen_agentchat.teams.Swarm` manager.", "type": "object", "properties": { "type": { "default": "SwarmManagerState", "title": "Type", "type": "string" }, "version": { "default": "1.0.0", "title": "Version", "type": "string" }, "message_thread": { "items": { "discriminator": { "mapping": { "HandoffMessage": "#/$defs/HandoffMessage", "MultiModalMessage": "#/$defs/MultiModalMessage", "StopMessage": "#/$defs/StopMessage", "TextMessage": "#/$defs/TextMessage", "ToolCallExecutionEvent": "#/$defs/ToolCallExecutionEvent", "ToolCallRequestEvent": "#/$defs/ToolCallRequestEvent", "ToolCallSummaryMessage": "#/$defs/ToolCallSummaryMessage" }, "propertyName": "type" }, "oneOf": [ { "$ref": "#/$defs/ToolCallRequestEvent" }, { "$ref": "#/$defs/ToolCallExecutionEvent" }, { "$ref": "#/$defs/TextMessage" }, { "$ref": "#/$defs/MultiModalMessage" }, { "$ref": "#/$defs/StopMessage" }, { "$ref": "#/$defs/ToolCallSummaryMessage" }, { "$ref": "#/$defs/HandoffMessage" } ] }, "title": "Message Thread", "type": "array" }, "current_turn": { "default": 0, "title": "Current Turn", "type": "integer" }, "current_speaker": { "default": "", "title": "Current Speaker", "type": "string" } }, "$defs": { "FunctionCall": { "properties": { "id": { "title": "Id", "type": "string" }, "arguments": { "title": "Arguments", "type": "string" }, "name": { "title": "Name", "type": "string" } }, "required": [ "id", "arguments", "name" ], "title": "FunctionCall", "type": "object" }, "FunctionExecutionResult": { "properties": { "content": { "title": "Content", "type": "string" }, "call_id": { "title": "Call Id", "type": "string" } }, "required": [ "content", "call_id" ], "title": "FunctionExecutionResult", "type": "object" }, "HandoffMessage": { "description": "A message requesting handoff of a conversation to another agent.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "target": { "title": "Target", "type": "string" }, "content": { "title": "Content", "type": "string" }, "type": { "const": "HandoffMessage", "default": "HandoffMessage", "title": "Type", "type": "string" } }, "required": [ "source", "target", "content" ], "title": "HandoffMessage", "type": "object" }, "MultiModalMessage": { "description": "A multimodal message.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "items": { "anyOf": [ { "type": "string" }, {} ] }, "title": "Content", "type": "array" }, "type": { "const": "MultiModalMessage", "default": "MultiModalMessage", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "MultiModalMessage", "type": "object" }, "RequestUsage": { "properties": { "prompt_tokens": { "title": "Prompt Tokens", "type": "integer" }, "completion_tokens": { "title": "Completion Tokens", "type": "integer" } }, "required": [ "prompt_tokens", "completion_tokens" ], "title": "RequestUsage", "type": "object" }, "StopMessage": { "description": "A message requesting stop of a conversation.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "title": "Content", "type": "string" }, "type": { "const": "StopMessage", "default": "StopMessage", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "StopMessage", "type": "object" }, "TextMessage": { "description": "A text message.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "title": "Content", "type": "string" }, "type": { "const": "TextMessage", "default": "TextMessage", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "TextMessage", "type": "object" }, "ToolCallExecutionEvent": { "description": "An event signaling the execution of tool calls.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "items": { "$ref": "#/$defs/FunctionExecutionResult" }, "title": "Content", "type": "array" }, "type": { "const": "ToolCallExecutionEvent", "default": "ToolCallExecutionEvent", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "ToolCallExecutionEvent", "type": "object" }, "ToolCallRequestEvent": { "description": "An event signaling a request to use tools.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "items": { "$ref": "#/$defs/FunctionCall" }, "title": "Content", "type": "array" }, "type": { "const": "ToolCallRequestEvent", "default": "ToolCallRequestEvent", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "ToolCallRequestEvent", "type": "object" }, "ToolCallSummaryMessage": { "description": "A message signaling the summary of tool call results.", "properties": { "source": { "title": "Source", "type": "string" }, "models_usage": { "anyOf": [ { "$ref": "#/$defs/RequestUsage" }, { "type": "null" } ], "default": null }, "content": { "title": "Content", "type": "string" }, "type": { "const": "ToolCallSummaryMessage", "default": "ToolCallSummaryMessage", "title": "Type", "type": "string" } }, "required": [ "source", "content" ], "title": "ToolCallSummaryMessage", "type": "object" } } }
- Fields:
current_speaker (str)
type (str)
- pydantic model TeamState[source]#
Bases:
BaseState
State for a team of agents.
Show JSON schema
{ "title": "TeamState", "description": "State for a team of agents.", "type": "object", "properties": { "type": { "default": "TeamState", "title": "Type", "type": "string" }, "version": { "default": "1.0.0", "title": "Version", "type": "string" }, "agent_states": { "title": "Agent States", "type": "object" }, "team_id": { "default": "", "title": "Team Id", "type": "string" } } }
- Fields:
agent_states (Mapping[str, Any])
team_id (str)
type (str)