AGENT SKILL

foundry-agent-basics

Help a learner build their first AI agent with the Microsoft Agent Framework (MAF) on Microsoft Foundry. Use when the task is creating a basic agent, wiring up FoundryChatClient, choosing a model, running the DevUI, or understanding lesson 1–2 concepts (instructions, tools, threads).

License 许可
MIT
最近更新
2026-10-31
Stars
★ 198
Forks
72

01 前言 Front Matter

name
foundry-agent-basics
description
Help a learner build their first AI agent with the Microsoft Agent Framework (MAF) on Microsoft Foundry. Use when the task is creating a basic agent, wiring up FoundryChatClient, choosing a model, running the DevUI, or understanding lesson 1–2 concepts (instructions, tools, threads).

03 SKILL.md 正文

Foundry agent basics

Guidance for building a first agent in this course (Lessons 1–2).

Guardrails (always apply)

  • Platform: Microsoft Foundry (never say "Azure AI Foundry"). Framework: Microsoft Agent Framework (MAF).
  • SDK: use the pinned agent-framework from requirements.txt with FoundryChatClient and the Responses API. Do not use AzureAIClient, AzureAIAgentClient, or AzureOpenAIChatClient.
  • Model: gpt-5.1 for chat. Never gpt-4o / gpt-4.1 (retired) and never GitHub Models.
  • Auth: az login + AzureCliCredential; endpoint/model come from .env (never hardcoded).

What a learner should understand first

  1. Agent = model + instructions + tools + a thread. Instructions set the persona/task; tools extend capability; a thread carries conversation state.
  2. Design before code (Lesson 1): identify the scenario, the user, the tools needed, and the success criteria. The course use case is "Developer Onboarding".
  3. One agent, one job. Lesson 2 builds several small, specialised agents rather than one monolith (employee search, learning recommendation, coding, orchestration, etc.).

Minimal shape of a sample

  • Load env with python-dotenv; read the Foundry project endpoint and model name.
  • Create a FoundryChatClient with AzureCliCredential.
  • Create the agent with clear instructions; attach tools if needed.
  • Run it — most lesson-2 samples expose a local DevUI on a dedicated port (8090+).

How to help

  • Point the learner at the closest existing sample in lesson-2-agent-development/ and adapt it, rather than writing from scratch.
  • Keep instructions specific and scoped; show how to test with a couple of representative prompts.
  • Remind them to pip install -r requirements.txt, az login, and populate .env first.

Validate

  • python -m py_compile <file>.py must pass.
  • The sample should start its DevUI and answer a basic prompt end-to-end.

References

  • lesson-1-agent-design/README.md, lesson-2-agent-development/README.md
  • MIGRATION-GUIDE.md for the current SDK patterns.

04 同仓库更多 Skills

microsoft
microsoft/Building-AI-Agents-From-Zero-To-Production

multi-agent-a2a

Help a learner compose agents as networked services using the open Agent-to-Agent (A2A) protocol — expose an agent as an A2A server and consume a remote agent as a peer. Use for Lesson 7 tasks: multi-agent orchestration and A2A client/server wiring.

Skill与智能体开发
★ 198
microsoft
microsoft/Building-AI-Agents-From-Zero-To-Production

microsoft-toolbox

Help a learner use Microsoft Toolbox to define tools once and govern them centrally, then consume a toolbox from an agent through a single MCP endpoint. Use for Lesson 6 tasks: tool discovery, registration, governance, and versioning.

Skill与智能体开发
★ 198
microsoft
microsoft/Building-AI-Agents-From-Zero-To-Production

mcp-integration

Help a learner give an agent tools through the Model Context Protocol (MCP) — both client-side MCP and Foundry Hosted MCP tools. Use when connecting an agent to an MCP server (e.g. the GitHub MCP server), adding a remote tool, or reasoning about MCP approval/governance.

Skill与智能体开发
★ 198
microsoft
microsoft/Building-AI-Agents-From-Zero-To-Production

hosted-agent-deployment

Help a learner deploy an agent to production as a Microsoft Foundry Hosted Agent, and decide when Capability Hosts are needed. Use for Lessons 4–5: hosted deployment, thread/memory persistence, bring-your-own storage, and enterprise governance.

Skill与智能体开发
★ 198
microsoft
microsoft/Building-AI-Agents-From-Zero-To-Production

agent-evaluation

Help a learner evaluate and observe an AI agent on Microsoft Foundry — quality/safety evaluators, tracing, and reading results. Use for Lesson 3 tasks: measuring agent performance, adding observability, or interpreting evaluation output.

Skill与智能体开发
★ 198