Tools and Dependency Injection in Microsoft Agent Framework

Series Deep Dive: Microsoft Agent Framework Part 7 of 7 (ongoing)

How to expose small C# methods as Microsoft Agent Framework tools, pass application services through dependency injection, and protect side-effecting actions.

May 6, 2026 · 6 min · 1224 words

RAG with EF Core and pgvector

How to build RAG retrieval in .NET by storing embeddings in PostgreSQL with pgvector and querying them through EF Core.

May 2, 2026 · 5 min · 1060 words

Dynamic Agent Context with AIContextProvider

Series Deep Dive: Microsoft Agent Framework Part 6 of 7 (ongoing)

How to use AIContextProvider in Microsoft Agent Framework to inject dynamic memory, reduce tool-token overhead, add guardrails, and extend agent context at runtime.

April 30, 2026 · 6 min · 1258 words

Controlling Token Growth with Chat Reducers

Series Deep Dive: Microsoft Agent Framework Part 5 of 7 (ongoing)

How to control token growth in Microsoft Agent Framework with message-count and summarizing chat reducers, including setup, tradeoffs, and when each approach fits.

April 28, 2026 · 5 min · 960 words

State Management and Chat History

Series Deep Dive: Microsoft Agent Framework Part 4 of 7 (ongoing)

How to manage short-term and persistent conversation state in Microsoft Agent Framework using AgentSession, StateBag, and a custom ChatHistoryProvider.

April 23, 2026 · 4 min · 714 words

Use the Aspire Dashboard Standalone

Quick Tip

Stop setting up complex observability stacks for local dev. Learn how to run the Aspire Dashboard as a standalone, lightweight OTLP viewer for any language.

April 22, 2026 · 2 min · 223 words

Chat vs. Streaming: Don't Keep Your Users Waiting

Series Deep Dive: Microsoft Agent Framework Part 3 of 7 (ongoing)

When to use RunAsync vs. RunStreamingAsync in Microsoft Agent Framework, and why streaming improves chat UX while blocking calls still fit structured outputs and background work.

April 20, 2026 · 3 min · 582 words

Zero to First Agent

Series Deep Dive: Microsoft Agent Framework Part 2 of 7 (ongoing)

How to initialize the Microsoft Agent Framework, connect to Azure, OpenAI or local Ollama models and execute your first asynchronous agent run.

April 16, 2026 · 5 min · 874 words

Microsoft Agent Framework: Introduction

Series Deep Dive: Microsoft Agent Framework Part 1 of 7 (ongoing)

How Microsoft Agent Framework builds on Microsoft.Extensions.AI, when it supersedes Semantic Kernel for new .NET agent systems, and where MCP, context providers, and workflows fit.

April 14, 2026 · 7 min · 1360 words

Context Compression in .NET

Quick Tip

Reduce token cost and latency in .NET by compressing RAG context with a cheap summarizer model or an IChatClient middleware pipeline.

April 1, 2026 · 2 min · 291 words