This article is part of Festive Tech Calendar 2025 initiative. You'll find other helpful articles and tutorials published daily by community members and experts there, so make sure to check it out every day.
The Microsoft Agent Framework is rapidly becoming the standard way to build intelligent, composable AI systems on .NET, and one of the most exciting aspects of the framework is how it lets you turn agents themselves into reusable tools. If you read my earlier post, you already know the basics of creating and running agents. Now it’s time to take the next step: making those agents callable by other agents and systems.
As systems grow in complexity, reusability and modular integration become essential. With Microsoft Agent Framework, you can wrap an AI agent in a callable interface and add it to another agent’s tool set. The advantages are:
- Reusability: Build an agent once, then call it from multiple parent agents.
- Separation of Concerns: Each agent focuses on a single capability and exposes that as a clean tool interface.
- Dynamic Delegation: A reasoning agent can dynamically decide which specialist agent to invoke based on the user’s query.
For example, a weather agent can become a function tool that your main assistant calls whenever it needs accurate forecasts, all without rewriting logic.
Going a step further, Microsoft Agent Framework supports exposing agents as MCP tools. MCP (Model Context Protocol) is a growing standard for agent-tool interoperability. An agent wrapped as an MCP tool can be registered with an MCP server and called by any client that understands MCP, including UIs, other agents, and even external workflows. The advantages include:
- Cross-Framework Integration: Your agent can become a callable service in ecosystems beyond the programming language of your choice, for example, VS Code Copilot agents, browser extensions, or third-party orchestration layers.
- Standardized Tool Discovery: MCP lets clients discover tools programmatically, query their parameters, and invoke them in a standard way.
- Ecosystem Growth: As MCP gains adoption, tools published this way can become part of shared agent marketplaces, enabling new forms of composability.
- Making agents usable as tools unlocks stronger orchestration patterns, such as Delegation, Layered Agents, or Parallel Execution.
Let's demonstrate these two capabilities by extending the code we developed in Part 1.
First, create a new ChristmasAgent.cs file in a new folder, Agents
using OpenAI;
using Microsoft.Agents.AI;
using Microsoft.Extensions.AI;
namespace ChristmasApp.Agents;
public static class ChristmasAgent
{
public static AIAgent Create(IChatClient chatClient)
{
return chatClient.CreateAIAgent(
name: "Christmas Helper",
instructions: "You are a helpful assistant that suggests Christmas gifts based on a budget.",
tools: [AIFunctionFactory.Create(ChristmasApp.Tools.ChristmasTools.SuggestGift)]
);
}
}
Now, let's replace the agent definition from part 1 in Program.cs with this code:
// New namespaces
using Microsoft.Extensions.AI;
using Microsoft.Agents.AI;
using ChristmasApp.Agents;
// ...
// Replace var agent statement with this code
var iChatClient = chatClient.AsIChatClient();
var christmasAgent = ChristmasAgent.Create(iChatClient);
var christmasAgentTool = christmasAgent.AsAIFunction();
var santaInstructions = @"You are Santa Claus, a warm, wise, and joyful AI agent.
You spread holiday cheer while providing helpful, family-friendly, and imaginative responses.
You speak with kindness, gentle humor, and a magical Christmas tone, while remaining informative and accurate.";
var santaAgent = chatClient.CreateAIAgent(
name: "Santa Claus",
instructions: santaInstructions,
tools: [christmasAgentTool]);
// ...
// Finally, replace var response = await agent.RunAsync(prompt); with
var response = await santaAgent.RunAsync(prompt);
Build and run your app. Here's the result:
We have defined a new agent (SantaAgent) that uses the ChristmasHelperAgent to suggest a gift based on a budget, but with a cheerful tone.
I hope that this entry was interesting and useful for you.
Thanks for your time, and enjoy the rest of the Festive Tech Calendar 2025 publications!
See you next time,
Luis

Top comments (0)