Azure.AI.AgentServer.Core Namespace

Classes

Name Description
AgentHost

Static entry point for creating agent servers. Use CreateBuilder(String[]) to compose protocols and build the server. For one-line startup, use the protocol-specific Run methods provided by each protocol package (e.g., ResponsesServer.Run<T>()).

AgentHostApp

Represents a configured and runnable agent server application. Wraps the underlying WebApplication and provides escape-hatch access for advanced scenarios.

AgentHostBuilder

Composable builder for configuring and starting an agent server. Wraps WebApplicationBuilder (via CreateSlimBuilder(String[])) and exposes protocol registration, health checks, tracing, shutdown, and escape hatches.

AgentHostMiddlewareExtensions

Extension methods for standalone (Tier 3) server setups that do not use AgentHostBuilder. Registers all Core middleware services and adds them to the pipeline in one call each.

AgentHostOptions

Configuration options for the agent server host.

FoundryAgentRequestContext

Request-scoped platform identity context, backed by an AsyncLocal<T> so it flows across await points and child tasks within a single request without being threaded through every call site. This is the .NET analogue of the Python SDK's get_request_context() / FoundryAgentRequestContext.

FoundryCallIdHandler

A DelegatingHandler that echoes the per-request x-agent-foundry-call-id from the ambient FoundryAgentRequestContext on every outbound request (container protocol version 2.0.0).

FoundryEnvironment

Provides strongly-typed access to Foundry platform environment variables injected by the Azure AI Foundry hosting infrastructure. All values are read once in the static constructor and cached for the lifetime of the process.

PlatformContext

Carries the platform-injected identity context for a single request. The Foundry platform sets x-agent-user-id and (on container protocol version 2.0.0) x-agent-foundry-call-id headers on every protocol request (e.g., /responses, /invocations). These opaque values let handlers partition per-user state and let the SDK forward the per-request caller context to Foundry platform services.

PlatformHeaders

Defines the HTTP header names used across the AgentServer platform. These headers form the wire contract between the Foundry platform, agent containers, and downstream storage services.

ServerVersionRegistry

Registry that collects version identity segments from protocol packages. Each protocol registers its identity string (e.g., azure-ai-agentserver-responses/1.0.0 (dotnet/10.0)) during route mapping, and the Azure.AI.AgentServer.Core.Internal.ServerVersionMiddleware reads all segments to compose the final x-platform-server response header.

SseKeepAliveSession

Coordinates Server-Sent Events (SSE) writes to an output stream so that long-running responses can periodically emit : keep-alive\n\n comment frames without interleaving with application writes.