azure-ai-projects-java – skill Lập trình cho agent AI
SDK Azure AI Projects cho Java. SDK cấp cao quản lý dự án Azure AI Foundry gồm connection, dataset, index và evaluation.
Cài skill azure-ai-projects-java bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/azure-ai-projects-java-6251d.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /azure-ai-projects-java – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/azure-ai-projects-java-6251d.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $azure-ai-projects-java – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/azure-ai-projects-java-6251d.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /azure-ai-projects-java – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/azure-ai-projects-java-6251d.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /azure-ai-projects-java – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
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.
Skill liên quan
- yeet – Chỉ dùng khi người dùng yêu cầu rõ ràng stage, commit, push và mở pull request trên…
- hunt-nodejs – Săn các lỗ hổng đặc thù Node.js — chuỗi Prototype Pollution → RCE (lodash/merge/assign)…
- google-workspace – Gmail, Calendar, Drive, Docs, Sheets qua gws CLI hoặc Python.
- azure-ai-vision-imageanalysis-java – Xây dựng ứng dụng phân tích ảnh với SDK Azure AI Vision cho Java. Dùng khi triển khai…
- azure-ai-voicelive-java – SDK Azure AI VoiceLive cho Java. Hội thoại giọng nói hai chiều thời gian thực với trợ lý…
- langchain-architecture – Thiết kế ứng dụng LLM bằng LangChain 1.x và LangGraph cho agent, bộ nhớ và tích hợp công…
- grok – Giao việc lập trình cho xAI Grok Build CLI (tính năng, PR).
- azure-appconfiguration-java – SDK Azure App Configuration cho Java. Quản lý cấu hình ứng dụng tập trung với cặp…