foundry-agent-basics
Skill194 starsChanged 4 months agoMITView on GitHub
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).
- Reads credentials
- Installs packages
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
SDK: use the pinned agent-framework from requirements.txt with FoundryChatClient and the Responses API.
- Very specific: line 31
Create a FoundryChatClient with AzureCliCredential.
- Very specific: line 32
Create the agent with clear instructions.
- Distinctive: line 33
Run it — most lesson-2 samples expose a local DevUI on a dedicated port (8090+).
- Distinctive: line 38
Keep instructions specific and scoped.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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
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-frameworkfromrequirements.txtwithFoundryChatClientand the Responses API. Do not useAzureAIClient,AzureAIAgentClient, orAzureOpenAIChatClient. - Model:
gpt-5.1for chat. Nevergpt-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
- Agent = model + instructions + tools + a thread. Instructions set the persona/task; tools extend capability; a thread carries conversation state.
- Design before code (Lesson 1): identify the scenario, the user, the tools needed, and the success criteria. The course use case is "Developer Onboarding".
- 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
FoundryChatClientwithAzureCliCredential. - 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.envfirst.
Validate
python -m py_compile <file>.pymust 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.mdMIGRATION-GUIDE.mdfor the current SDK patterns.
In this repository24 other files it gives its agents.
- AGENTS.mdAGENTS.md
- translations/bn/AGENTS.mdAGENTS.md
- translations/cs/AGENTS.mdAGENTS.md
- translations/da/AGENTS.mdAGENTS.md
- translations/en/AGENTS.mdAGENTS.md
- translations/es/AGENTS.mdAGENTS.md
- translations/hu/AGENTS.mdAGENTS.md
- translations/id/AGENTS.mdAGENTS.md
- translations/ko/AGENTS.mdAGENTS.md
- translations/lt/AGENTS.mdAGENTS.md
- translations/mr/AGENTS.mdAGENTS.md
- translations/ms/AGENTS.mdAGENTS.md
- translations/nl/AGENTS.mdAGENTS.md
- translations/pa/AGENTS.mdAGENTS.md
- translations/pt-BR/AGENTS.mdAGENTS.md
- translations/pt-PT/AGENTS.mdAGENTS.md
- translations/th/AGENTS.mdAGENTS.md
- translations/tl/AGENTS.mdAGENTS.md
- translations/vi/AGENTS.mdAGENTS.md
- agent-evaluationSkill
- hosted-agent-deploymentSkill
- mcp-integrationSkill
- microsoft-toolboxSkill
- multi-agent-a2aSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

