Foundry Agent Service
Managed agent runtime for building production AI agents. Define agents declaratively or run your own code in Foundry's sandboxed environment.
Agent Types
| Type | Approach | Status (July 2026) | Best For |
|---|---|---|---|
| Prompt Agent | Declarative - define in portal or SDK | GA | Standard Q&A, RAG, tool use |
| Hosted Agent | Code-first - your code in Foundry's sandbox | GA | Custom orchestration, complex logic |
| Connected Agent | Multi-agent delegation | GA | Triage, specialist handoff |
Prompt Agents
Define what the agent does, what tools it has, and what knowledge it accesses. Foundry handles orchestration, state, and execution.
from azure.ai.projects import AIProjectClient
from azure.identity import DefaultAzureCredential
client = AIProjectClient(
credential=DefaultAzureCredential(),
endpoint="https://my-foundry.services.ai.azure.com"
)
agent = client.agents.create(
model="gpt-5",
name="support-agent",
instructions="You are a customer support agent.",
tools=[
{"type": "file_search"},
{"type": "code_interpreter"}
]
)
Quickstart: Create a prompt agent
Hosted Agents
Your Python/JS code runs in Foundry's sandboxed runtime with dedicated compute, memory, filesystem access, and state. Framework-agnostic - supports Microsoft Agent Framework, LangGraph, CrewAI, or custom.
Two protocols:
- Responses API - OpenAI-compatible stateful interactions
- Invocations protocol - schema-free pass-through
from azure.ai.agents import AgentsClient
from azure.identity import DefaultAzureCredential
client = AgentsClient(
credential=DefaultAzureCredential(),
endpoint="https://my-foundry.services.ai.azure.com"
)
Quickstart: Deploy a hosted agent
Connected Agents (Multi-Agent)
Agents delegate to other agents based on intent.
billing_agent = client.agents.create(
model="gpt-5", name="billing-agent",
instructions="Handle billing inquiries.",
tools=[{"type": "function", "function": {"name": "get_invoice"}}]
)
triage_agent = client.agents.create(
model="gpt-5", name="triage-agent",
instructions="Route requests to specialists.",
tools=[{"type": "connected_agent", "connected_agent": {"id": billing_agent.id}}]
)
Memory
Agents retain context across interactions. Three types (public preview):
| Type | Purpose | Example |
|---|---|---|
| Procedural | Learn how to do work across runs | Agent improves at task execution over time (+7-14% success rate) |
| User | Remember preferences and facts | "User prefers metric units" |
| Session | Maintain context within a conversation | Current thread state |
Routines
Run agents on a schedule (public preview). No user trigger required.
Use cases: overnight issue triage, daily reporting, periodic data sync, scheduled compliance checks.
Voice Live
Real-time voice for agents - speech recognition, text-to-speech, turn detection, interruption handling, and avatars in one API.
| Mode | Status | Description |
|---|---|---|
| Voice Live + Prompt Agent | GA | Fastest path to voice - existing agent gets real-time speech |
| Voice Live + Hosted Agent | Preview | Full control over orchestration + voice |
Toolboxes
Single managed endpoint for all agent tools (public preview). Configure tools once, point any MCP client at one URL.
- Tools, skills, MCP clients under one governed endpoint
- Tool search helps select relevant tools per task
- Connects to Foundry IQ (Work IQ, Fabric IQ, Web IQ)
Publishing
Deploy agents where users already work:
| Channel | Status |
|---|---|
| Microsoft Teams | GA |
| Microsoft 365 Copilot | GA |
| Web (custom app) | GA |
| Copilot Studio | GA |
Identity, permissions, and policy flow through automatically.
Copilot Studio Integration
| Scenario | How |
|---|---|
| Foundry agent in Teams/M365 | Publish directly from Foundry |
| Foundry IQ in Copilot Studio | Use as intelligence source for low-code agents |
| Business user agents | Build in Copilot Studio, ground with Foundry IQ |