azure-ai-projects-java
High-level Java SDK to interact with and manage Azure AI Foundry projects and evaluations.
Install
mkdir -p .claude/skills/azure-ai-projects-java && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/1957" && unzip -o skill.zip -d .claude/skills/azure-ai-projects-java && rm skill.zipInstalls to .claude/skills/azure-ai-projects-java
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Azure AI Projects SDK for Java. High-level SDK for Azure AI Foundry project management including connections, datasets, indexes, and evaluations. Triggers: "AIProjectClient java", "azure ai projects java", "Foundry project java", "ConnectionsClient", "DatasetsClient", "IndexesClient".Key capabilities
- →Manage Azure AI Foundry project connections
- →Upload and manage datasets
- →Create and manage search indexes
- →Run AI model evaluations
- →Enumerate model deployments
How it works
The SDK provides a high-level Java client hierarchy to interact with Azure AI Foundry services, including sub-clients for specific resource types.
Inputs & outputs
When to use azure-ai-projects-java
- →Managing AI projects in Azure with Java
- →Connecting to Azure AI datasets
- →Running AI model evaluations
About this skill
Azure AI Projects SDK for Java
High-level SDK for Azure AI Foundry project management with access to connections, datasets, indexes, and evaluations.
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> # Required for project configuration
AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production
Authentication
import com.azure.ai.projects.AIProjectClientBuilder;
import com.azure.core.credential.TokenCredential;
import com.azure.identity.AzureIdentityEnvVars;
import com.azure.identity.DefaultAzureCredentialBuilder;
import com.azure.identity.ManagedIdentityCredentialBuilder;
TokenCredential credential = new DefaultAzureCredentialBuilder()
.requireEnvVars(AzureIdentityEnvVars.AZURE_TOKEN_CREDENTIALS)
.build();
// Or use a specific credential directly in production:
// See https://learn.microsoft.com/java/api/overview/azure/identity-readme?view=azure-java-stable#credential-classes
// TokenCredential credential = new ManagedIdentityCredentialBuilder().build();
AIProjectClientBuilder builder = new AIProjectClientBuilder()
.endpoint(System.getenv("PROJECT_ENDPOINT"))
.credential(credential);
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());
Access OpenAI Evaluations
The SDK exposes OpenAI's official SDK for evaluations:
import com.openai.services.EvalService;
EvalService evalService = evaluationsClient.getOpenAIClient();
// Use OpenAI evaluation APIs directly
Best Practices
- Use DefaultAzureCredential for production authentication
- Reuse client builder to create multiple sub-clients efficiently
- Handle pagination when listing resources with
PagedIterable - Use environment variables for connection names and configuration
- 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
When not to use it
- →When using non-Azure AI services
- →When requiring low-level REST API access without SDK abstraction
Prerequisites
Limitations
- →Requires specific environment variables for configuration
- →Pagination handling required for large resource lists
How it compares
It provides a structured, object-oriented Java interface for Azure AI management, simplifying interactions compared to raw REST calls.
Compared to similar skills
azure-ai-projects-java side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| azure-ai-projects-java (this skill) | 2 | 3mo | Review | Intermediate |
| springboot-patterns | 11 | 5mo | No flags | Intermediate |
| agentscope-java | 1 | 2mo | No flags | Advanced |
| http-generate | 1 | 7mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by microsoft
View all by microsoft →You might also like
springboot-patterns
affaan-m
Spring Boot 架构模式、REST API 设计、分层服务、数据访问、缓存、异步处理和日志记录。适用于 Java Spring Boot 后端工作。
agentscope-java
agentscope-ai
Expert Java developer skill for AgentScope Java framework - a reactive, message-driven multi-agent system built on Project Reactor. Use when working with reactive programming, LLM integration, agent orchestration, multi-agent systems, or when the user mentions AgentScope, ReActAgent, Mono/Flux, Project Reactor, or Java agent development. Specializes in non-blocking code, tool integration, hooks, pipelines, and production-ready agent applications.
http-generate
spring-ai-alibaba
Generates HTTP request examples for Spring Boot Web interfaces according to task specification and saves them as .http files in module-generate.md directories
azure-eventgrid-java
microsoft
Build event-driven applications with Azure Event Grid SDK for Java. Use when publishing events, implementing pub/sub patterns, or integrating with Azure services via events.
azure-communication-chat-java
microsoft
Build real-time chat applications with Azure Communication Services Chat Java SDK. Use when implementing chat threads, messaging, participants, read receipts, typing notifications, or real-time chat features.
generating-api-contracts
jeremylongshore
Generate API contracts and OpenAPI specifications from code or design documents. Use when documenting API contracts and specifications. Trigger with phrases like "generate API contract", "create OpenAPI spec", or "document API contract".