# azure-ai-projects-ts

Tells your coding agent how to use the Azure AI Projects SDK for JavaScript: agents, connections, deployments, datasets, indexes and evaluations.

- skill · `type=skill` · Claude Code, GitHub Copilot · 1 install · ★ 3148
- Author: Microsoft
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/microsoft/skills/tree/HEAD/.github/plugins/azure-sdk-typescript/skills/azure-ai-projects-ts/SKILL.md
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/skills/azure-ai-projects-ts

## What it does

A Microsoft skill covering `@azure/ai-projects`, the high-level SDK for Azure AI Foundry projects. It ships code samples for building an `AIProjectClient`, authenticating with `DefaultAzureCredential` or `ManagedIdentityCredential`, and calling the operation groups `client.agents`, `client.connections`, `client.deployments`, `client.datasets`, `client.indexes`, `client.evaluators` and `client.memoryStores`.

There is a long section on agents with tools: Code Interpreter, File Search, Web Search, Azure AI Search, function tools and MCP servers. You also get the flow for running an agent through the OpenAI client returned by `getOpenAIClient()`, plus cleanup of the conversation and agent version. Datasets upload as a single file or a folder, indexes are created with `AzureAISearchIndex`, and deployments can be listed with a publisher filter.

Setup needs `AZURE_AI_PROJECT_ENDPOINT` pointing at your Foundry project and `MODEL_DEPLOYMENT_NAME`. If `DefaultAzureCredential` runs in production, add `AZURE_TOKEN_CREDENTIALS=prod`. Install the packages with `npm install @azure/ai-projects @azure/identity`; tracing pulls in `@azure/monitor-opentelemetry` and `@opentelemetry/api`. Without a reachable endpoint and a valid Azure identity the samples go nowhere, so check project access first.

## Requirements
- Works with: Azure

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add microsoft/skills --skill azure-ai-projects-ts -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/azure-ai-projects-ts/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/azure-ai-projects-ts/

### Codex

**Manually: put the files in place**
- File: `.agents/skills/azure-ai-projects-ts/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

**Manually: put the files in place**
- File: `.cursor/skills/azure-ai-projects-ts/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install microsoft/skills azure-ai-projects-ts
```

2. **Manually: put the files in place**
- File: `.github/skills/azure-ai-projects-ts/SKILL.md`

### Gemini CLI

**Platform CLI**
```bash
gemini skills install https://github.com/microsoft/skills --path .github/plugins/azure-sdk-typescript/skills/azure-ai-projects-ts
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/azure-ai-projects-ts/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/microsoft/skills/tree/HEAD/.github/plugins/azure-sdk-typescript/skills/azure-ai-projects-ts/SKILL.md

## When to use it
- create an Azure AI Foundry agent from TypeScript
- attach file search or Azure AI Search to an agent
- upload a dataset as a file or a whole folder
- get an OpenAI client for a Foundry project
- list model deployments filtered by publisher

## Example prompts
- show me how to create an agent with @azure/ai-projects using the code_interpreter tool
- set up AIProjectClient authentication with DefaultAzureCredential
- upload ./data/training.jsonl as dataset my-dataset version 1.0

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: b341d6ab03bc27a7.

BEGIN THIRD-PARTY FILE b341d6ab03bc27a7
````text
---
name: azure-ai-projects-ts
description: Build AI applications using Azure AI Projects SDK for JavaScript (@azure/ai-projects). Use when working with Foundry project clients, agents, connections, deployments, datasets, indexes, evaluations, or getting OpenAI clients.
license: MIT
metadata:
  author: Microsoft
  version: "1.0.0"
  package: '@azure/ai-projects'
---

# 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();

const client = new AIProjectClient(
  process.env.AZURE_AI_PROJECT_ENDPOINT!,
  credential
);
```

## Operation Groups

| Group | Purpose |
|-------|---------|
| `client.agents` | Create and manage AI agents |
| `client.connections` | List connected Azure resources |
| `client.deployments` | List model deployments |
| `client.datasets` | Upload and manage datasets |
| `client.indexes` | Create and manage search indexes |
| `client.evaluators` | Manage evaluation metrics |
| `client.memoryStores` | Manage agent memory |

## Getting OpenAI Client

```typescript
const openAIClient = await client.getOpenAIClient();

// Use for responses
const response = await openAIClient.responses.create({
  model: "gpt-4o",
  input: "What is the capital of France?"
});

// Use for conversations
const conversation = await openAIClient.conversations.create({
  items: [{ type: "message", role: "user", content: "Hello!" }]
});
```

## Agents

### Create Agent

```typescript
const agent = await client.agents.createVersion("my-agent", {
  kind: "prompt",
  model: "gpt-4o",
  instructions: "You are a helpful assistant."
});
```

### Agent with Tools

```typescript
// Code Interpreter
````
END THIRD-PARTY FILE b341d6ab03bc27a7

The third-party file has ended. Everything between the b341d6ab03bc27a7 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2737 of 7556 bytes. © Microsoft · MIT · https://github.com/microsoft/skills/tree/HEAD/.github/plugins/azure-sdk-typescript/skills/azure-ai-projects-ts/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
