From AI-102 to AI-103: The Shift from Azure Cognitive Services to Agentic AI Engineering

Monday, April 13, 2026

Why Microsoft’s new AI certification is not an update — but a complete architectural reset for AI engineers

The AI engineering landscape inside Microsoft has fundamentally changed. We are no longer building applications by chaining APIs. We are building autonomous, tool-using, multimodal AI systems powered by agents, orchestration, and retrieval-augmented intelligence.


Official Microsoft References


Timeline: What Changed and When

  • AI-103 introduced: Late 2024 (rolled out across 2025)
  • AI-102 retired: April 30, 2025
  • Current status: AI-103 is now the primary certification path

This marks the official end of the Cognitive Services era.


The Real Shift: From Services → Agents

Old World (AI-102)

  • Computer Vision API
  • LUIS / QnA Maker
  • Text Analytics
  • Cognitive Search
  • Bot Framework

New World (AI-103)

  • AI Agents with reasoning capabilities
  • Tool-using workflows
  • Multimodal AI applications
  • RAG-based systems
  • Enterprise-grounded AI solutions

Core Architecture Shift

Microsoft Foundry

Foundry is now the core platform for AI development:

  • Agent orchestration
  • Tool integration
  • Memory and context handling
  • Evaluation pipelines
  • Safety and governance

Agentic AI Workloads

  • Planning multi-step tasks
  • Tool usage and orchestration
  • Memory management
  • Autonomous reasoning

Multimodal Intelligence

Unified models now handle text, images, and structured data together, replacing multiple legacy APIs.

Retrieval-Augmented Generation (RAG)

  • Embeddings and vector search
  • Knowledge grounding
  • Hallucination reduction
  • Enterprise data integration

AI-102 vs AI-103 Mapping

AI-102 (Legacy) AI-103 (Modern)
Cognitive APIs Foundry multimodal models
LUIS / QnA Maker Agent reasoning systems
Bot Framework Tool-using AI agents
Cognitive Search RAG pipelines
Static services Agentic orchestration

Legacy Service Transition

  • Computer Vision → Multimodal AI models
  • Face API → Deprecated
  • OCR → Unified document intelligence
  • LUIS → Generative language models
  • QnA Maker → RAG systems

AI-103 Labs Focus

  • Building AI agents
  • Tool integration
  • RAG pipelines
  • Multimodal processing
  • Evaluation frameworks
  • Production deployment

Preparation Roadmap

  1. Learn Foundry and agent concepts
  2. Master RAG architecture
  3. Build real-world AI agents
  4. Study evaluation and safety
  5. Practice hands-on labs




AI-103 Preparation Roadmap (Expanded Professional Guide)


This roadmap is designed for professionals transitioning from AI-102 (Azure Cognitive Services) to AI-103 (Agentic AI + Foundry-based architecture).


The goal is not just exam preparation — but building real-world AI engineering capability.


1. Learn Foundry and Agent Concepts (Foundation Layer)


Objective:

Understand the shift from traditional AI services to agent-based systems.


Key Concepts:


  • What is an AI Agent (beyond chatbots)
  • Agent lifecycle: plan → act → observe → refine
  • Tool calling and function execution
  • Memory systems (short-term vs long-term)
  • Orchestration vs single-model prompting
  • Multi-agent collaboration patterns




What to Focus On:



  • How Foundry-style platforms unify AI building blocks
  • Difference between:
    • Prompt-based apps
    • Agent-based systems




Practical Skills:



  • Designing a simple agent flow
  • Connecting tools (APIs, databases, search)
  • Defining system instructions and roles




Outcome:



You should be able to design an AI system that acts autonomously, not just responds to prompts.





2. Master RAG Architecture (Core Enterprise Skill)

Objective:


Learn how AI systems retrieve and ground knowledge from external data.


Key Concepts:



  • Embeddings and vector representations
  • Chunking strategies for documents
  • Vector databases (conceptual + practical use)
  • Retrieval pipeline design
  • Re-ranking and context optimization
  • Grounding responses to reduce hallucinations




Architecture Flow:



User Query → Embedding → Vector Search → Context Retrieval → LLM Response



Practical Skills:



  • Build a document Q&A system
  • Connect enterprise data sources
  • Tune retrieval accuracy
  • Optimize context window usage




Outcome:



You can build enterprise-grade knowledge assistants with reliable answers.





3. Build Real-World AI Agents (Hands-On Engineering)


Objective:



Move from theory to production-style AI systems.


Use Cases to Build:



  • IT support automation agent
  • Document processing agent
  • Multi-step decision assistant
  • Research + summarization agent
  • Workflow automation agent




Core Capabilities to Implement:



  • Tool usage (APIs, databases, web search)
  • Multi-step reasoning
  • Conditional logic and decision paths
  • Memory persistence
  • Error handling and fallback strategies




Advanced Skills:

  • Multi-agent collaboration (planner + executor model)
  • Dynamic tool selection
  • Task decomposition 


Outcome:


You can build autonomous AI systems that perform tasks, not just conversations.





4. Study Evaluation and Safety (Enterprise Readiness Layer)

Objective:


Ensure AI systems are reliable, safe, and production-ready.



Key Areas:




Model Evaluation:



  • Accuracy measurement
  • Response relevance scoring
  • Ground truth comparison
  • A/B testing prompts and flows


Safety Controls:



  • Content filtering
  • Prompt injection protection
  • Data leakage prevention
  • Hallucination detection




Governance:



  • Logging and traceability
  • Audit trails for AI decisions
  • Compliance considerations (enterprise AI)

Practical Skills:



  • Create evaluation datasets
  • Run structured testing of prompts/agents
  • Define safety rules and guardrails

Outcome:


You can deploy AI systems in real enterprise environments safety 


5. Practice Hands-On Labs (Exam + Real Skill Validation)


Objective:


Convert knowledge into exam readiness + real engineering capability.


What to Practice:

Agent Labs:

  • Build a tool-using AI agent
  • Implement multi-step reasoning workflows


RAG Labs:

  • Build document-based Q&A system
  • Improve retrieval accuracy




Multimodal Labs


  • Process text + images together
  • Extract structured insights from documents




Deployment Labs:



  • Package AI solution for production
  • Monitor and evaluate behavior


Recommended Practice Strategy:


  • 40% reading + theory
  • 60% hands-on implementation
  • Focus on building 2–3 complete end-to-end projects


 (What You Become After This Roadmap)

By following this roadmap, you transition into:


  • AI Engineer (Agentic Systems)
  • RAG Solution Architect
  • Enterprise AI Developer
  • Foundry-based AI System Designer



Key Insight

AI engineering is no longer about calling services. It is about designing intelligent systems that can reason, act, and adapt.

AI-103 represents Microsoft’s shift toward agentic AI, multimodal intelligence, and enterprise orchestration. It replaces the legacy Cognitive Services approach entirely.


Useful Links


Hashtags

#AIEngineering #AzureAI #GenerativeAI #AgenticAI #RAG #MachineLearning #MicrosoftAzure #AI103 #CloudComputing #ArtificialIntelligence

High Availability in AI Agent Architectures: Why Small Language Models Matter

Wednesday, April 8, 2026


Designing High Availability AI Architectures: Router Models, Circuit Breakers, and Hybrid Agents

Introduction

As AI agents evolve into mission-critical systems, their reliability becomes as important as their intelligence. In volatile regions—such as the Middle East, where war and instability disrupt data centers—high availability (HA) is essential. Large Language Models (LLMs) like GPT‑4, Claude, and Gemini are powerful but fragile when connectivity or GPU capacity is compromised. To mitigate this, enterprises are adopting router models and circuit breaker patterns that integrate Small Language Models (SLMs) for resilience, cost efficiency, and disaster recovery.


The Problem with LLM-Only Architectures

• Resource Intensive: LLMs require massive GPU clusters, memory, and energy.

• Single Point of Failure: Cloud outages or regional instability can cut off access.

• High Cost: Continuous reliance on LLMs drives up operational expenses.

• Latency: Routing all tasks through hyperscale providers slows response times.

 Router Models: The Traffic Controllers of AI

Router models act as intelligent gateways that decide whether a task should be handled by:

• A large model (e.g., GPT‑4, Gemini, Claude) for complex reasoning.

• A small model (e.g., Phi‑4, Gamma, Mistral) for lightweight tasks like routing, summarization, or basic Q& A.

Example Workflow



1. User Request → Router evaluates complexity.

2. Simple Task → Routed to SLM (Phi‑4 or Gamma).

3. Complex Task → Routed to LLM (GPT‑4 or Gemini).

4. Fallback Mode → If LLM unavailable, SLM executes basic version of task.

This ensures continuity even when cloud services fail.

Circuit Breaker Pattern

The circuit breaker prevents cascading failures when LLMs are unavailable:

• Closed State: Normal operation, requests routed to LLM.

• Open State: After repeated failures, requests rerouted to SLM.

• Half-Open State: Periodic retries to check if LLM is back online.

This pattern ensures agents don’t waste resources retrying unavailable services.

Retry Pattern

• Exponential Backoff: Retry failed LLM calls with increasing wait times.

• Fallback Execution: If retries fail, SLM executes a simplified workflow.

• Logging & Monitoring: Track failures for disaster recovery planning.

Cost Considerations

• LLMs (GPT‑4, Gemini Ultra, Claude Opus)• High GPU cost, energy-intensive.

• Best for reasoning-heavy tasks.

• Cloud-only deployment increases dependency risk.

• SLMs (Phi‑4, Gamma, Mistral, LLaMA variants)• Lightweight, edge-deployable.

• Lower operational cost, faster response.

• Ideal for routing, summarization, disaster recovery fallback.

Architecture Examples

• Gamma + GPT‑4 Hybrid• Gamma handles routing and basic Q&A locally.

• GPT‑4 executes complex reasoning tasks.

• Circuit breaker ensures Gamma takes over during outages.

• Phi‑4 Edge + Claude Cloud• Phi‑4 runs on enterprise servers for summarization and workflow orchestration.

• Claude handles advanced reasoning when connectivity is stable.

• Retry pattern ensures tasks are reattempted if Claude fails.

• Mistral + Gemini• Mistral deployed on edge for disaster recovery.

• Gemini used for large-scale automation in the cloud.

• Hybrid orchestration dynamically balances workloads.

 Strategic Implications

• Resilience in Conflict Zones: Edge-deployed SLMs guarantee continuity when cloud services are disrupted.

• Operational Efficiency: Offloading simple tasks to SLMs reduces cloud costs.

• Market Advantage: Hybrid architectures deliver agility, reliability, and trust in volatile

Here’s a detailed breakdown of the advantages of implementing local Small Language Models (SLMs) with Microsoft Foundry and AI Foundry, especially in a multi‑cloud architecture:

 Why Local SLMs with Microsoft Foundry?

1. Compliance & Regulatory Control

• Running SLMs locally ensures data residency and compliance with regional regulations (GDPR, NDMO in Saudi Arabia, UAE’s data laws).

• Sensitive workloads (government, defense, healthcare, finance) can remain on‑premises, reducing risk of data leakage to external clouds.

2. High Availability & Disaster Recovery

• Local SLMs act as fallback models when cloud LLMs (GPT‑4, Gemini, Claude) are unavailable due to outages, war, or connectivity issues.

• Microsoft Foundry provides orchestration tools to integrate circuit breaker and retry patterns, ensuring continuity of service

3. Cost Optimization

• Offloading simple tasks (routing, summarization, classification) to SLMs reduces cloud consumption costs.

• Enterprises avoid paying for expensive GPU cycles for tasks that don’t require advanced reasoning.

4. Performance & Latency

• Local execution ensures low‑latency responses, critical for real‑time compliance checks, routing, and automation.

• Edge deployment reduces dependency on global network routes.

5. Multi‑Cloud Flexibility

• Microsoft Foundry supports multi‑cloud orchestration, allowing enterprises to:• Use Azure for primary workloads.

• Failover to AWS, Google Cloud, or Anthropic when needed.

• Maintain vendor neutrality while still leveraging hyper scale-

 Example Architecture


Sample Use Cases

• Compliance Agencies• Local SLMs (Phi‑4, Gamma) handle regulatory checks, document classification, and summarization.

• Cloud LLMs (GPT‑4, Claude) handle advanced reasoning when permitted.

• Financial Institutions• Local SLMs ensure sensitive transaction data never leaves the premises.

• Cloud LLMs provide advanced analytics when compliance allows.

• Government & Defense• Local SLMs guarantee continuity during war or outages.

• Multi‑cloud architecture ensures redundancy across Azure, AWS, and Google Cloud.

Strategic Advantages

• Resilience: Local fallback ensures continuity in unstable regions.

• Compliance: Sensitive workloads remain within jurisdiction.

• Efficiency: Cost savings by routing simple tasks to SLMs.

• Flexibility: Multi‑cloud orchestration prevents vendor lock‑in.

• Scalability: Foundry enables seamless scaling across edge, local, and cloud deployments.


Great point—adding Microsoft Agent Service / SDK frameworks into this architecture strengthens the story because they provide the orchestration layer that ties together LLMs, SLMs, and multi‑cloud deployments. Let’s break it down:


Microsoft Agent Service & SDK Frameworks


Microsoft’s AI Foundry and Agent Service SDKs are designed to help enterprises build, deploy, and manage AI agents that can:


• Integrate multiple models (LLMs + SLMs).

• Use tool calling and workflow orchestration.

• Run across edge, on‑premises, and cloud environments.

• Enforce compliance, monitoring, and governance.


 How They Fit Into Router + Circuit Breaker Architecture


1. Router Models with Agent SDK


• The SDK provides APIs to evaluate task complexity and route requests.

• Example:• Simple task → Local SLM (Phi‑4, Gamma, Mistral).

• Complex task → Cloud LLM (GPT‑4, Gemini, Claude).

• Fallback mode → Circuit breaker reroutes to SLM if LLM unavailable.


2. Circuit Breaker Implementation


• Agent Service monitors health checks of cloud LLM endpoints.

• If repeated failures occur, the SDK automatically switches to local SLM.

• Half‑open state allows retry logic to test cloud availability before switching back.

3. Multi‑Cloud Orchestration

• Microsoft Foundry integrates with Azure, AWS, Google Cloud, Anthropic.

• Router + SDK ensures tasks can failover across providers.

• Enterprises avoid vendor lock‑in while maintaining resilience.

Advantages of Local SLMs with Microsoft Foundry

• Compliance: Sensitive workloads stay local, meeting regulatory requirements.

• Resilience: Edge SLMs ensure continuity during outages or war‑related disruptions.

• Cost Efficiency: Simple tasks offloaded to SLMs reduce GPU/cloud spend.

• Latency: Local execution delivers faster responses.

• Flexibility: SDK enables hybrid orchestration across multi‑cloud environments.


Example Architecture Diagram (Inspired by Microsoft AI Foundry)




 Sample Use Cases


• Compliance Agencies• Local SLMs classify documents and enforce rules.

• Cloud LLMs provide advanced reasoning when permitted.

• Financial Institutions• Local SLMs ensure sensitive transaction data never leaves premises.

• SDK orchestrates hybrid workflows with cloud LLMs for analytics.

• Government & Defense• Local SLMs guarantee continuity during war or outages.

• Multi‑cloud routing ensures redundancy across Azure, AWS, Google Cloud.

 Strategic Takeaway


By combining Local SLMs with Microsoft Foundry + Agent SDK frameworks, enterprises gain:


• Resilience through circuit breaker + retry patterns.

• Compliance by keeping sensitive workloads local.

• Efficiency by routing tasks intelligently.

• Flexibility with multi‑cloud orchestration.

This hybrid design is the future of AI agent architecture—intelligent, compliant, and survivable in volatile environments.



High-Level Summary: Framework for AI Adoption in Kingdom of Saudi Arabia (KSA) by SDAIA

Thursday, October 2, 2025

Overview of the Framework


The document, issued by SDAIA (Saudi Data and AI Authority), outlines a comprehensive national strategy for adopting Artificial Intelligence (AI) across Saudi institutions. It aligns with Vision 2030 and aims to position Saudi Arabia as a global leader in AI.




        Strategic Alignment

  • The framework is deeply integrated with Saudi Vision 2030, emphasizing digital transformation, economic diversification, and innovation.
  • SDAIA is designated as the national authority for AI and data governance, per Cabinet Resolution No. 292.

      Goals of the Framework



  • Accelerate AI adoption in government and private sectors.
  • Build a sustainable and integrated institutional and technical environment.
  • Support initiatives aligned with national priorities.
  • Enhance governance and human capital development.

 



📌 Purpose & Vision

  • The framework is designed to accelerate smart transformation across public and private sectors.
  • It aligns with Vision 2030 and the National Strategy for Data & AI (NSDAI).
  • SDAIA serves as the national authority for AI governance, ethics, and implementation.

🧭 Strategic Objectives

  • Enable effective, safe, and sustainable AI adoption.
  • Provide a roadmap for planning, executing, and evaluating AI initiatives.
  • Support institutional performance, service quality, and resource sustainability.

🏛️ Framework Structure: Three Pillars

  1. Directions

    • Vision, goals, governance, initiative quality, and compliance.
  2. Enablers

    • Human capabilities, technical infrastructure, data quality, and AI models.
  3. Outcomes

    • Improved institutional performance, cost reduction, and enhanced service delivery.

🛠️ Implementation Guidelines

  • Short-Term (1–2 years): Automate operations, improve efficiency.
  • Mid-Term (3–5 years): Expand AI use, develop skills, support innovation.
  • Long-Term (>5 years): Deploy autonomous systems and advanced technologies.

🧠 AI Technologies Covered

  • Machine Learning (Supervised, Unsupervised, Reinforcement)
  • Deep Learning
  • Natural Language Processing (NLP)
  • Computer Vision
  • Generative AI
  • Smart Robotics

📊 Performance & Governance

  • Establish internal AI offices and supervisory units.
  • Align with SDAIA’s ethical and legal standards (e.g., PDPL).
  • Monitor adoption rates, model accuracy, and ROI.

👥 Human Capital Development

  • Build AI teams and promote continuous learning.
  • Collaborate with universities and training programs.
  • Encourage diversity and professional growth.

🗂️ Data Infrastructure

  • Ensure high-quality, secure, and accessible data.
  • Use automated validation and role-based access control.
  • Comply with national data protection laws.

🧩 Applications & Impact

  • Use AI for personalization, fraud detection, predictive analytics.
  • Improve employee productivity and service quality.
  • Achieve operational savings and strategic transformation.

Key AI Initiatives in Saudi Arabia

Saudi Arabia is rapidly positioning itself as a global AI leader through Vision 2030. Major initiatives include:

1. Project Transcendence

  • A $100 billion AI initiative aimed at building a robust AI ecosystem.
  • Focuses on data centers, startups, talent development, and partnerships with global tech firms like Google. [Saudi Arab...lobal tech]

2. National Strategy for Data & AI (NSDAI)

  • Led by SDAIA, the strategy aims to make Saudi Arabia a global hub for AI by 2030.
  • Goals include:
    • Ranking among the top 15 countries in AI.
    • Training over 20,000 AI specialists.
    • Attracting ~75 billion SAR in AI investments. [National S...aia.gov.sa]

3. NEOM Smart City

  • NEOM integrates AI into urban infrastructure, energy, and mobility.
  • Hosts AI research centers and pilot programs with companies like Oracle and Kia. [Saudi Arab...I Strategy]

4. Healthcare AI Initiatives

  • AI is being used to address rising chronic diseases and cancer rates.
  • Programs like Seha Virtual Hospital and Mawid use AI for diagnostics and remote care. [Saudi Arab...are Demand]

5. AI in Transportation

  • Electric bus systems and smart mobility solutions are being deployed in cities like Riyadh and NEOM. [Saudi Arab...ies, 2030F]

6. Generative AI Development

  • Institutions like KAUST and KACST are pioneering generative AI research.
  • Focus on Arabic-language models and creative applicatio


Source
https://sdaia.gov.sa/en/SDAIA/about/Files/AIAdoptionFramework.pdf

Revolutionizing AI Development: Model Context Protocol (MCP) Unveiled in Azure AI Foundry

Sunday, April 20, 2025

Reimagining AI Integration: The Power of MCP



Imagine a universal connector for AI applications—just like USB-C simplifies hardware connections, the Model Context Protocol (MCP) is revolutionizing how large language models (LLMs) interact with tools, data, and applications. MCP is an open protocol that simplifies the process of delivering context to LLMs, empowering developers to build powerful, intelligent agent-based solutions.

The concept of MCP originated from the challenges developers faced when building context-aware AI agents on top of large language models (LLMs) like GPT, Claude, or Gemini. These LLMs are stateless by design, meaning they don’t retain memory between interactions unless you provide that memory explicitly.

To solve this, Microsoft and the Azure SDK team introduced the Model Context Protocol, a vendor-agnostic open standard designed to manage and structure the context AI models receive from external tools and data sources.

 Why Choose MCP?

MCP is purpose-built for developing intelligent agents and orchestrating complex workflows on top of LLMs. These AI models often need to interface with external data and services, and MCP provides a standardized way to make that integration seamless. Key benefits include:

  • 🔌 Plug-and-play integrations: An expanding library of pre-built connections that LLMs can access out of the box.

  • Cross-platform compatibility: Avoids being locked into a single AI provider by offering flexible backend switching.

  • Secure by design: Encourages implementation of best practices for data protection within enterprise environments.


⚙️ Core Components of MCP

MCP changes how models manage and retrieve context, boosting their accuracy and conversational coherence. It introduces a structured framework with the following core elements:

  • Context Repository – Centralized storage for past interactions, queries, and AI outputs.

  • Dynamic Context Injection – Inserts relevant context during runtime to improve AI understanding.

  • Protocol Standardization – Ensures all contextual data is processed uniformly and accurately.

  • Adaptive Query Processing – Learns from previous interactions to tailor responses more precisely.

    At its core, MCP follows a client-server architecture:​

    MCP Hosts: Applications like Claude Desktop or IDEs that want to access data through MCP.​

    MCP Clients: Protocol clients maintaining 1:1 connections with servers.​

    MCP Servers: Lightweight programs exposing specific capabilities through the standardized 

 MCP vs. Traditional RAG




While Retrieval-Augmented Generation (RAG) helps LLMs pull in external information, MCP elevates the approach by wrapping it in a smart context-management layer. Here's how it expands upon RAG:

  • Structures retrieved data into meaningful, persistent context

  • Introduces consistent communication protocols across sessions

  • Minimizes hallucinations with better historical awareness

  • Enables more nuanced and accurate responses through contextual refinement





In short, MCP transforms RAG into a system that not only retrieves information but sustains relevance across ongoing conversations.


MCP in Action: Azure MCP Server

Microsoft’s Azure MCP Server, now in public preview, brings MCP to life. It acts as a smart interface between AI agents and Azure’s cloud services, making it easier to:

  • Query data in Azure Cosmos DB

  • Read/write files in Azure Storage

  • Analyze system logs using Azure Monitor (KQL)

  • Manage settings through Azure App Configuration

  • Execute commands using Azure CLI

With just one command, developers can spin up the Azure MCP Server:

bash
npx -y @azure/mcp@latest server start

This sets up a robust backend that’s ready to handle interactions from any MCP-compliant AI agent.


MCP in Action: Azure AI Foundry

Enhanced Capabilities with MCP.

 MCP in Action: Azure AI Foundry

Microsoft's Azure AI Foundry showcases how MCP isn't just theory—it’s a practical, production-ready approach to enhancing AI experiences across enterprise applications. Azure AI Foundry leverages the Model Context Protocol to bring together large language models, business data, and cloud services into a cohesive, intelligent system.

By embedding MCP into Azure AI Foundry, Microsoft enables organizations to:

  • Supercharge AI Search
    Enterprise users can conduct intelligent searches across internal knowledge bases, file systems, and documentation. Thanks to MCP, these searches remain context-aware—tracking the history of what was asked before and refining answers accordingly.

  •  Build Smarter Virtual Assistants
    MCP makes it possible for virtual agents to maintain ongoing memory of a conversation. Whether it's a support bot, a sales assistant, or an internal service desk, Azure AI Foundry uses MCP to keep interactions fluid, relevant, and consistent across sessions.

  •  Improve Decision-Making
    By integrating with internal databases and telemetry sources, Foundry-enabled agents can analyze real-time operational data and provide actionable insights—helping decision-makers move from raw data to smart recommendations faster.

  •  Seamless Knowledge Base Integration
    With MCP’s structured approach, AI agents can easily connect to CRMs, wikis, ticketing systems, and document repositories—dynamically injecting relevant content during user interactions.

  •  Enhance RAG Workflows
    Azure AI Foundry builds on traditional Retrieval-Augmented Generation (RAG) models, using MCP to structure and persist retrieved data, ensuring conversations maintain continuity and context over time.

Collaborating with Semantic Kernel

For developers, MCP aligns perfectly with Semantic Kernel, Microsoft's open-source framework for integrating AI models with various data sources., developers can unlock the full potential of MCP for their projects.



Working with Semantic Kernel

MCP is fully compatible with Semantic Kernel, Microsoft’s open-source SDK designed to integrate AI models with real-world data sources. This synergy enables developers to build more intelligent, context-aware applications quickly.

Developers can use Semantic Kernel to extend MCP’s capabilities even further—whether for enterprise chatbots, intelligent assistants, or workflow automation solutions.


Example: Integrating MCP Server with Semantic Kernel

Scenario: Query Processing Workflow

A developer wants to create an AI agent that interacts with multiple data sources, such as a local database, APIs, and file systems, using Semantic Kernel and the MCP Server.

Steps:

  1. MCP Configuration Begin by setting up the MCP Server to act as an intermediary for context handling. The server manages connections to various data sources.

json
{
    "MCPServer": {
        "DataSources": [
            { "Type": "LocalDatabase", "Connection": "db_connection_string" },
            { "Type": "API", "Endpoint": "https://api.example.com" },
            { "Type": "FileSystem", "Path": "/user/files" }
        ]
    }
}
  1. Semantic Kernel Code

Using Semantic Kernel, you create a skill that interacts with the MCP Server:

python
from semantic_kernel import SemanticKernel
from mcp_client import MCPClient

# Initialize MCP Client
mcp_client = MCPClient(server_url="http://localhost:8000")

# Initialize Semantic Kernel
kernel = SemanticKernel()

# Define Skill for MCP Query
def query_mcp_skill(context):
    query = context["query"]
    response = mcp_client.query(query)
    return response

# Register Skill
kernel.register_skill("QueryMCP", query_mcp_skill)

# Execute Skill
input_context = {"query": "Retrieve latest sales data"}
result = kernel.execute_skill("QueryMCP", input_context)

print(result)  # Outputs data retrieved via MCP Server
  1. Dynamic Context Injection Semantic Kernel can dynamically inject context into the query based on user interaction history:

python
def dynamic_context_skill(context):
    user_history = context["history"]
    context["query"] = f"{context['query']} based on {user_history}"
    return context["query"]

kernel.register_skill("DynamicContext", dynamic_context_skill)
  1. Using Semantic Kernel with MCP Tools Microsoft provides detailed guides for using Semantic Kernel with MCP tools to streamline workflows. This allows developers to:

  • Fetch relevant context from MCP Server.

  • Enable dynamic skill chaining for complex workflows.

  • Maintain context-awareness across interactions.

Ref: https://devblogs.microsoft.com/azure-sdk/introducing-the-azure-mcp-server/