Skip to content

Azure AI Foundry SDKs 2.0

Key Points

  • Azure AI Foundry = Microsoft's enterprise AI platform. Models, agents, evals, observability, deployment.
  • Foundry SDKs 2.0 (April 2026): unified .NET / Python SDKs for the platform.
  • Hosts Azure OpenAI, Anthropic, Llama, Mistral, Phi, etc. — multi-model under one roof.
  • Built on Microsoft.Extensions.AI for .NET.
  • For Azure-shop production: Foundry is the integrated path.

What's Foundry

Azure AI Foundry =
  Models hub (OpenAI + 3rd-party)
  + Agent service (managed agents)
  + Evals (built-in eval workflows)
  + Observability (App Insights integration)
  + Vector indexes (Azure AI Search)
  + Deployment (provisioned + standard)

Single platform; managed; Azure-integrated.

Setup

<PackageReference Include="Azure.AI.Projects" Version="2.*" />
<PackageReference Include="Microsoft.Extensions.AI" Version="9.*" />
var projectClient = new AIProjectClient(
    new Uri("https://my-foundry.services.ai.azure.com/api/projects/my-project"),
    new DefaultAzureCredential());

var chatClient = projectClient.GetChatClient("gpt-4o-mini").AsIChatClient();

AIProjectClient is the entry point; gives you typed clients for chat, embeddings, agents, etc.

Multi-model

Foundry catalogs many models: - Azure OpenAI (GPT family). - Anthropic Claude (via Foundry's hosted endpoint). - Meta Llama. - Mistral. - Microsoft Phi. - Cohere. - Custom fine-tuned.

var llamaClient = projectClient.GetChatClient("Meta-Llama-3-3-70B").AsIChatClient();

Same IChatClient interface; different model under the hood.

Provisioned vs Standard

Tier Notes
Standard Pay-per-token; rate-limited
Provisioned (PTUs) Reserved throughput; consistent latency; commit

For production: PTUs for SLA.

Auth

Managed Identity:

new AIProjectClient(uri, new DefaultAzureCredential())

Or service principal / API key. Managed identity preferred.

Agents

var agent = await projectClient.GetAgentsClient().CreateAgentAsync(new AgentCreationOptions
{
    Name = "MyAgent",
    Instructions = "...",
    Model = "gpt-4o-mini",
    Tools = [BuiltInTool.CodeInterpreter]
});

var thread = await projectClient.GetAgentsClient().CreateThreadAsync();

Foundry's agent service manages threads, tools, evaluation.

Built-in tools

  • Code interpreter (sandboxed Python).
  • File search (RAG against attached files).
  • Bing search (web).
  • Azure AI Search retrieval.
  • OpenAPI tools (call any REST API).
  • Custom function tools.

Vector indexes

var index = await projectClient.GetIndexesClient().CreateAsync(new IndexCreationOptions
{
    Name = "my-index",
    Source = new AzureAISearchSource("my-search-service", "my-index")
});

Wraps Azure AI Search; auto-configured for RAG with the agent service.

Evals

var evalRun = await projectClient.GetEvaluationsClient().CreateAsync(new EvalRunOptions
{
    Dataset = ...,
    Metrics = ["faithfulness", "groundedness", "relevance"]
});

Built-in eval frameworks; track over time.

Observability

Auto-flows to App Insights via OTel. GenAI semantic conventions.

Deployment

Models deployed per-region. Choose deployment by region/tier.

Pricing

  • Standard: per-token.
  • Provisioned (PTU): reserved throughput; flat fee.
  • Storage / index / agent execution: separate.

For high-RPS prod: PTU often cheaper than per-token.

When use Foundry vs raw Azure OpenAI

Need Foundry Azure OpenAI
Multi-model
Agent service (limited)
Evals
Just chat overkill sufficient

For chat-only: Azure OpenAI direct. For agent platforms / evals / multi-model: Foundry.

Senior considerations

  • Multi-model strategy: Foundry gives you Anthropic + Meta + others on Azure.
  • Compliance: Azure region / data residency baked in.
  • Cost monitoring: Foundry surfaces per-model usage.
  • Migration path: from Azure OpenAI direct to Foundry is incremental.

Cross-references