AgentClient class
Client for SDK-specific Activity-protocol delegation over HTTP.
Remarks
Manages configuration, authentication, delegated conversation state, and Activity exchange with a target agent.
Constructors
| Agent |
Creates a new instance of the AgentClient class. |
Properties
| agent |
Configuration settings for the agent client |
Methods
| post |
Sends an activity to a delegated agent and stores the callback state. |
Constructor Details
AgentClient(string)
Creates a new instance of the AgentClient class.
new AgentClient(agentConfigKey: string)
Parameters
- agentConfigKey
-
string
The name of the agent, used to locate configuration in environment variables
Property Details
agentClientConfig
Configuration settings for the agent client
agentClientConfig: AgentClientConfig
Property Value
Method Details
postActivity(Activity, AuthConfiguration, ConversationState, TurnContext)
Sends an activity to a delegated agent and stores the callback state.
function postActivity(activity: Activity, authConfig: AuthConfiguration, conversationState: ConversationState, context: TurnContext): Promise<string>
Parameters
- activity
- Activity
The activity to send to the target agent
- authConfig
- AuthConfiguration
Authentication configuration used to obtain access tokens
- conversationState
- ConversationState
State manager to store conversation data
- context
- TurnContext
The current turn context
Returns
Promise<string>
A promise that resolves to the HTTP status text of the agent response