Manage Azure AI Projects with TypeScript
TypeScript skill for Azure AI Foundry projects - agents, connections, deployments, datasets, indexes, via one SDK.
Why it matters
Orchestrate complex AI projects on Azure using a high-level TypeScript SDK. Define, deploy, and manage agents, connections, datasets, and evaluations within the Azure AI Foundry ecosystem.
Outcomes
What it gets done
Create and manage AI agents with various tool integrations (code interpreter, file search, web search, Azure AI Search, function calls).
Handle Azure AI project resources including connections, deployments, datasets, and search indexes.
Integrate with Azure AI services to build sophisticated AI applications.
Programmatically interact with AI models for responses and conversations.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/ag-azure-ai-projects-ts | bash Overview
Azure AI Projects SDK for TypeScript
TypeScript skill for the Azure AI Projects SDK, covering versioned agent creation with code interpreter/file search/web search/Azure AI Search/function/MCP tools, project connections and deployments, dataset uploads, and search index management on Azure AI Foundry. Use when building a TypeScript agentic application on Azure AI Foundry that needs versioned agents with tools, plus project-managed connections, deployments, and datasets.
What it does
This skill uses the Azure AI Projects SDK for TypeScript (@azure/ai-projects plus @azure/identity), a high-level client for Azure AI Foundry projects covering agents, connections, model deployments, datasets, search indexes, evaluators, and agent memory stores. An AIProjectClient is constructed from a project endpoint and a DefaultAzureCredential, and exposes seven operation groups: agents, connections, deployments, datasets, indexes, evaluators, and memoryStores. A key pattern is calling client.getOpenAIClient() to get an OpenAI-compatible client for responses.create (single-turn generation) and conversations.create (multi-turn threads) - the recommended path for actually running models, files, and vector stores. Agents are created and versioned via client.agents.createVersion(name, {kind: "prompt", model, instructions, tools}), with tool configurations shown for Code Interpreter (code_interpreter), File Search (file_search against a vector store), Web Search (web_search_preview with an approximate user location), Azure AI Search (azure_ai_search against a project connection and index), custom Function tools (JSON-schema parameters with strict: true), and MCP tools (server_label, server_url, require_approval). Running an agent means creating a conversation via the OpenAI client, then calling responses.create with an agent: {name, type: "agent_reference"} body referencing the versioned agent, followed by explicit cleanup (conversations.delete, agents.deleteVersion). Connections can be listed, fetched by name, fetched with credentials (getWithCredentials), or resolved to a type's default (getDefault("AzureOpenAI", true)) so credentials come from the project rather than being hardcoded. Deployments can be listed and filtered by modelPublisher. Datasets support uploading a single file or a whole folder with a name/version, fetching, listing versions, and deleting. Indexes are created/updated from an AzureAISearchIndex config (name, connection, index name), listed, and deleted.
When to use - and when NOT to
Use this skill when building a TypeScript application on Azure AI Foundry that needs to create and run versioned AI agents with tools (code execution, file/web/Azure AI Search, custom functions, MCP servers), manage project connections and model deployments, or upload datasets and search indexes for grounding. It is not needed for a bare OpenAI API integration with no Azure AI Foundry project structure - in that case the underlying OpenAI SDK alone (obtained here via getOpenAIClient()) would suffice without the project/agent/connection layer.
Inputs and outputs
Input is agent configuration (model, instructions, tools), conversation messages, dataset files, or index definitions. Output is a versioned agent reference usable in conversations, model responses/conversation objects, uploaded dataset/version records, and created/updated search indexes.
Integrations
Built on Azure AI Foundry via @azure/ai-projects, authenticated with Azure Identity's DefaultAzureCredential, wrapping an OpenAI-compatible client for responses/conversations, Azure AI Search for the search-index and Azure AI Search tool integrations, and optional @azure/monitor-opentelemetry tracing.
npm install @azure/ai-projects @azure/identity
Who it's for
TypeScript developers building agentic applications on Azure AI Foundry who need versioned agents with tool integrations (code, search, functions, MCP), plus project-managed connections, deployments, datasets, and search indexes, without hardcoding credentials.
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.