Skip to content

SessionStateDict

Dictionary Type

SessionStateDict

Bases: TypedDict

Dictionary form of SessionState.

Attributes

conversation_history instance-attribute
conversation_history: ConversationHistory | ConversationHistoryDict | None

The state's conversation history.

files instance-attribute
files: Sequence[InputFile | InputFileDict] | None

Contains information about the files used by code interpreter.

invocation_id instance-attribute
invocation_id: str | None

The identifier of the invocation of an action. This value must match the invocationId returned in the InvokeAgent response for the action whose results are provided in the returnControlInvocationResults field. For more information, see Return control to the agent developer and Control session context.

knowledge_base_configurations instance-attribute
knowledge_base_configurations: Sequence[KnowledgeBaseConfiguration | KnowledgeBaseConfigurationDict] | None

An array of configurations, each of which applies to a knowledge base attached to the agent.

prompt_session_attributes instance-attribute
prompt_session_attributes: Mapping[str, str] | None

Contains attributes that persist across a prompt and the values of those attributes.

  • In orchestration prompt template, these attributes replace the \(prompt_session_attributes\) placeholder variable. For more information, see Prompt template placeholder variables.

  • In multi-agent collaboration, the promptSessionAttributes will only be used by supervisor agent when \(prompt_session_attributes\) is present in prompt template.

return_control_invocation_results instance-attribute
return_control_invocation_results: Sequence[InvocationResultMember | InvocationResultMemberDict] | None

Contains information about the results from the action group invocation. For more information, see Return control to the agent developer and Control session context.

Note

If you include this field, the inputText field will be ignored.

session_attributes instance-attribute
session_attributes: Mapping[str, str] | None

Contains attributes that persist across a session and the values of those attributes. If sessionAttributes are passed to a supervisor agent in multi-agent collaboration, it will be forwarded to all agent collaborators.