Agentic Table of Contents (so far)

1 RAG – A quick example

2 RAG in detail

3 Deeper into RAG

4 The R in RAG

5 PEAS for Agentic AI

6 AI Reasoning and Planning

7 REACT and Agents in AI

8 Creating a multi-agent system (Python & LangChain/LangGraph) part 1 of 6

14 Migrating Agentic Code Python -> C# Part 1 of 6

20 Dependency Injection & Microsoft Agentic Framework

21 Migrating C# to Microsoft Agentic Framework

22 Transparency in Agentics

23 Ensuring Agent Safety

24 Logging & OpenTelemetry in Microsoft Agentic Framework

25 Activity Source in Microsoft Agentic Framework

26 Middleware in Microsoft Agentic Framework

27 Limit token usage in Microsoft Agentic Framework

28 Using OpenTelemetry in Microsoft Agent Framework

29 LangChain/LangGraph vs. Microsoft Agent Framework

30 Long term memory in Microsoft Agent Framework

31 Agent vs ChatClient Middleware

32 Managing Secrets

33 Microsoft Agent Framework and Foundry

34 Agent Memory for .NET

35 About Neo4j

36 Reducing Token Usage

37 Deploying Microsoft Agent Framework applications to Foundry

38 Copilot Harness and Microsoft Agent Framework

39 GitHub SpecKit

40RAG in Microsoft Agent Framework

41 Executors and Edges

42 Deploying a Microsoft Agent Framework application to Foundry

43 Implementing the Move to Foundry

44 Agent Skills 101

45 Microsoft Tenants

46 Microsoft Agent Framework Deep Dive Podcast

47 Copilot Review

48 Session State

49 Human In The Loop

50 Spec-Driven Development

51 Adding Cosmos with Spec Kit and Copilot

52 Creating A Front End with Spec Kit and Copilot

53 SDD Phases

54 BlogWriter Architecture Part 1

55 Memory in BlogWriter

55 Chat client v Responses Client

56 Run Locally

57 RAG Implementation Step by Step

58 MCP and Microsoft Agent Framework

59 When Is the LLM Called?

60 Prompts in MCP

61 4 Solutions to Spec Kit Issues

62 Creating Presets Step By Step

Note: many of these blog posts had initial research and drafts done by the Blog Writer multi-agent application that serves as a demo for these articles. All were then edited by me.

Posted in AI, Essentials | Comments Off on Agentic Table of Contents (so far)

Creating Spec Kit Presets Step-By-Step

This guide assumes you already understand what Spec Kit and presets are and focuses on the who/what/where/how of authoring, testing, and publishing a preset. The instructions are concrete and practical — including a minimal manifest example, the recommended folder layout, local test workflow, a tiny C# validation snippet, and packaging/publishing notes.

Continue reading →
Posted in AI | Leave a comment

4 Solutions to Spec Kit Issues

Your design docs look different across teams. Some repos forget the QA gate. Integrations (Jira, CI) are half-baked and duplicated as bash scripts. Onboarding a new engineer requires five manual steps to wire the same set of templates, commands, and pipelines.

Spec Kit exposes four primitives that solve these problems in a structured, maintainable way:

  • Presets fix content and wording (make docs consistent).
  • Extensions add behavior and integrations (run code, call Jira/CI).
  • Workflows orchestrate multi-step, resumable pipelines (add gates and state).
  • Bundles package and version a curated set of the above (one-command onboarding).

This post explains each primitive plainly, shows concrete manifests and examples (CLI + Visual Studio Code), and gives authoring, troubleshooting, and operational guidance so you can pick the right tool for the job.

Continue reading →
Posted in AI | Comments Off on 4 Solutions to Spec Kit Issues

Prompts in MCP Servers

TL;DR

Prompts allow you to manage the exact instructions your chat models receive and let apps pick those instructions at runtime.

That’s the core value of “prompts” in the Model Context Protocol (MCP). MCP prompts let a server publish reusable, argument‑driven prompt templates that clients (including Microsoft Agent Framework agents) can discover, retrieve, and use in LLM chat calls—so behavior, UX, and auditing are consistent across apps.

Continue reading →
Posted in AI, Essentials | Comments Off on Prompts in MCP Servers

When Is the LLM Called?

When working with agents (e.g., in Microsoft Agent Framework) it is easy to be confused as to when the LLM is called. Since calling the LLM (and getting responses) costs money (in the form of expended tokens) it is important to understand this relationship.

An agent in the Microsoft Agent Framework (MAF) talks to an LLM whenever it needs to:
(1) decide what to do or generate text (initial planning/response generation),
(2) decide whether to call a tool and provide its arguments (function/tool calling), and
(3) incorporate tool outputs and continue reasoning or synthesize the final reply.

A single agent run commonly produces multiple model calls in a loop: planning → tool call(s) → synthesis → (repeat if needed).

Continue reading →
Posted in AI | Comments Off on When Is the LLM Called?

1,500 posts

So far, this blog has published 1,500 posts.

Posted in Essentials | Comments Off on 1,500 posts

MCP and Microsoft Agent Framework

tl;dr

  • MCP (Model Context Protocol) is an open protocol that standardizes how AI hosts (models/ or agents) discover and call external “tools” and contextual data sources. Instead of building bespoke integrations for every service, an AI host can discover tools exposed by MCP servers and invoke them using a single, consistent API (tool list + function invocation/streaming).
  • MCP server: a service that publishes tools (callable functions, data endpoints, long-running operations) via MCP over supported transports (stdio for local child processes, HTTP + SSE for remote/streamable). Servers are the canonical place to register capabilities agents can discover. *SSE is an HTTP‑based streaming mechanism where the server keeps an HTTP connection open and continuously pushes events to the client
  • MCP client: the client-side runtime your agent uses to discover and call tools exposed by one or more MCP servers. The MCP C# SDK provides transports and helpers to produce AIFunctions that integrate with Microsoft’s Agent Framework function-calling model.

Continue reading →
Posted in AI | Comments Off on MCP and Microsoft Agent Framework

RAG in Microsoft Agent Framework Step By Step

Adding RAG to Microsoft Agent Framework is both straightforward and confusing. OK, that makes no sense, but I’ve been struggling to understand all the steps. Here’s a first approximation, more to come in future posts (and I have a video coming with Bruno Capuano and Jon Galloway on this very subject). There are also a bunch of RAG blog posts that I’ve already posted; you can find the list here.



TL;DR

  • Learn the simple C# steps to wire Retrieval-Augmented Generation (RAG) into Microsoft Agent Framework (MAF).
  • Includes a runnable, self-contained console stub that chunks documents, stores them in-memory with metadata, runs a demo similarity search, and returns answers plus source citations.
  • Swap the demo token-overlap search for real embeddings + a vector DB in production and then pass the search delegate into MAF’s TextSearchProvider.
Continue reading →
Posted in AI, Essentials | Comments Off on RAG in Microsoft Agent Framework Step By Step

Running Microsoft Agent Framework Locally

Run a full Microsoft Agent Framework (MAF) agent entirely on-device to eliminate round trips to the cloud, reduce latency, avoid egress costs, and keep sensitive data private. With Foundry Local you can run optimized local model variants (ONNX/WinML) and wire them directly into MAF.

In this guide you’ll get a working quickstart (Windows .NET 7 + WinML and a cross-platform Python example), exact commands to install and download a model, copy‑and‑paste code, hardware/driver tips, observability and troubleshooting checks, CI/CD advice, and production‑ready recommendations.

Continue reading →
Posted in AI | Comments Off on Running Microsoft Agent Framework Locally

ChatClient v ResponsesClient in Microsoft Agent Framework

TL;DR
Use the Responses client for new projects if you want the newest, richest hosted tools and structured outputs; use the Chat Completion client when you need maximum backward compatibility or are constrained to the Chat-completions API (for example, Go-only paths or older models).

Why this matters
Choosing between a Responses client and a Chat Completion client in Microsoft Agent Framework affects which provider API and hosted tools your agent can use, how easy it is to migrate, and what models/back ends you can target. That can influence development effort, feature availability (hosted code execution, file search, image generation, structured outputs), and runtime portability.

Continue reading →
Posted in AI | Comments Off on ChatClient v ResponsesClient in Microsoft Agent Framework

Memory in BlogWriter

BlogWriter uses the Responses API which can help with state maintenance. BlogWriter, however, implements important state (context) using a session object, and manages long-term memory by writing to a Cosmos Database.

I’m reusing this image because (a) it is apt and (b) he’s so cute!

Continue reading →
Posted in AI | Comments Off on Memory in BlogWriter

Copilot CLI

tl;dr
GitHub Copilot CLI is a terminal-native, agentic coding assistant that brings GitHub Copilot’s AI into your shell. Instead of only offering completions in an editor, Copilot CLI lets you ask natural-language questions, plan and execute multi-step tasks, edit files, run tests, and operate on repositories without leaving the terminal. It’s designed for interactive use by developers and for programmatic automation in CI and other workflows.

Continue reading →
Posted in Tools and Utilities | Comments Off on Copilot CLI

BlogWriter Architecture Part 1

In a previous blog post I promised to take apart the BlogWriter architecture and implementation. I thought today I’d start with the architecture.

The original design was to have 4 agents:
* BlogWriter (orchestrates the other agents)
* Researcher (searches the web and Microsoft Learn)
* Author (writes the blog post)
* Reviewer (either accepts the post or sends back fixes to the author)

Subsequently we moved the agents to Foundry (see this video and the diagram above). Critical to this new architecture is that the four Foundry-based agents are fully independent, and each lives in its own project. All the work is done by these agents.

Continue reading →
Posted in AI | Comments Off on BlogWriter Architecture Part 1