azure-ai-projects-ts
Azure AI Projects SDK for JavaScript (@azure/ai-projects): Foundry clients, agents, connections, evaluations and OpenAI access.
- Kind
- Skill
- Works with
- Claude Code
- Languages
- TypeScript / JavaScript
- Source
- microsoft/skills @ 2130750147de
- Path
- .github/plugins/azure-sdk-typescript/skills/azure-ai-projects-ts/SKILL.md
- License
- MIT
- Jobs
- Implementation, Testing
InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
# Azure AI Projects SDK for TypeScript
High-level SDK for Azure AI Foundry projects with agents, connections, deployments, and evaluations.
## Installation
```bash
npm install @azure/ai-projects @azure/identity
```
For tracing:
```bash
npm install @azure/monitor-opentelemetry @opentelemetry/api
```
## Environment Variables
```bash
AZURE_AI_PROJECT_ENDPOINT=https://<resource>.services.ai.azure.com/api/projects/<project>
MODEL_DEPLOYMENT_NAME=gpt-4o
AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production
```
## Authentication
```typescript
import { AIProjectClient } from "@azure/ai-projects";
import { DefaultAzureCredential, ManagedIdentityCredential } from "@azure/identity";
// Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=<specific_credential>
const credential = new DefaultAzureCredential({requiredEnvVars: ["AZURE_TOKEN_CREDENTIALS"]});
// Or use a specific credential directly in production:
// See https://learn.microsoft.com/javascript/api/overview/azure/identity-readme?view=azure-node-latest#credential-classes
// const credential = new ManagedIdentityCredential();
…