Ai agent development

From diegosouzapw/awesome-omni-skill · View interactive version

Ai agent development is an AI agent skill from the GitHub repository diegosouzapw/awesome-omni-skill. Build production-ready AI agents with Microsoft Foundry and Agent Framework. Use when creating AI agents, selecting LLM models, implementing agent orchestration, adding tracing/observability, or evaluating agent quality. Covers agent architecture, model selection, multi-agent workflows, and producti

How to use this skill

Skill file

AI Agent Development

Purpose: Build production-ready AI agents with Microsoft Foundry and Agent Framework.

Scope: Agent architecture, model selection, orchestration, observability, evaluation.


When to Use This Skill

Prerequisites

Quick Start

Installation

Python (Recommended):

pip install agent-framework-azure-ai --pre  # --pre required during preview

.NET:

dotnet add package Microsoft.Agents.AI.AzureAI --prerelease
dotnet add package Microsoft.Agents.AI.Workflows --prerelease

Model Selection

Top Production Models (Microsoft Foundry):

| Model | Best For | Context | Cost/1M |

|-------|----------|---------|---------|

| gpt-5.2 | Enterprise agents, structured outputs | 200K/100K | TBD |

| gpt-5.1-codex-max | Agentic coding workflows | 272K/128K | $3.44 |

| claude-opus-4-5 | Complex agents, coding, computer use | 200K/64K | $10 |

| gpt-5.1 | Multi-step reasoning | 200K/100K | $3.44 |

| o3 | Advanced reasoning | 200K/100K | $3.5 |

Deploy Model: Ctrl+Shift+P → AI Toolkit: Deploy Model


Agent Patterns

Single Agent

from pathlib import Path
from agent_framework.openai import OpenAIChatClient

# Load prompt from file — NEVER embed prompts as inline strings
prompt = Path("prompts/assistant.md").read_text(encoding="utf-8")

client = OpenAIChatClient(
    model="gpt-5.1",
    api_key=os.getenv("FOUNDRY_API_KEY"),
    endpoint=os.getenv("FOUNDRY_ENDPOINT")
)

agent = {
    "name": "Assistant",
    "instructions": prompt,  # Loaded from prompts/assistant.md
    "tools": []  # Add tools as needed
}

response = await client.chat(
    messages=[{"role": "user", "content": "Hello"}],
    agent=agent
)

Multi-Agent Orchestration

from pathlib import Path
from agent_framework.workflows import SequentialWorkflow

# Each agent loads its prompt from a dedicated file
researcher = {
    "name": "Researcher",
    "instructions": Path("prompts/researcher.md").read_text(encoding="utf-8")
}
writer = {
    "name": "Writer",
    "instructions": Path("prompts/writer.md").read_text(encoding="utf-8")
}

workflow = SequentialWorkflow(
    agents=[researcher, writer],
    handoff_strategy="on_completion"
)

result = await workflow.run(query="Write about AI agents")

Advanced Patterns: Search github.com/microsoft/agent-framework for:


Best Practices

Prompt & Template File Management

RULE: NEVER embed prompts or output templates as inline strings in code. Always store them as separate files.

Why: Prompts are content, not code. Separating them enables:

Directory Convention:

project/
  prompts/                    # All system/agent prompts
    assistant.md              # One file per agent role
    researcher.md
    writer.md
    reviewer.md
  templates/                  # Output templates used by agents
    report-template.md        # Structured output templates
    email-template.md
    summary-template.md
  config/
    models.yaml               # Model configuration

Loading Pattern:

from pathlib import Path

# Load prompt
prompt = Path("prompts/assistant.md").read_text(encoding="utf-8")

# Load output template and inject into prompt
template = Path("templates/report-template.md").read_text(encoding="utf-8")
prompt_with_template = f"{prompt}\n\n## Output Format\n{template}"

Rules:

Development

✅ DO:

❌ DON'T:

Security

Performance

Monitoring


Production Checklist

Development

Model Change Management (MANDATORY)

Model Change Test Automation (MANDATORY)

Observability

Evaluation

Security & Compliance

Operations


Resources

Official Documentation:

AI Toolkit:

Security:


Related: AGENTS.md for agent behavior guidelines • Skills.md for general production practices

Last Updated: January 17, 2026

Scripts

| Script | Purpose | Usage |

|--------|---------|-------|

| CODE0 | Scaffold AI agent project (Python/.NET) with tracing & eval | python scripts/scaffold-agent.py --name my-agent [--pattern multi-agent] [--with-eval] |

| CODE0 | Validate agent project against production checklist | ./scripts/validate-agent-checklist.ps1 [-Path ./my-agent] [-Strict] |

| CODE0 | Validate model pinning, data drift signals, and judge LLM readiness | ./scripts/check-model-drift.ps1 [-Path ./my-agent] [-Strict] |

| CODE0 | Run eval suite against multiple models and generate comparison report | python scripts/run-model-comparison.py --config config/models.yaml --dataset evaluation/core.jsonl |

Troubleshooting

| Issue | Solution |

|-------|----------|

| Model not found | Verify model deployment in Foundry portal and check endpoint URL |

| Tracing not appearing | Ensure AIInferenceInstrumentor().instrument() called before agent creation |

| Agent loops indefinitely | Set max_turns limit and add termination conditions |

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.