azure-ai-projects-java – Coding skill for AI agents
Azure AI Projects SDK for Java. High-level SDK for Azure AI Foundry project management including connections, datasets, indexes, and evaluations.
Install the azure-ai-projects-java skill with one command
Pick the tool you use, copy the command and paste it in your terminal. The skill lands in that tool's skills folder and is ready in your next session.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/azure-ai-projects-java-6251d.tgz | tar xz -C ~/.claude/skills
Call it in Claude Code: /azure-ai-projects-java – then describe the task you want done.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/azure-ai-projects-java-6251d.tgz | tar xz -C ~/.codex/skills
Call it in Codex: $azure-ai-projects-java – then describe the task you want done.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/azure-ai-projects-java-6251d.tgz | tar xz -C ~/.hermes/skills
Call it in Hermes Agent: /azure-ai-projects-java – then describe the task you want done.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/azure-ai-projects-java-6251d.tgz | tar xz -C ~/.deepcode/skills
Call it in DeepSeek: /azure-ai-projects-java – then describe the task you want done.
SKILL.md content
Azure AI Projects SDK for Java
High-level SDK for Azure AI Foundry project management with access to connections, datasets, indexes, and evaluations.
Version and data boundary
This guide names a historical beta SDK. Inspect the selected artifact’s exact API before using client-builder/model signatures; pin compatible identity/core dependencies and compile a minimal test. Use synthetic data in an authorized test project. Dataset upload, index mutation, evaluation provider charges and schedules are separate effects; inspect destination, retention and cost before executing. Never log connection credentials.
Installation
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-ai-projects</artifactId>
<version>1.0.0-beta.1</version>
</dependency>Environment Variables
PROJECT_ENDPOINT=https://<resource>.services.ai.azure.com/api/projects/<project>Authentication
import com.azure.ai.projects.AIProjectClientBuilder;
import com.azure.identity.DefaultAzureCredentialBuilder;
AIProjectClientBuilder builder = new AIProjectClientBuilder()
.endpoint(System.getenv("PROJECT_ENDPOINT"))
.credential(new DefaultAzureCredentialBuilder().build());Client Hierarchy
The SDK provides multiple sub-clients for different operations:
| Client | Purpose |
|--------|---------|
| ConnectionsClient | Enumerate connected Azure resources |
| DatasetsClient | Upload documents and manage datasets |
| DeploymentsClient | Enumerate AI model deployments |
| IndexesClient | Create and manage search indexes |
| EvaluationsClient | Run AI model evaluations |
| EvaluatorsClient | Manage evaluator configurations |
| SchedulesClient | Manage scheduled operations |
// Build sub-clients from builder
ConnectionsClient connectionsClient = builder.buildConnectionsClient();
DatasetsClient datasetsClient = builder.buildDatasetsClient();
DeploymentsClient deploymentsClient = builder.buildDeploymentsClient();
IndexesClient indexesClient = builder.buildIndexesClient();
EvaluationsClient evaluationsClient = builder.buildEvaluationsClient();Core Operations
List Connections
import com.azure.ai.projects.models.Connection;
import com.azure.core.http.rest.PagedIterable;
PagedIterable<Connection> connections = connectionsClient.listConnections();
for (Connection connection : connections) {
System.out.println("Name: " + connection.getName());
System.out.println("Type: " + connection.getType());
System.out.println("Credential Type: " + connection.getCredentials().getType());
}List Indexes
indexesClient.listLatest().forEach(index -> {
System.out.println("Index name: " + index.getName());
System.out.println("Version: " + index.getVersion());
System.out.println("Description: " + index.getDescription());
});Create or Update Index
import com.azure.ai.projects.models.AzureAISearchIndex;
import com.azure.ai.projects.models.Index;
String indexName = "my-index";
String indexVersion = "1.0";
String searchConnectionName = System.getenv("AI_SEARCH_CONNECTION_NAME");
String searchIndexName = System.getenv("AI_SEARCH_INDEX_NAME");
Index index = indexesClient.createOrUpdate(
indexName,
indexVersion,
new AzureAISearchIndex()
.setConnectionName(searchConnectionName)
.setIndexName(searchIndexName)
);
System.out.println("Created index: " + index.getName());Evaluation integration
Do not assume an EvaluationsClient is an OpenAI EvalService or exposes getOpenAIClient(). Check the exact installed beta SDK reference and construct the documented evaluation client for that API. These are distinct SDK surfaces and require compatible dependencies, endpoints and authorization.
Best Practices
1. Use DefaultAzureCredential for production authentication
2. Reuse client builder to create multiple sub-clients efficiently
3. Handle pagination when listing resources with PagedIterable
4. Use environment variables for connection names and configuration
5. Check connection types before accessing credentials
Error Handling
import com.azure.core.exception.HttpResponseException;
import com.azure.core.exception.ResourceNotFoundException;
try {
Index index = indexesClient.get(indexName, version);
} catch (ResourceNotFoundException e) {
System.err.println("Index not found: " + indexName);
} catch (HttpResponseException e) {
System.err.println("Error: " + e.getResponse().getStatusCode());
}Reference Links
| Resource | URL |
|----------|-----|
| Product Docs | https://learn.microsoft.com/azure/ai-studio/ |
| API Reference | https://learn.microsoft.com/rest/api/aifoundry/aiprojects/ |
| GitHub Source | https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/ai/azure-ai-projects |
| Samples | https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/ai/azure-ai-projects/src/samples |
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Related skills
- yeet – Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull…
- hunt-nodejs – Hunt Node.js specific vulnerabilities — Prototype Pollution → RCE chains…
- google-workspace – Gmail, Calendar, Drive, Docs, Sheets via gws CLI or Python.
- azure-ai-vision-imageanalysis-java – Build image analysis applications with Azure AI Vision SDK for Java. Use when…
- azure-ai-voicelive-java – Azure AI VoiceLive SDK for Java. Real-time bidirectional voice conversations with AI…
- langchain-architecture – Design LLM applications using LangChain 1.x and LangGraph for agents, memory, and tool…
- grok – Delegate coding to xAI Grok Build CLI (features, PRs).
- azure-appconfiguration-java – Azure App Configuration SDK for Java. Centralized application configuration management…