
A Framework Built for Model Diversity
The Microsoft Agent Framework is Microsoft's SDK for building enterprise AI agents in code — as distinct from Copilot Studio's low-code environment. Its defining architectural choice is model agnosticism: rather than building your agent logic around the specifics of a single AI provider's API, you build against a consistent interface that the framework handles, and the underlying model — Claude, OpenAI, or others — can be swapped without rebuilding the agent.
As of early 2026, the framework includes first-class support for Anthropic's Claude models in both C# (.NET) and Python, accessible either directly through the Anthropic API or through Claude deployed on Azure Foundry. For development teams already building in the Microsoft ecosystem, this opens the path to Claude-powered agents without requiring a wholesale departure from Microsoft's toolchain.
Setting Up Claude in the Framework: The Essentials
The Python implementation starts with importing AnthropicClient from the agent_framework.anthropic module. In C#, add the Microsoft.Agents.AI.Anthropic NuGet package (currently in prerelease) and initialise an AnthropicClient with your API key. Both implementations expose the same agent interface: a name, instructions, and a tools list.
The key environment variables you need are the ANTHROPIC_API_KEY for direct API access, or a combination of ANTHROPIC_RESOURCE (the subdomain of your Foundry resource) and ANTHROPIC_DEPLOYMENT_NAME when running Claude through Azure Foundry. For Azure credential-based authentication, use the AnthropicFoundryClient with Azure credential configuration rather than an API key — this is the recommended approach for production enterprise deployments where managed identity is preferred over static API key management.
Model selection is straightforward: set ANTHROPIC_DEPLOYMENT_NAME to your chosen Claude model. Claude Haiku 4.5 for lightweight, high-throughput tasks. Claude Sonnet 4.6 for the balance of capability and speed that fits most enterprise agent use cases. Claude Opus 4.6 for tasks that need the full context window and maximum reasoning depth.
Hosted Tools: MCP, Web Search, and Code Execution
The framework provides three categories of hosted tools that Claude agents can use without custom implementation. MCP connections expose external services and data sources as agent-callable tools — pass the MCP server name and URL to the get_mcp_tool method and the resulting tool object goes into your agent's tools list. The Microsoft Learn MCP server at learn.microsoft.com/api/mcp is a useful default addition for agents that need to answer technical questions grounded in Microsoft documentation.
Web search is added through the get_web_search_tool method and gives the agent the ability to retrieve current external information as part of its reasoning. This is valuable for agents whose tasks require awareness of information beyond your internal knowledge base — market research agents, competitive intelligence tools, or any agent that needs to ground its outputs in current external context.
Code execution gives the agent the ability to write and run code as part of its task completion — useful for data analysis agents that need to process files programmatically, transformation agents that need to apply business logic to structured data, or any agent where the output requires computation rather than pure language generation.
Multiple tool types can be combined in a single agent configuration. An agent designed to answer technical questions might combine the Microsoft Learn MCP server with web search and a custom SharePoint MCP connection, giving it access to official Microsoft documentation, current web sources, and your organisation's internal technical knowledge simultaneously.
Extended Thinking: When to Use It
Claude's extended thinking capability is surfaced through the framework's thinking configuration parameter. When enabled, the agent processes its reasoning explicitly before generating a response, producing a reasoning trace alongside the final output.
Extended thinking is worth enabling for agents handling high-stakes decisions: legal document analysis, financial risk assessment, compliance gap identification, or any task where showing the agent's reasoning is a requirement rather than a nice-to-have. In regulated environments, the reasoning trace can serve as part of an audit record demonstrating how the agent reached its conclusion.
The tradeoff is latency and token cost: extended thinking takes longer and uses more tokens than standard generation. For agents handling time-sensitive queries or high query volumes, standard generation is typically the right choice. Build extended thinking into the agent configuration selectively — for the specific task types where the reasoning transparency justifies the additional cost.
Testing and Production Readiness
Agent reliability in production requires systematic testing before deployment. Test each tool connection independently to verify it returns correct results for representative queries. Test the agent's instruction-following consistency by running the same request multiple times and checking for response variance. Test boundary behaviour by asking questions outside the agent's defined scope and verifying it handles them gracefully rather than attempting to answer incorrectly.
For production deployment on Azure Foundry, enable diagnostic logging at the Foundry level to capture agent interactions and tool calls in your Azure Monitor workspace. Register the agent in Agent 365 (available May 1, 2026) for centralised visibility, performance monitoring, and security oversight alongside the rest of your organisation's agent portfolio.
Version control your agent configuration including the instructions, tool definitions, and model selection. Agent behaviour can change as the underlying model is updated, and having a clear configuration history makes it easier to diagnose when behaviour changes and roll back if needed.
At Trim Journey, our development team builds production-grade Claude agents using the Microsoft Agent Framework for organisations that need custom agent capabilities beyond what Copilot Studio's low-code environment supports. Book a 30-minute call to discuss your custom agent requirements.

