What this sample actually teaches, and where to find each pattern in the code.
How to set up an AI agent with structured instructions, tool calling, session state, and error handling.
The agent definition lives in AgentDelegateFactory.cs — instructions, tool registration, and multi-agent mode selection are all there.
MCP lets you break tool implementations out of the agent into separate servers. Tools become reusable, language-agnostic, and independently deployable.
Two examples in this repo:
- MarkItDown MCP — external Python server for document parsing
- InterviewData MCP — custom .NET server for session management
Coordinating multiple services (agent, UI, MCP servers, database) with dependency ordering, service discovery, and config management. Local dev that looks like production.
See AppHost.cs for the service topology.
One codebase, two LLM backends. Pick Microsoft Foundry or GitHub Copilot in configuration without changing the interview workflow.
The abstraction is in LlmResourceFactory.cs.
Sessions persist to Azure Cosmos DB. Resume text, job descriptions, and transcripts survive across turns. Users can pause and pick up later.
See InterviewSessionRepository.cs.
Writing agent prompts that actually work: defining the role, setting boundaries, specifying step-by-step process, describing tool usage, and setting tone.
The interview coach instructions show progressive disclosure (behavioral then technical), user control (stop anytime), and structured output (summaries).
You can add tools without modifying the agent. MCP servers mean you can bolt on new capabilities (email, calendar, whatever) independently. Teams can work on tools and agents in parallel.
You can swap providers without rewriting the interview flow. Foundry uses IChatClient; GitHub Copilot uses the Agent Framework Copilot adapter.
You get observability for free. Aspire gives you service discovery, health checks, distributed tracing, and structured logging out of the box. Deploying to Azure Container Apps with azd is one command.
Each piece does one thing. The agent handles conversation logic. MCP servers handle tools. The UI handles rendering. Aspire handles wiring. This makes it easier to test, replace, and extend individual parts.
After working through this sample:
- Microsoft Agent Framework — building and deploying agents
- MCP — creating and consuming MCP servers
- Aspire — orchestrating multi-service apps
- Instruction design — writing prompts that produce consistent behavior
- Tool/function calling — giving agents abilities beyond text generation
- State management — persisting context across conversation turns
- Azure deployment — shipping with
azd - Provider abstraction — avoiding LLM vendor lock-in
- Run the sample and go through a full interview
- Read the architecture overview
- Look at the agent instructions in
AgentDelegateFactory.cs - Work through the tutorials
- Start adapting the patterns for your own use case