-
Notifications
You must be signed in to change notification settings - Fork 426
Copilot Studio agent handoff sample #416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mawasile
wants to merge
16
commits into
microsoft:main
Choose a base branch
from
mawasile:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+1,898
−0
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…g, and UI integration
…ve error handling and UI feedback for failed messages
… live chat messages
…d from Task to void; remove unused conversation manager field in CopilotStudioAgent
…sation handling; update ChatController and LiveChatService for new conversation flow; enhance frontend to display conversation ID and manage chat state.
…versationManager to support new mapping methods; modify CopilotStudioAgent and MsTeamsProactiveMessage to use ConversationMapping for proactive messaging.
…onfiguration; streamline API endpoints section and remove outdated features.
…low for Handover To Live Agent Sample
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new sample application,
ContosoLiveChatApp, which provides a mock live chat service for demonstrating handover scenarios with Copilot Studio. The app includes a REST API for managing chat conversations, message storage, and integration with Copilot Studio via webhooks. Additionally, a conversation mapping service is added to the Copilot Studio sample to manage conversation IDs between systems.The most important changes are:
ContosoLiveChatApp: Core Functionality
ContosoLiveChatApp, targeting .NET 9.0, with nullable reference types and implicit usings enabled (ContosoLiveChatApp.csproj).ChatControllerwith endpoints to start/end conversations, send/receive messages, and retrieve message history, supporting integration with Copilot Studio via webhooks (ChatController.cs).ChatStorageServicefor in-memory, thread-safe storage and retrieval of chat messages by conversation, including methods for conversation lifecycle management (ChatStorageService.cs).WebhookServiceto send outgoing chat messages to Copilot Studio using a configurable webhook URL, with detailed error handling and logging (WebhookService.cs).ChatMessagedata model to represent chat messages, including sender, timestamp, and conversation association (ChatMessage.cs).Configuration and Documentation
appsettings.jsonand updatedProgram.csto configure logging, allowed hosts, and the outgoing webhook URL; registered required services and set up the HTTP pipeline (appsettings.json,Program.cs). [1] [2]README.mdwith setup instructions, API documentation, and architecture diagrams for the new app (README.md).Copilot Studio Sample: Conversation Mapping
ConversationManagerandConversationMappingin the Copilot Studio sample to track and map conversation IDs between Copilot Studio and the live chat app, supporting upsert, retrieval, and removal of mappings (ConversationManager.cs).