| name | azure-ai-projects-ts |
| description | High-level SDK for Azure AI Foundry projects with agents, connections, deployments, and evaluations. |
| risk | unknown |
| source | community |
| date_added | 2026-02-27 |
Azure AI Projects SDK for TypeScript
High-level SDK for Azure AI Foundry projects with agents, connections, deployments, and evaluations.
Installation
npm install @azure/ai-projects @azure/identity
For tracing:
npm install @azure/monitor-opentelemetry @opentelemetry/api
Environment Variables
AZURE_AI_PROJECT_ENDPOINT=https://<resource>.services.ai.azure.com/api/projects/<project>
MODEL_DEPLOYMENT_NAME=gpt-4o
Authentication
import { AIProjectClient } from "@azure/ai-projects";
import { DefaultAzureCredential } from "@azure/identity";
const client = new AIProjectClient(
process.env.AZURE_AI_PROJECT_ENDPOINT!,
new DefaultAzureCredential()
);
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
const openAIClient = await client.getOpenAIClient();
const response = await openAIClient.responses.create({
model: "gpt-4o",
input: "What is the capital of France?"
});
const conversation = await openAIClient.conversations.create({
items: [{ type: "message", role: "user", content: "Hello!" }]
});
Agents
Create Agent
const agent = await client.agents.createVersion("my-agent", {
kind: "prompt",
model: "gpt-4o",
instructions: "You are a helpful assistant."
});
Agent with Tools
const agent = await client.agents.createVersion("code-agent", {
kind: "prompt",
model: "gpt-4o",
instructions: "You can execute code.",
tools: [{ type: "code_interpreter", container: { type: "auto" } }]
});
const agent = await client.agents.createVersion("search-agent", {
kind: "prompt",
model: "gpt-4o",
tools: [{ type: "file_search", vector_store_ids: [vectorStoreId] }]
});
const agent = await client.agents.createVersion("web-agent", {
kind: "prompt",
model: "gpt-4o",
tools: [{
type: "web_search_preview",
user_location: { type: "approximate", country: "US", city: "Seattle" }
}]
});
const agent = await client.agents.createVersion("aisearch-agent", {
kind: "prompt",
model: "gpt-4o",
tools: [{
type: "azure_ai_search",
azure_ai_search: {
indexes: [{
project_connection_id: connectionId,
index_name: "my-index",
query_type: "simple"
}]
}
}]
});
const agent = await client.agents.createVersion("func-agent", {
kind: "prompt",
model: "gpt-4o",
tools: [{
type: "function",
function: {
name: "get_weather",
description: "Get weather for a location",
strict: true,
parameters: {
type: "object",
properties: { location: { type: "string" } },
required: ["location"]
}
}
}]
});
const agent = await client.agents.createVersion("mcp-agent", {
kind: "prompt",
model: "gpt-4o",
tools: [{
type: "mcp",
server_label: "my-mcp",
server_url: "https://mcp-server.example.com",
require_approval: "always"
}]
});
Run Agent
const openAIClient = await client.getOpenAIClient();
const conversation = await openAIClient.conversations.create({
items: [{ type: "message", role: "user", content: "Hello!" }]
});
const response = await openAIClient.responses.create(
{ conversation: conversation.id },
{ body: { agent: { name: agent.name, type: "agent_reference" } } }
);
await openAIClient.conversations.delete(conversation.id);
await client.agents.deleteVersion(agent.name, agent.version);
Connections
for await (const conn of client.connections.list()) {
console.log(conn.name, conn.type);
}
const conn = await client.connections.get("my-connection");
const connWithCreds = await client.connections.getWithCredentials("my-connection");
const defaultAzureOpenAI = await client.connections.getDefault("AzureOpenAI", true);
Deployments
for await (const deployment of client.deployments.list()) {
if (deployment.type === "ModelDeployment") {
console.log(deployment.name, deployment.modelName);
}
}
for await (const d of client.deployments.list({ modelPublisher: "OpenAI" })) {
console.log(d.name);
}
const deployment = await client.deployments.get("gpt-4o");
Datasets
const dataset = await client.datasets.uploadFile(
"my-dataset",
"1.0",
"./data/training.jsonl"
);
const dataset = await client.datasets.uploadFolder(
"my-dataset",
"2.0",
"./data/documents/"
);
const ds = await client.datasets.get("my-dataset", "1.0");
for await (const version of client.datasets.listVersions("my-dataset")) {
console.log(version);
}
await client.datasets.delete("my-dataset", "1.0");
Indexes
import { AzureAISearchIndex } from "@azure/ai-projects";
const indexConfig: AzureAISearchIndex = {
name: "my-index",
type: "AzureSearch",
version: "1",
indexName: "my-index",
connectionName: "search-connection"
};
const index = await client.indexes.createOrUpdate("my-index", "1", indexConfig);
for await (const idx of client.indexes.list()) {
console.log(idx.name);
}
await client.indexes.delete("my-index", "1");
Key Types
import {
AIProjectClient,
AIProjectClientOptionalParams,
Connection,
ModelDeployment,
DatasetVersionUnion,
AzureAISearchIndex
} from "@azure/ai-projects";
Best Practices
- Use getOpenAIClient() - For responses, conversations, files, and vector stores
- Version your agents - Use
createVersion for reproducible agent definitions
- Clean up resources - Delete agents, conversations when done
- Use connections - Get credentials from project connections, don't hardcode
- Filter deployments - Use
modelPublisher filter to find specific models
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
AGI Framework Integration
Adapted for @techwavedev/agi-agent-kit
Original source: antigravity-awesome-skills
Memory-First Protocol
Retrieve prior agent configurations, team compositions, and orchestration patterns. Critical for multi-agent system consistency.
python3 execution/memory_manager.py auto --query "agent patterns and orchestration strategies for Azure Ai Projects Ts"
Storing Results
After completing work, store AI agent orchestration decisions for future sessions:
python3 execution/memory_manager.py store \
--content "Agent pattern: hierarchical orchestration with Control Tower dispatcher, 3 specialist sub-agents" \
--type decision --project <project> \
--tags azure-ai-projects-ts ai-agents
Multi-Agent Collaboration
This skill is inherently multi-agent. Use cross-agent context to coordinate task distribution and avoid duplicate work.
python3 execution/cross_agent_context.py store \
--agent "<your-agent>" \
--action "Agent architecture designed — Control Tower + specialist agents with shared Qdrant memory" \
--project <project>
Control Tower Integration
Register agents and tasks with the Control Tower (execution/control_tower.py) for centralized orchestration across machines and LLM providers.
Blockchain Identity
Each agent has a cryptographic Ed25519 identity. All memory writes are signed — enabling trust verification in multi-agent systems.