
agent-framework
by pascalvanderheiden
A list of re-useable agent skills I created for my own purpose.
SKILL.md
name: agent-framework description: Build agentic AI solutions using Microsoft Agent Framework (Python). Use when creating AI agents, multi-agent workflows, chatbots, or assistants that need tool calling, streaming, orchestration patterns (sequential, concurrent, handoff, group chat), or deployment to Azure Container Apps. Covers single agents, multi-agent systems, Azure OpenAI integration, and containerized deployment.
Microsoft Agent Framework Skill
Build production-grade agentic AI solutions using Microsoft Agent Framework with Python.
Prerequisites
- Python 3.10+
- Azure OpenAI service endpoint with deployed model
- Azure CLI authenticated (
az login) - User has
Cognitive Services OpenAI UserorCognitive Services OpenAI Contributorrole
Installation
pip install agent-framework --pre
Environment Variables
export AZURE_OPENAI_ENDPOINT="https://<resource>.openai.azure.com"
export AZURE_OPENAI_DEPLOYMENT_NAME="gpt-4o"
Quick Start: Basic Agent
import asyncio
from agent_framework.azure import AzureOpenAIChatClient
from azure.identity import AzureCliCredential
agent = AzureOpenAIChatClient(credential=AzureCliCredential()).create_agent(
instructions="You are a helpful assistant.",
name="Assistant"
)
async def main():
result = await agent.run("Hello, how can you help me?")
print(result.text)
asyncio.run(main())
Quick Start: Streaming Response
async def main():
async for update in agent.run_stream("Tell me a story."):
if update.text:
print(update.text, end="", flush=True)
print()
asyncio.run(main())
Quick Start: Multimodal Input
from agent_framework import ChatMessage, TextContent, UriContent, Role
message = ChatMessage(
role=Role.USER,
contents=[
TextContent(text="Describe this image."),
UriContent(uri="https://example.com/image.jpg", media_type="image/jpeg")
]
)
result = await agent.run(message)
Agent Patterns
1. Single Agent with Tools
Use for agents that need external capabilities. See references/tools.md for tool patterns.
2. Multi-Agent Workflows
For complex tasks requiring specialized agents. See references/orchestrations.md for patterns:
| Pattern | Use Case |
|---|---|
| Sequential | Pipeline processing, multi-stage workflows |
| Concurrent | Parallel analysis, ensemble decisions |
| Handoff | Dynamic routing, expert delegation |
| Group Chat | Collaborative problem-solving, iterative refinement |
| Magentic | Complex generalist multi-agent collaboration |
3. Azure AI Foundry Agent
Use for managed agents with built-in tools (Code Interpreter, File Search). See references/azure-foundry.md.
Container Deployment
Deploy agents to Azure Container Apps. See references/container-deployment.md for:
- Dockerfile configuration
- requirements.txt setup
- Health check endpoints
- Environment configuration
- Azure Container Apps deployment
Example Scripts
Execute without loading into context when possible:
| Script | Purpose |
|---|---|
scripts/basic_agent.py | Simple agent with Azure OpenAI |
scripts/streaming_agent.py | Agent with streaming responses |
scripts/agent_with_tools.py | Agent with custom function tools |
scripts/multi_agent_handoff.py | Handoff orchestration workflow |
scripts/sequential_workflow.py | Sequential pipeline workflow |
Code Generation Guidelines
- Always use async/await - Agent Framework is async-first
- Use AzureCliCredential - For local dev authentication
- Stream for UX - Use
run_stream()for interactive experiences - Handle errors - Wrap in try/except for production code
- Type hints - Include for maintainability
- Environment variables - Never hardcode credentials
Project Structure
my-agent-app/
├── src/
│ ├── __init__.py
│ ├── main.py # Entry point
│ ├── agents/
│ │ ├── __init__.py
│ │ └── assistant.py # Agent definitions
│ └── tools/
│ ├── __init__.py
│ └── functions.py # Custom tools
├── Dockerfile
├── requirements.txt
├── .env.example
└── azure.yaml # Azure deployment config
Score
Total Score
Based on repository quality metrics
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
Reviews
Reviews coming soon