[Sample] Add Microsoft.Maui.Essentials.AI sample app with multi-agent workflow#33610
Merged
mattleibow merged 1 commit intomainfrom Feb 9, 2026
Merged
[Sample] Add Microsoft.Maui.Essentials.AI sample app with multi-agent workflow#33610mattleibow merged 1 commit intomainfrom
mattleibow merged 1 commit intomainfrom
Conversation
f8d09df to
76a7e93
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces the Essentials.AI.Sample application demonstrating advanced AI integration patterns with .NET MAUI. The PR includes a trip planner sample showcasing multi-agent workflows, RAG, streaming responses, and structured output generation, along with comprehensive test infrastructure.
Changes:
- Adds new AI sample application with multi-agent trip planning workflow
- Introduces library skeleton for Microsoft.Maui.Essentials.AI
- Adds extensive unit tests for streaming JSON deserialization, JSON merging, and buffered chat clients
- Modifies build system to use XcodeProject instead of pre-built .xcframework.zip for Apple platforms
- Includes comprehensive test data files with real AI response streams
Reviewed changes
Copilot reviewed 201 out of 251 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/PublicAPI.targets | Enables automatic PublicAPI generation in Debug mode |
| src/Core/src/Core.csproj | Switches from NativeReference to XcodeProject for Apple bindings |
| src/AppleBindings.targets | New shared build logic for Apple XcodeProject items with CI support |
| src/Core/AppleNative/PlatformInterop/build-xcframework.sh | Removed (replaced by XcodeProject build) |
| src/Core/AppleNative/PlatformInterop/MauiPlatformInterop.xcframework.zip | Removed |
| src/AI/tests/Essentials.AI.UnitTests/Tests/* | Comprehensive unit tests for streaming utilities |
| src/AI/tests/Essentials.AI.UnitTests/TestData/* | Test data with real AI streaming responses |
| src/AI/tests/Essentials.AI.UnitTests/TestHelpers/* | Test helper utilities |
| src/AI/tests/Essentials.AI.UnitTests/Models/Location.cs | Simple location model for tests |
| src/AI/tests/Essentials.AI.DeviceTests/Resources/appicon.svg | Device test app icon |
76a7e93 to
d44d3ae
Compare
Member
Author
|
/azp run maui-pr-devicetests |
Member
Author
|
/azp run maui-pr-uitests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
1 similar comment
|
Azure Pipelines successfully started running 1 pipeline(s). |
This was referenced Feb 3, 2026
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
This was referenced Feb 4, 2026
kubaflo
approved these changes
Feb 6, 2026
… workflow Introduces the Essentials.AI module with a Trip Planner sample demonstrating production-ready AI integration patterns using Microsoft.Extensions.AI and Microsoft.Agents.AI. Sample Application (Essentials.AI.Sample): - 4-agent workflow: TravelPlanner → Researcher → ItineraryPlanner → Translator - RAG with embedding-based semantic search for destination matching - Streaming JSON responses with partial deserialization for progressive UI - Function calling (findPointsOfInterest tool) and structured JSON output - Conditional translation branching for non-English requests Services & Utilities: - StreamingJsonDeserializer, JsonMerger, BufferedChatClient - DataService (landmarks + embeddings), TaggingService, ItineraryService Library Skeleton (Essentials.AI): - Multi-platform TFM support with PublicAPI tracking - Foundation for future Apple Intelligence, Windows Copilot, Gemini Nano Test Infrastructure: - Unit tests: JSON streaming, merging, buffering (real AI response data) - Device tests: Reusable IChatClient/IEmbeddingGenerator base classes - Benchmarks: BenchmarkDotNet infrastructure
2850d84 to
334e1c0
Compare
This was referenced Feb 12, 2026
Merged
This was referenced Feb 18, 2026
Closed
Closed
Open
Closed
Closed
Open
This was referenced Feb 25, 2026
evgenygunko
pushed a commit
to evgenygunko/CopyWordsDA
that referenced
this pull request
Feb 28, 2026
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [Microsoft.Extensions.Logging.Debug](https://dot.net/) ([source](https://github.com/dotnet/dotnet)) | nuget | patch | `10.0.2` -> `10.0.3` | | [Microsoft.Maui.Controls](https://github.com/dotnet/maui) | nuget | patch | `10.0.31` -> `10.0.41` | --- ### Release Notes <details> <summary>dotnet/maui (Microsoft.Maui.Controls)</summary> ### [`v10.0.41`](https://github.com/dotnet/maui/releases/tag/10.0.41): SR4.1 [Compare Source](dotnet/maui@10.0.40...10.0.41) #### What's Changed - \[release/10.0.1xx-sr4] Revert "Remove InternalsVisibleTo attributes for .NET MAUI Community … by [@​github-actions](https://github.com/github-actions)\[bot] in dotnet/maui#34052 - Increment patch version from 40 to 41 by [@​PureWeen](https://github.com/PureWeen) in dotnet/maui#34059 **Full Changelog**: dotnet/maui@10.0.40...10.0.41 ### [`v10.0.40`](https://github.com/dotnet/maui/releases/tag/10.0.40): SR4 [Compare Source](dotnet/maui@10.0.31...10.0.40) #### What's Changed .NET MAUI 10.0.40 introduces significant improvements across all platforms with focus on quality, performance, and developer experience. This release includes 143 commits with various improvements, bug fixes, and enhancements. #### AI - Improve write-tests-agent with best practices by [@​sheiksyedm](https://github.com/sheiksyedm) in dotnet/maui#33860 - \[Sample] Add Microsoft.Maui.Essentials.AI sample app with multi-agent workflow by [@​mattleibow](https://github.com/mattleibow) in dotnet/maui#33610 #### Ai Agents - Add FileLoggingProvider for MacCatalyst UI test logging by [@​PureWeen](https://github.com/PureWeen) in dotnet/maui#33518 - Improve verify-tests-fail-without-fix Skill by [@​kubaflo](https://github.com/kubaflo) in dotnet/maui#33513 - Add find-reviewable-pr skill from existing PR by [@​PureWeen](https://github.com/PureWeen) via [@​Copilot](https://github.com/Copilot) in dotnet/maui#33349 - Add learn-from-pr agent and enhance skills framework structure by [@​PureWeen](https://github.com/PureWeen) via [@​Copilot](https://github.com/Copilot) in dotnet/maui#33579 - Fix PS1 scripts for Windows compatibility by [@​PureWeen](https://github.com/PureWeen) in dotnet/maui#33679 - Improve skills and scripts for better agent workflows by [@​PureWeen](https://github.com/PureWeen) in dotnet/maui#33699 - \[XEXPR] Refactor test skills/agents to dispatcher pattern by [@​PureWeen](https://github.com/PureWeen) via [@​Copilot](https://github.com/Copilot) in https://github.com/dot...
This was referenced Mar 1, 2026
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
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.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Description
This PR introduces the Essentials.AI.Sample application, a comprehensive demonstration of integrating AI capabilities into .NET MAUI applications using Microsoft.Extensions.AI abstractions. The sample showcases advanced AI patterns including multi-agent workflows, RAG (Retrieval-Augmented Generation), streaming responses, and structured output generation.
What's Added
Sample Application: Trip Planner
A cross-platform travel itinerary generator that demonstrates production-ready AI integration patterns:
IAsyncEnumerable<T>for progressive UI updatesChatResponseFormat.ForJsonSchema<T>()for typed responsesAIFunctiontool for POI discoveryAgent Workflow Architecture
Services and Utilities
StreamingJsonDeserializerJsonMergerBufferedChatClientNonFunctionInvokingChatClientDataServiceTaggingServiceItineraryServiceTest Infrastructure
IChatClientandIEmbeddingGeneratorimplementationsStreamingJsonDeserializer,JsonMerger,BufferedChatClient,NonFunctionInvokingChatClientTest coverage includes:
Library Skeleton (Microsoft.Maui.Essentials.AI)
This PR establishes the project structure for the Essentials.AI library:
Setup Requirements
The sample requires Azure OpenAI credentials configured via user secrets:
{ "AI": { "DeploymentName": "<chat-model-deployment>", "EmbeddingDeploymentName": "<embedding-model-deployment>", "Endpoint": "<azure-openai-endpoint>", "ApiKey": "<azure-openai-api-key>" } }See
src/AI/samples/Essentials.AI.Sample/README.mdfor detailed setup instructions.Key AI Patterns Demonstrated
AIAgentfor clean invocationChatResponseFormat.ForJsonSchema<T>()enforces C# record typesAIFunctionFactory.Create()defines thefindPointsOfInteresttoolRunStreamingAsync()to emit partial JSON progressivelyStreamingJsonDeserializershows progressive updates from incomplete JSONDependencies Added
Microsoft.Extensions.AIIChatClient,IEmbeddingGenerator)Microsoft.Extensions.AI.AbstractionsMicrosoft.Agents.AIOpenAIFuture Work
This PR establishes the foundation. Subsequent PRs will add:
AppleIntelligenceChatClient,NLEmbeddingGenerator)PhiSilicaChatClient,PhiSilicaEmbeddingGenerator)GeminiNanoChatClient)These on-device implementations will allow the sample to run with local models instead of cloud services.