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

TypeApproachStatus (July 2026)Best For
Prompt AgentDeclarative - define in portal or SDKGAStandard Q&A, RAG, tool use
Hosted AgentCode-first - your code in Foundry's sandboxGACustom orchestration, complex logic
Connected AgentMulti-agent delegationGATriage, 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}}]
)

Connected agents guide

Memory

Agents retain context across interactions. Three types (public preview):

TypePurposeExample
ProceduralLearn how to do work across runsAgent improves at task execution over time (+7-14% success rate)
UserRemember preferences and facts"User prefers metric units"
SessionMaintain context within a conversationCurrent thread state

Memory documentation

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.

ModeStatusDescription
Voice Live + Prompt AgentGAFastest path to voice - existing agent gets real-time speech
Voice Live + Hosted AgentPreviewFull control over orchestration + voice

Voice Live documentation

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)

Toolboxes documentation

Publishing

Deploy agents where users already work:

ChannelStatus
Microsoft TeamsGA
Microsoft 365 CopilotGA
Web (custom app)GA
Copilot StudioGA

Identity, permissions, and policy flow through automatically.

Copilot Studio Integration

ScenarioHow
Foundry agent in Teams/M365Publish directly from Foundry
Foundry IQ in Copilot StudioUse as intelligence source for low-code agents
Business user agentsBuild in Copilot Studio, ground with Foundry IQ

Copilot Studio integration guide