This repository contains demo samples showcasing various agentic AI implementations using C#, TypeScript, Angular, and other technologies. The samples demonstrate building AI agents, orchestration patterns, multi-agent systems, and integration with different frameworks.
- Agent Framework Sample
- Agent Orchestration
- Semantic Kernel
- Banking Multi-Agent System (MAS)
- Customer Service Agent
- GitHub Copilot SDK
- Model Context Protocol (MCP)
- Getting Started
- Contributing
- License
Demonstrates the usage of Microsoft Agents AI framework for building AI agents with Azure OpenAI integration. This sample includes multiple agent implementations and a shared helper library for common agent creation patterns.
Basic agent implementation demonstrating fundamental agent creation patterns with joke-telling capabilities.
Key Features:
- Agent creation using
Microsoft.Agents.AIframework - Azure OpenAI integration with AzureKeyCredential authentication
- Configurable agent instructions, names, and descriptions
- Multimodal content processing (text and images via URI)
- Simple conversational interactions
Specialized agent for image analysis and description using multimodal AI capabilities.
Key Features:
- Image understanding and description
- Multimodal content processing with vision capabilities
- Utilizes shared
AgentHelperlibrary for consistent agent creation - Azure OpenAI vision model integration
Demonstrates multi-turn conversation capabilities with thread management for maintaining conversation context across multiple interactions.
Key Features:
- Multi-turn dialogue support with conversation threads
- Thread management using
GetNewThread()for maintaining conversation context - Contextual responses based on previous conversation history
- Utilizes shared
AgentHelperlibrary for agent creation - Support for complex, sequential interactions (e.g., recipe creation followed by modifications)
Demonstrates function calling and tool integration capabilities, showing how agents can invoke custom functions to extend their capabilities beyond language generation.
Key Features:
- Function calling using
AIFunctionFactoryto register custom tools - Tool integration with agent via function descriptors
- Custom tool implementation (WeatherTool example)
- Component model attribute-based function descriptions for LLM understanding
- Automatic tool invocation based on user queries
- Utilizes shared
AgentHelperlibrary with tool support
Demonstrates function calling with human approval before executing tools, implementing a human-in-the-loop pattern for sensitive or important operations.
Key Features:
- Human approval workflow for function execution
ApprovalRequiredAIFunctionwrapper for tool safety- Function approval request handling
- Support for both
FunctionApprovalRequestContentandUserInputRequestContent - Interactive approval prompts with user confirmation
- Safe fallback handling when no approval is requested
- Reflection-based approval response creation for flexibility
Demonstrates how to use an agent as a tool for another agent, creating agent composition and delegation patterns. This sample shows how one agent can invoke another agent as a function/tool to extend its capabilities.
Key Features:
- Agent composition using
AsAIFunction()extension method - Agent delegation patterns where one agent calls another
- Nested agent invocation and result processing
- Tool integration with agents as callable functions
- Example: Main agent with a specialized agent as a tool that responds in Hindi
- Utilizes shared
AgentHelperlibrary for consistent agent creation - Demonstrates language-specific agent delegation
Demonstrates how to enable observability and telemetry in agents using OpenTelemetry for monitoring, tracing, and debugging agent behavior.
Key Features:
- OpenTelemetry integration for agent monitoring
- Console-based trace exporter for real-time observability
- TracerProvider configuration with custom source names
- Agent builder pattern with
UseOpenTelemetry()middleware - Detailed logs and metrics for agent actions
- Tracing of agent execution flow and performance
- Support for distributed tracing in multi-agent scenarios
- Production-ready observability patterns
Technology Stack:
- OpenTelemetry (v1.15.0)
- OpenTelemetry.Exporter.Console (v1.15.0)
- Microsoft.Agents.AI framework
Demonstrates generating structured JSON responses from agents using JSON schema validation and deserialization.
Key Features:
- JSON schema generation using
AIJsonUtilities.CreateJsonSchema() - Structured output with
ChatResponseFormat.ForJsonSchema() - Schema-based response validation
- Type-safe deserialization of agent responses
- Support for complex types (Employee model with Name, Age, Position, Level)
- Robust JSON extraction from multiple content formats (JsonElement, JsonDocument, string)
- Error handling for malformed JSON responses
Demonstrates various agent orchestration patterns using Microsoft Semantic Kernel. These samples show how to coordinate multiple agents to work together effectively.
Shows how to run multiple agents in sequence, where each agent processes the output of the previous agent.
Demonstrates running multiple agents in parallel to process tasks simultaneously and improve performance.
Implements a group chat pattern where multiple agents collaborate and communicate with each other to solve complex tasks.
Shows how to implement agent handoff patterns where one agent can transfer control to another specialized agent based on context.
Demonstrates the usage of Microsoft Semantic Kernel framework for building AI agents with Azure OpenAI service integration.
The samples are based on the MS learning path
Key Features:
- Simple Call - Basic LLM invocation
- Plugin Call - Using plugins to extend agent capabilities
- Prompt Template - Working with prompt templates
- Custom Prompt - Creating custom prompts
- Persona Prompt - Implementing persona-based agents
- Save to File - Persisting results
A comprehensive demo of multi-agent system implementation for a banking scenario. This implements a loan application scenario demonstrating how various agents collaborate for credit checks, policy validation, and account verification.
Key Features:
- Distributed multi-agent system architecture
- Azure Service Bus Topic-based communication
- Specialized agents: Credit Agent, Policy Agent, Accounting Agent, Invoice Agent, Payment Agent, Approval Agent
- RAG (Retrieval-Augmented Generation) engine integration
- Banking service integration
Architecture Components:
- Agent Registry
- AI Core Services
- Banking Plugins
- Common Agent Framework
- Core Banking Services
Demonstrates a banking customer service agent implementation using Semantic Kernel with document-based knowledge retrieval and vector search capabilities.
Key Features:
- Banking domain-specific agent
- Document record processing
- Vector database integration
- Custom plugins for banking operations
- Knowledge retrieval services
Install and authenticate the GitHub Copilot CLI to experiment with Copilot from the terminal. For the latest installation instructions and releases see the official repo: https://github.com/github/copilot-cli.
Common installation options:
- Prerequisite: install GitHub CLI (
gh) — https://cli.github.com/ - Install via
ghextension (recommended when available):gh extension install github/copilot-cli
- macOS (Homebrew):
brew install --cask github/copilot-cli
- Windows (winget):
winget install --id GitHub.Copilot.CLI
After installing, authenticate your CLI:
copilot auth login(opens browser to complete GitHub authentication)
Quick validation:
copilot --versioncopilot --help
Note: exact package names or commands may change; consult the official repo linked above when in doubt.
Quick Start — Copilot CLI Usage Examples
Start an interactive chat session:
copilot chat
Ask for a short explanation or code transformation directly:
copilot chat "Explain the following C# code: var x = items.Where(i => i.IsActive);
Generate a code snippet or refactor using a one-shot command:
copilot complete --language csharp --prompt "Create a method to validate email addresses"
Demonstrates the usage of the GitHub Copilot SDK for building AI agents using the official GitHub Copilot SDK package. This sample shows how to create a simple agent that interacts with GitHub Copilot's language models.
Key Features:
- GitHub Copilot SDK integration using
GitHub.Copilot.SDKNuGet package - Simple agent creation with
CopilotClient - Session-based conversation management
- Event-driven message handling
- Support for GPT-4.1 and other models
- Asynchronous message processing
Technology Stack:
- .NET 10.0
- GitHub.Copilot.SDK (v0.1.18)
Demonstrates the implementation of Model Context Protocol with C# using the ModelContextProtocol NuGet package. MCP enables connecting with variety of data sources and exposing them as standardized tools for AI agents.
A foundational demo showing how to create a Banking service and expose its operations as tools through an MCP Server.
Key Features:
- Banking service with REST API operations
- MCP Server hosted on ASP.NET Core
- .NET Console Client using ModelContextProtocol library
- Tool discovery and invocation
- Server-client communication
Shows how to integrate MCP tools with Azure OpenAI's ChatCompletion APIs for LLM-based tool calling.
Key Features:
- MCP tool integration with Azure OpenAI
- Tool calling feature of LLM
- Chat completion with function calling
- Automatic tool invocation based on user queries
Demonstrates how to convert MCP tools into Semantic Kernel plugins for seamless integration with the SK framework.
Key Features:
- MCP tool discovery and registration
- Dynamic Semantic Kernel plugin creation
- Azure OpenAI LLM integration via Semantic Kernel
- Unified plugin architecture for MCP tools
- .NET 8.0 SDK or later
- Azure OpenAI Service access
- Azure subscription (for some samples)
- Visual Studio 2022 or VS Code
Most samples require configuration settings in AppSetting.cs or appsettings.json:
- Azure OpenAI endpoint
- API key or Azure credentials
- Deployment name
- Other service-specific settings
Each sample project includes a solution file (.sln) and can be run independently:
# Navigate to the project directory
cd src/<ProjectName>
# Build the solution
dotnet build
# Run the project
dotnet run --project <ProjectName>Contributions are welcome! Please feel free to submit issues and pull requests.
See the LICENSE file for details.