Integrations for Microsoft Foundry (formerly Azure AI) — models, agents, tools, and observability.
This page contains reference documentation for Microsoft Foundry. See the docs for conceptual guides, tutorials, and examples.
Base class for connecting to services from Azure AI Foundry projects.
Toolkit for Azure AI Services.
A tool that interacts with Azure Logic Apps.
Input schema for the image generation tool.
Tool that generates images using an OpenAI-compatible image generation API.
Input schema for the speech-to-text tool.
Transcribes audio to text using an OpenAI-compatible speech-to-text API.
Load tools from an Azure AI Foundry Toolbox and use them via MCP.
Input schema for AzureAIMemoryRetrieverTool.
Tool that retrieves relevant memories from Azure AI Foundry Memory.
Base class for server-side built-in tools.
A tool that runs Python code server-side to help generate a response.
A tool that searches the internet for sources related to the prompt.
A tool that searches for relevant content from uploaded vector stores.
A tool that generates or edits images using GPT image models.
A tool that gives the model access to an external MCP server.
Azure AI embeddings model using the OpenAI-compatible API.
Load documents, images, audio, and video using Azure Content Understanding.
Semantic convention attribute names used throughout the tracer.
LangChain callback handler that emits OpenTelemetry GenAI spans.
Fallback base class when opentelemetry instrumentation is unavailable.
OpenTelemetry instrumentor implementation for LangChain auto-tracing.
History wrapper that updates Azure AI Foundry Memory per chat turn.
Extended AgentState that carries per-invocation agent context.
A LangGraph node for an existing Azure AI Foundry agent (V2 Responses API).
A tool that interacts with Azure AI Foundry Agent Service V2.
A wrapper around the Foundry ImageGenTool for use in AgentServiceBaseToolV2.
A wrapper around the Foundry CodeInterpreterTool.
A wrapper around the Foundry MCPTool for use in AgentServiceBaseToolV2.
Builds agent nodes from agents running in Azure AI Foundry.
Stable bit assignments for hosting features reported in telemetry.
Store the latest public status envelope for an invocation.
Local file-backed invocation state with atomic envelope replacement.
Hosted invocation state backed by a Foundry state-store item.
Host a LangGraph CompiledStateGraph as the Azure AI Responses API.
Host a LangChain Runnable as the Invocations API.
Persist LangGraph checkpoints in Microsoft Foundry state stores.
Aggregate LangChain usage metadata into Responses API usage.
Convert one LangGraph invocation stream into Responses events.
Get and set named dictionaries within a conversation chain.
Store each conversation chain in a separate FoundryStateStore.
Manage LangGraph references persisted with one Responses task.
Wrap hosting-owned data stored in a LangGraph runnable config.
A LangGraph thread and checkpoint reference.
Middleware that periodically extracts memories from turns into Azure AI Memory.
Raised when content safety violations with exit_behavior='error'.
Base class for all content-safety violations.
A harm-category evaluation from text or image content analysis.
Value payload stored inside a NonStandardAnnotation for violations.
A blocklist-match evaluation from text content analysis.
Input extracted from an agent state for text content moderation.
AgentMiddleware that screens text messages with Azure AI Content Safety.
A prompt-injection evaluation.
Input extracted from an agent state for prompt shield evaluation.
AgentMiddleware that detects prompt injection using Azure AI Content Safety.
Input extracted from an agent state for image content moderation.
AgentMiddleware that screens image content with Azure AI Content Safety.
A protected-material evaluation.
AgentMiddleware that detects protected material using Azure AI Content Safety.
A groundedness evaluation.
Inputs extracted from an agent state for groundedness evaluation.
AgentMiddleware that evaluates groundedness of model outputs.
Result from a Foundry evaluation run.
Wrapper around a single Foundry agent evaluator.
Run multiple Foundry evaluators in sequence.
Azure AI chat model using the Anthropic Messages API.
Azure AI chat model using the OpenAI-compatible API.
Cache that uses Cosmos DB Mongo vCore vector-store backend.
Enumerator of the Distance strategies for calculating distances between vectors.
Azure Cognitive Search vector store.
Retriever that uses Azure Cognitive Search.
LangChain retriever that queries Foundry Memory with multi-turn context.
Azure AI Search service retriever.
Azure Cognitive Search service retriever.
Azure AI model inference for embeddings.
Factory to create and manage prompt-based agents in Azure AI Foundry.
A tool that interacts with Azure AI Foundry Agent Service.
A LangGraph node that represents a prompt-based agent in Azure AI Foundry.
Azure AI Chat Completions Model.
Register an extra UA prefix (idempotent).
Register or replace a named UA prefix.
Return whether the current process is running inside Foundry hosting.
Return the combined User-Agent string.
Return headers with our UA prepended to any existing User-Agent.
Clear the prefix registry and detection cache.
Raise a clear error when OTel instrumentation is not installed.
Enable auto-injection of Azure tracer into callback managers.
Disable callback manager auto-tracing and restore original behavior.
Return whether auto-tracing monkey patch is currently enabled.
Determine the next node based on whether the AI message has tool calls.
Return the hosting UA with its compact hexadecimal feature mask.
Return the process and current-request hosting features.
Select the same hosted/local durability split used by Responses.
Load the selected graph and run it with the requested protocol.
Translate resolved Responses API items into LangChain messages.
Build a {"messages": [...]} LangGraph input from resolved items.
Build a {"messages": [...]} payload from a single user text string.
Iterate the graph stream and yield Responses API events.
Return the interrupts pending on the checkpointed state, if any.
Pass through a graph stream while recording its active interrupts.
Render the {"interrupt_id", "value"} envelope as a JSON string.
Build portable Responses-style output items for pending interrupts.
Return the call_ids reserved by the HITL wire protocol.
Build a resume :class:Command from request input items, if present.
Return a human-readable message if the client rejected an interrupt.
Yield Responses API events that surface pending interrupts.
Return True when state_schema exposes a messages field.
Return the plain-text representation of a LangChain message content.
Return the reasoning summary text fragments in a message content.
Return the text content of the last AIMessage in messages.
Yield the Responses API events that summarise a final graph state.
Extract content-safety annotation payloads from a message.
Print a formatted summary of content-safety annotations on a message.
Determine the next node based on whether the AI message contains tool calls.
Convert a LangChain message sequence to Foundry evaluator input.
Convert LangChain tool objects to Foundry tool_definitions format.
Build a compiled evaluator-optimizer subgraph.
Build a compiled analyst subgraph with embedded eval-optimize loop.
Converts a sequence of BaseMessage to ChatRequestMessage.
Convert an inference message dict to generic message.
Calculate maximal marginal relevance.
Filter out metadata types that are not supported for a vector store.
Azure AI Foundry integration with LangChain/LangGraph.
Tools provided by Azure AI Foundry.
Logic Apps tools.
Built-in server-side tools for OpenAI models deployed in Azure AI Foundry.
Embedding model for Azure AI.
Azure AI embeddings model inference API.
Azure AI embeddings model using the OpenAI-compatible API.
Document loaders provided by Azure AI Foundry.
Azure Content Understanding document loader for LangChain.
Callables for Azure AI.
Tracing capabilities for Azure AI Foundry.
OpenTelemetry tracer for LangChain/LangGraph inference aligned with GenAI spec.
Auto-instrumentation helpers for LangChain/LangGraph tracing.
Chat message history stores a history of the message interactions in a chat.
Azure AI Foundry Memory integration with LangChain.
Azure CosmosDB Memory History — DEPRECATED.
Agents integrated with LangChain and LangGraph.
Declarative chat agent node for Azure AI Foundry agents V2.
Prebuilt agents for Azure AI Foundry.
Azure AI Foundry Agent Service Tools for V2 (azure-ai-projects >= 2.0).
Factory to create and manage agents in Azure AI Foundry (V2).
Agents integrated with LangChain and LangGraph.
Agents integrated with LangChain and LangGraph.
Host a compiled LangGraph graph inside Azure AI Foundry's Agent Service.
Run a graph from a LangGraph configuration file.
Dictionary storage scoped by conversation chain.
Per-response LangGraph checkpoint storage management.
LangGraph runnable config management for Responses API hosting.
LangGraph checkpoint references for Responses API hosting.
Middleware for Azure AI LangChain/LangGraph agent integrations.
Azure AI Content Safety middleware package.
Agents V1 integrated with LangChain and LangGraph.
Prebuilt agents for Azure AI Foundry.
Azure AI Foundry Agent Service Tools.
Factory to create and manage agents in Azure AI Foundry.
Prebuilt agents for Azure AI Foundry.
Azure AI Foundry Agent Service Tools.
Declarative chat agent node for Azure AI Foundry agents.
Azure Foundry evaluation utilities for LangGraph agents.
Convert LangChain messages to Foundry agent evaluation format.
Reusable evaluator-optimizer graph builders for LangGraph.
Azure Foundry agent evaluator wrappers for LangGraph.
Chat completions model for Azure AI.
Azure AI chat model using the Anthropic Messages API via Azure AI Foundry.
Azure AI Inference Chat Models API.
Azure AI Chat Completions model using the OpenAI-compatible API.
Vector store stores embedded data and performs vector search.
Semantic Cache for Azure CosmosDB NoSql and Mongo vCore API.
Utility functions for working with vectors and vectorstores.
Vector Store for CosmosDB NoSql — DEPRECATED.
Vector Store for Azure DocumentDB (with MongoDB compatibility) — DEPRECATED.
Vector store implementation for Azure Cognitive Search.
Retrievers provide an interface to search and retrieve relevant documents from a data source.
Azure AI Foundry Memory retriever for incremental search with chat history context.
Retriever classes for Azure AI Search and Azure Cognitive Search.
This module defines the query constructors for the Azure AI integrations.
Translator for CosmosDB NoSQL — DEPRECATED.