Create a prompt agent with Microsoft Foundry SDK
Use a few lines of Python with the Foundry SDK to pair a model with instructions and create an agent.
model = deploy_my_model() agent = create_prompt_agent(model, instructions="Your instructions here") start_conversation(agent)
Python
This snippet illustrates the core concept of using the Microsoft Foundry SDK to instantiate a prompt agent. It involves deploying a model, then using the SDK's function to create an agent by passing the model and a set of instructions. Finally, it shows how to initiate a conversation with the newly created agent.
This Python code snippet demonstrates the basic usage of the Microsoft Foundry SDK to create a prompt agent. It shows how to link a deployed AI model with specific instructions to define the agent's behavior.
The SDK provides simplified functions to abstract the complexities of agent creation, allowing developers to focus on defining the agent's instructions and behavior.
- Your first AI agent is only a few lines of Python away ↗Microsoft Developer · Microsoft Developer on YouTube · Sep 1, 2026 · quoted as shared
First seen on Subvolts Sep 1, 2026. Updated Sep 11, 2026. Spotted a problem? Tell us.
- Your first AI agent is only a few lines of Python awayMicrosoft · Microsoft Developer on YouTube · Sep 1, 2026
The Playbook: reusable how-tos, prompts, configs and tips pulled out of the news.
- WorkflowBuild an AI agent evaluation pipeline in one hourCompress weeks of AI agent testing into one hour using open-source tools and automated pipelines. · 60 min
- Setting tipStore AI agent traces and evaluation data with projectKeep traces, evaluation datasets, and results with your project for repeatable testing. · 5 min
- WorkflowBuild and test an AI agent using Microsoft Foundry ToolkitCreate, configure, test, and evaluate an AI agent within VS Code. · 60 min
- Case studyProactive Agent Detects Incident and Deploys FixAn on-call Pi agent automatically detected a production incident, diagnosed it, and prepared a fix for human review. · 60 min
- ToolSelf-Compacting Pi Agent CodebaseCode for an agent that controls its own context window and decides when to compact information. · 120 min
- HeuristicStart with the simplest LLM solution, add complexity only when needed.Avoid unnecessary complexity in LLM applications; begin with basic LLM calls and add features like retrieval or tools only if required. · 5 min
Questions people ask
- Which AI tools does this work with?
- The sources used it with .
- Where did this come from?
- Microsoft Developer (Microsoft Developer on YouTube). Subvolts collected, normalized and credited it; the link above opens the original.

