PlatformHeaders Class

Definition

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.

public static class PlatformHeaders
type PlatformHeaders = class
Public Class PlatformHeaders
Inheritance
PlatformHeaders

Remarks

Response headers (set by the server on every response):

Error response headers (set on 4xx/5xx responses):

  • ErrorSource — classifies error origin (user, platform, or upstream).
  • ErrorDetail — internal diagnostic detail for platform telemetry.

Request headers (set by the platform or client):

Fields

Name Description
ChatIsolationKey

The x-agent-chat-isolation-key header — the platform-injected partition key for conversation-scoped state.

ClientHeaderPrefix

The prefix x-client- for pass-through client headers. All request headers starting with this prefix are extracted and forwarded to the handler via the invocation context.

ClientRequestId

The x-ms-client-request-id header — Azure SDK client correlation header. Logged for diagnostic correlation with upstream Azure SDK callers.

ErrorDetail

The x-platform-error-detail header — internal diagnostic detail for platform telemetry. Not intended for end-user display. Present on error responses when additional diagnostic context is available.

ErrorSource

The x-platform-error-source header — classifies every error response so the platform can route actionable errors to the right team. Present on all 4xx/5xx responses from protocol endpoints. Values: user, platform, upstream.

ErrorSourcePlatform

Error source value indicating the error was caused by the SDK, library, or a platform dependency — not by the caller or the developer's handler.

ErrorSourceUpstream

Error source value indicating the developer's handler code or an external service it called failed or returned incorrect behaviour.

ErrorSourceUser

Error source value indicating the caller's input is invalid. The caller can fix the request and retry.

RequestId

The x-request-id header — carries the request correlation ID. On responses, the server always sets this header (OTEL trace ID → incoming header → GUID). On requests, clients may set it to provide their own correlation ID.

RequestIdItemKey

Key used to store the resolved request ID in Items. Downstream filters and middleware can read this value to correlate the request ID without re-resolving it.

ServerVersion

The x-platform-server header — identifies the server SDK stack (hosting version, protocol versions, language, and runtime). Set on every response by ServerVersionMiddleware.

SessionId

The x-agent-session-id header — the resolved session ID for the request. Set on responses by protocol-specific session resolution logic.

TraceParent

The traceparent header — W3C Trace Context propagation header. Used for distributed tracing correlation on outbound storage requests.

UserIsolationKey

The x-agent-user-isolation-key header — the platform-injected partition key for user-private state.

Applies to