agent-creation
Skill4 starsChanged 10 months agoMITView on GitHub
Create AI agents using Microsoft Agent Framework (MAF) in Python or .NET. Use this skill when building new agents, configuring agent providers (Azure OpenAI, OpenAI, etc.), setting up chat agents, or implementing tool-calling agents.
- Reads credentials
- Installs packages
3 other projects use a version of this.
Adopted by
Most recently taken up by
- Bappoz/My-Claude-Skillstheir own version, first seen Jul 15, 2026
- metraton/gaiatheir own version, first seen Jul 2, 2026
- joabgonzalez/ai-agents-skillstheir own version, first seen Jun 8, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- joabgonzalez/ai-agents-skills★ 9same name
- metraton/gaia★ 4same name
- Bappoz/My-Claude-Skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/vercel-composition-patterns/AGENTS.mdAGENTS.md
- .agents/skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- .agents/skills/vercel-react-native-skills/AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- vercel-composition-patternsSkill
- vercel-react-best-practicesSkill
- vercel-react-native-skillsSkill
- web-design-guidelinesSkill
- agent-debuggingSkill
- agent-deploymentSkill
- migration-guideSkill
- workflow-orchestrationSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 179
Reuse client instances: - Don't create new clients for each request
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent Creation with Microsoft Agent Framework
This skill helps you create AI agents using Microsoft Agent Framework, supporting both Python and .NET implementations.
When to Use This Skill
- Creating a new AI agent or chatbot
- Setting up agent providers (Azure OpenAI, OpenAI, etc.)
- Implementing agents with custom tools/functions
- Building agents with specific instructions or personas
Installation
Python
pip install agent-framework --pre.NET
dotnet add package Microsoft.Agents.AI --prereleaseQuick Start Examples
Python - Azure OpenAI Agent
import os
import asyncio
from agent_framework.azure import AzureOpenAIResponsesClient
from azure.identity import AzureCliCredential
async def main():
agent = AzureOpenAIResponsesClient(
endpoint=os.environ["AZURE_OPENAI_ENDPOINT"],
deployment_name=os.environ["AZURE_OPENAI_RESPONSES_DEPLOYMENT_NAME"],
api_version=os.environ["AZURE_OPENAI_API_VERSION"],
credential=AzureCliCredential(),
).as_agent(
name="MyAgent",
instructions="You are a helpful assistant.",
)
response = await agent.run("Hello, how can you help me?")
print(response)
if __name__ == "__main__":
asyncio.run(main())Python - OpenAI Agent
import asyncio
from agent_framework.openai import OpenAIResponsesClient
async def main():
agent = OpenAIResponsesClient(
api_key="your-api-key", # Or use OPENAI_API_KEY env var
).as_agent(
name="MyAgent",
instructions="You are a helpful coding assistant.",
)
response = await agent.run("Explain async/await in Python")
print(response)
if __name__ == "__main__":
asyncio.run(main()).NET - Azure OpenAI Agent
// dotnet add package Microsoft.Agents.AI.OpenAI --prerelease
// dotnet add package Azure.Identity
using System;
using OpenAI;
var agent = new OpenAIClient(
new BearerTokenPolicy(new AzureCliCredential(), "https://ai.azure.com/.default"),
new OpenAIClientOptions() { Endpoint = new Uri("https://<resource>.openai.azure.com/openai/v1") })
.GetOpenAIResponseClient("gpt-4o-mini")
.AsAIAgent(name: "MyAgent", instructions: "You are a helpful assistant.");
Console.WriteLine(await agent.RunAsync("Hello, how can you help me?"));.NET - OpenAI Agent
// dotnet add package Microsoft.Agents.AI.OpenAI --prerelease
using System;
using OpenAI;
var agent = new OpenAIClient("<your-api-key>")
.GetOpenAIResponseClient("gpt-4o-mini")
.AsAIAgent(name: "MyAgent", instructions: "You are a helpful assistant.");
Console.WriteLine(await agent.RunAsync("Write a haiku about coding."));Adding Tools to Agents
Python - Agent with Tools
import asyncio
from agent_framework.azure import AzureOpenAIResponsesClient
from agent_framework.tools import tool
from azure.identity import AzureCliCredential
@tool
def get_weather(location: str) -> str:
"""Get the current weather for a location."""
return f"The weather in {location} is sunny and 72°F"
@tool
def calculate(expression: str) -> float:
"""Evaluate a mathematical expression."""
return eval(expression)
async def main():
agent = AzureOpenAIResponsesClient(
credential=AzureCliCredential(),
).as_agent(
name="ToolAgent",
instructions="You are a helpful assistant with access to weather and calculation tools.",
tools=[get_weather, calculate],
)
response = await agent.run("What's the weather in Seattle and what is 15 * 7?")
print(response)
if __name__ == "__main__":
asyncio.run(main()).NET - Agent with Tools
using Microsoft.Agents.AI;
public class WeatherTools
{
[AIFunction("Get the current weather for a location")]
public string GetWeather(string location)
{
return $"The weather in {location} is sunny and 72°F";
}
[AIFunction("Evaluate a mathematical expression")]
public double Calculate(string expression)
{
// Use a proper expression evaluator in production
return 0.0;
}
}
var tools = new WeatherTools();
var agent = client.GetOpenAIResponseClient("gpt-4o-mini")
.AsAIAgent(
name: "ToolAgent",
instructions: "You are a helpful assistant.",
tools: [tools.GetWeather, tools.Calculate]);Best Practices
- Use environment variables for API keys and endpoints
- Reuse client instances - Don't create new clients for each request
- Use async APIs for better throughput
- Handle rate limiting - Implement retry logic for 429 errors
- Set clear instructions - Be specific about agent behavior and constraints
- Use Azure CLI authentication (
AzureCliCredential) for local development
Environment Variables
Python/Azure OpenAI
AZURE_OPENAI_ENDPOINT- Your Azure OpenAI endpointAZURE_OPENAI_RESPONSES_DEPLOYMENT_NAME- Deployment nameAZURE_OPENAI_API_VERSION- API version (e.g., "2024-02-15-preview")AZURE_OPENAI_API_KEY- API key (optional if using credential)
Python/OpenAI
OPENAI_API_KEY- Your OpenAI API key
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

