Which Foundry SDK or client: project client vs OpenAI SDK vs Agent Framework vs Anthropic SDK
Verdict: Foundry-native config uses the project client. Embeddings and chat use the OpenAI SDK. Code-based and multi-agent systems use Agent Framework. Deployed Claude models use the Anthropic SDK.
| Criterion | Project client | OpenAI SDK | Agent Framework | Anthropic SDK |
|---|---|---|---|---|
| Primary use | Foundry-native operations with no OpenAI equivalent: list connections, project properties | Full OpenAI API surface: embeddings, chat, image generation, with best latency | Build hosted agents or multi-agent systems in code on the Responses API | Call Claude models deployed in Foundry |
| Choose when | Setup and configuration operations | Embeddings and OpenAI-compatible calls | Code-based orchestration and hosted agents | Targeting a deployed Claude model |
Rules
- Connect with an AIProjectClient on the project endpoint, then obtain an OpenAI client from it to call the Responses API.
- Use the project client for Foundry-native operations such as listing connections and retrieving project properties.
- Use the OpenAI SDK for embeddings and maximum OpenAI compatibility with the lowest latency.
- Use the Foundry SDK for agent and evaluation work; use Agent Framework for hosted or multi-agent systems on the Responses API.
- Foundry platform tools on the Responses API include a built-in SharePoint tool, so no custom connector is needed.
Traps
- The Anthropic SDK is scoped to Claude calls; it does not list project connections or expose OpenAI embeddings.
- Creating an AIProjectClient or a credential alone is a prerequisite, not the client used to invoke the Responses API.