A developer is writing the message loop for an app that talks to a Copilot Studio agent through the Copilot Studio client library in .NET. The agent sends a greeting when a conversation begins, and the user then asks several follow-up questions that rely on earlier context. In which order should the code exchange messages with the agent?
Select an answer to reveal the explanation.
Short Explanation
It's a phone call: you dial, hear 'hello', and then talk, and you don't hang up and redial between sentences. Start the conversation, read the greeting, then send questions on that same conversation. Redialing for every question loses the context your user is counting on.
Full Explanation
The client library models a conversation as a stream of activities. The code first starts the conversation, which in the .NET client is the StartConversationAsync method, and iterates over the activities the agent emits, such as the greeting. It then sends each user question on the same conversation, with AskQuestionAsync in the .NET client, and iterates over the returned activities, typically message activities that may include suggested actions. The client keeps the conversation identifier, so follow-up questions keep their context. Sending a question before a conversation exists has nothing to attach to, and the library does not create a conversation from a reply. Direct Line sockets and transcript tables belong to other integration paths; transcripts record history and are not a live reply channel. Starting a new conversation for every question discards the context that the follow-up questions depend on and replays the greeting each time. Exam caveat: responses arrive as activities, not a single string, so code should handle activity types rather than assume one text message. Operational check: log each activity type and text during a test, confirm one greeting before the first question, and confirm a follow-up question is answered using earlier context.