@microsoft/agents-copilotstudio-client package
Classes
| ConnectionSettings |
Represents the settings required to establish a connection to Copilot Studio. |
| CopilotStudioClient |
Client for interacting with Microsoft Copilot Studio services. Provides functionality to start conversations and send messages to Copilot Studio bots. |
| CopilotStudioWebChat |
A utility class that provides WebChat integration capabilities for Copilot Studio services. Example Basic WebChat Integration
Example Advanced Usage with Connection Monitoring
|
| ExecuteTurnRequest |
Represents a request to execute a turn in a conversation. This class encapsulates the activity to be executed during the turn. |
Interfaces
| CopilotStudioConnectionSettings |
Represents the settings required to establish a direct connection to the engine. |
| CopilotStudioWebChatConnection |
Represents a connection interface for integrating Copilot Studio with WebChat. |
| CopilotStudioWebChatSettings |
Configuration settings for the Copilot Studio WebChat connection. These settings control the behavior and appearance of the WebChat interface when connected to the Copilot Studio service. |
Enums
| AgentType |
Enum representing the type of agent. |
| PowerPlatformCloud |
Enum representing different Power Platform cloud environments. |
Functions
| get |
Generates the connection URL for Copilot Studio. |
| get |
Returns the Power Platform API Audience. |
| load |
Loads the connection settings for Copilot Studio from environment variables. |
Function Details
getCopilotStudioConnectionUrl(ConnectionSettings, string)
Generates the connection URL for Copilot Studio.
function getCopilotStudioConnectionUrl(settings: ConnectionSettings, conversationId?: string): string
Parameters
- settings
- ConnectionSettings
The connection settings.
- conversationId
-
string
Optional conversation ID.
Returns
string
The connection URL.
getTokenAudience(ConnectionSettings, PowerPlatformCloud, string, string)
Returns the Power Platform API Audience.
function getTokenAudience(settings?: ConnectionSettings, cloud?: PowerPlatformCloud, cloudBaseAddress?: string, directConnectUrl?: string): string
Parameters
- settings
- ConnectionSettings
Configuration Settings to use.
- cloud
- PowerPlatformCloud
Optional Power Platform Cloud Hosting Agent.
- cloudBaseAddress
-
string
Optional Power Platform API endpoint to use if Cloud is configured as "other".
- directConnectUrl
-
string
Optional DirectConnection URL to a given Copilot Studio agent, if provided all other settings are ignored.
Returns
string
The Power Platform Audience.
loadCopilotStudioConnectionSettingsFromEnv()
Loads the connection settings for Copilot Studio from environment variables.
function loadCopilotStudioConnectionSettingsFromEnv(): ConnectionSettings
Returns
The connection settings.