Controlling Token Growth with Chat Reducers

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 · 6 min · Lukas Walter

State Management and Chat History

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 · Lukas Walter

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

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 · 4 min · Lukas Walter

Zero to First Agent

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 · Lukas Walter

Microsoft Agent Framework: Introduction

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 · 8 min · Lukas Walter

Context Compression in .NET

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 · Lukas Walter

Stop Guessing – Use Golden Datasets for Prompt Evals

Use a small golden dataset to catch prompt regressions, compare changes against a baseline, and validate model updates before users do.

March 25, 2026 · 2 min · Lukas Walter

Indirect Prompt Injection Is a Trust Boundary Problem

Indirect prompt injection is a trust-boundary failure; treat retrieved content as untrusted data, isolate it from instructions, and validate actions before execution.

March 23, 2026 · 7 min · Lukas Walter

Stop RAG Hallucinations with the Short-Circuit Pattern

How to reduce RAG hallucinations by short-circuiting generation when retrieval returns weak evidence, with a simple C# threshold check.

March 22, 2026 · 2 min · Lukas Walter

RAG Is a Data Problem Before It’s a Prompt Problem

Why stale documents, weak chunking, and thin metadata usually break RAG before prompt tuning does.

March 9, 2026 · 6 min · Lukas Walter