00-andruia-consultant
Arquitecto de Soluciones Principal y Consultor Tecnológico de Andru.ia. Diagnostica y traza la hoja de ruta óptima para proyectos de IA en español.
Azure AI Agents Persistent SDK for Java. Low-level SDK for creating and managing AI agents with threads, messages, runs, and tools.
$ npx -y skills add sickn33/antigravity-awesome-skills --skill azure-ai-agents-persistent-java --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/azure-ai-agents-persistent-javaContext preview
The summary Claude sees to decide when to auto-load this skill.
Azure AI Agents Persistent SDK for Java. Low-level SDK for creating and managing AI agents with threads, messages, runs, and tools.
name: azure-ai-agents-persistent-java description: Azure AI Agents Persistent SDK for Java. Low-level SDK for creating and managing AI agents with threads, messages, runs, and tools. risk: critical source: community date_added: '2026-02-27'
Low-level SDK for creating and managing persistent AI agents with threads, messages, runs, and tools.
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-ai-agents-persistent</artifactId>
<version>1.0.0-beta.1</version>
</dependency>PROJECT_ENDPOINT=https://<resource>.services.ai.azure.com/api/projects/<project> MODEL_DEPLOYMENT_NAME=gpt-4o-mini
import com.azure.ai.agents.persistent.PersistentAgentsClient;
import com.azure.ai.agents.persistent.PersistentAgentsClientBuilder;
import com.azure.identity.DefaultAzureCredentialBuilder;
String endpoint = System.getenv("PROJECT_ENDPOINT");
PersistentAgentsClient client = new PersistentAgentsClientBuilder()
.endpoint(endpoint)
.credential(new DefaultAzureCredentialBuilder().build())
.buildClient();The Azure AI Agents Persistent SDK provides a low-level API for managing persistent agents that can be reused across sessions.
| Client | Purpose | |--------|---------| | `PersistentAgentsClient` | Sync client for agent operations | | `PersistentAgentsAsyncClient` | Async client for agent operations |
// Create agent with tools
PersistentAgent agent = client.createAgent(
modelDeploymentName,
"Math Tutor",
"You are a personal math tutor."
);PersistentAgentThread thread = client.createThread();
client.createMessage(
thread.getId(),
MessageRole.USER,
"I need help with equations."
);ThreadRun run = client.createRun(thread.getId(), agent.getId());
// Poll for completion
while (run.getStatus() == RunStatus.QUEUED || run.getStatus() == RunStatus.IN_PROGRESS) {
Thread.sleep(500);
run = client.getRun(thread.getId(), run.getId());
}PagedIterable<PersistentThreadMessage> messages = client.listMessages(thread.getId());
for (PersistentThreadMessage message : messages) {
System.out.println(message.getRole() + ": " + message.getContent());
}client.deleteThread(thread.getId()); client.deleteAgent(agent.getId());
1. **Use DefaultAzureCredential** for production authentication 2. **Poll with appropriate delays** — 500ms recommended between status checks 3. **Clean up resources** — Delete threads and agents when done 4. **Handle all run statuses** — Check for RequiresAction, Failed, Cancelled 5. **Use async client** for better throughput in high-concurrency scenarios
import com.azure.core.exception.HttpResponseException;
try {
PersistentAgent agent = client.createAgent(modelName, name, instructions);
} catch (HttpResponseException e) {
System.err.println("Error: " + e.getResponse().getStatusCode() + " - " + e.getMessage());
}| Resource | URL | |----------|-----| | Maven Package | https://central.sonatype.com/artifact/com.azure/azure-ai-agents-persistent | | GitHub Source | https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/ai/azure-ai-agents-persistent |
This skill is applicable to execute the workflow or actions described in the overview.
Find reusable instructions for your project, inspect their complete files, and keep an exact skill set you can review and reuse. Codex or Claude inspects your project and chooses exact skills from the complete local AAS catalog.
Repo: sickn33/antigravity-awesome-skills
Arquitecto de Soluciones Principal y Consultor Tecnológico de Andru.ia. Diagnostica y traza la hoja de ruta óptima para proyectos de IA en español.
Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any…
Ingeniero de Sistemas de Andru.ia. Diseña, redacta y despliega nuevas habilidades (skills) dentro del repositorio siguiendo el Estándar de Diamante.
Estratega de Inteligencia de Dominio de Andru.ia. Analiza el nicho específico de un proyecto para inyectar conocimientos, regulaciones y estándares únicos del…
AI-powered presentation generation via the 2slides API — create slides from text, match a reference image style, summarize documents into decks, add AI voice…