CopilotStudioAgentSession Class

Definition

Session for CopilotStudio based agents.

public sealed class CopilotStudioAgentSession : Microsoft.Agents.AI.AgentSession
type CopilotStudioAgentSession = class
    inherit AgentSession
Public NotInheritable Class CopilotStudioAgentSession
Inherits AgentSession
Inheritance
CopilotStudioAgentSession

Properties

Name Description
ConversationId

Gets the ID for the current conversation with the Copilot Studio agent.

StateBag

Gets any arbitrary state associated with this session.

(Inherited from AgentSession)

Methods

Name Description
GetService(Type, Object)

Asks the AgentSession for an object of the specified type serviceType.

(Inherited from AgentSession)
GetService<TService>(Object)

Asks the AgentSession for an object of type TService.

(Inherited from AgentSession)

Extension Methods

Name Description
SetInMemoryChatHistory(AgentSession, List<ChatMessage>, String, JsonSerializerOptions)

Sets the in-memory chat message history for the specified agent session, replacing any existing messages.

TryGetInMemoryChatHistory(AgentSession, List<ChatMessage>, String, JsonSerializerOptions)

Attempts to retrieve the in-memory chat history messages associated with the specified agent session, if the agent is storing memories in the session using the InMemoryChatHistoryProvider

Applies to