Add this skill
npx mdskills install sickn33/azure-ai-agents-persistent-javaDocumentation for Azure SDK usage, not actionable agent instructions or workflow triggers
Low-level SDK for creating and managing persistent AI agents with threads, messages, runs, and tools.
com.azure
azure-ai-agents-persistent
1.0.0-beta.1
PROJECT_ENDPOINT=https://.services.ai.azure.com/api/projects/
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 messages = client.listMessages(thread.getId());
for (PersistentThreadMessage message : messages) {
System.out.println(message.getRole() + ": " + message.getContent());
}
client.deleteThread(thread.getId());
client.deleteAgent(agent.getId());
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 |
Install via CLI
npx mdskills install sickn33/azure-ai-agents-persistent-javaAzure AI Agents Persistent Java is a free, open-source AI agent skill. |
Install Azure AI Agents Persistent Java with a single command:
npx mdskills install sickn33/azure-ai-agents-persistent-javaThis downloads the skill files into your project and your AI agent picks them up automatically.
Azure AI Agents Persistent Java works with Claude Code, Claude Desktop, Cursor, Vscode Copilot, Windsurf, Continue Dev, Codex, Gemini Cli, Amp, Roo Code, Goose, Opencode, Trae, Qodo, Command Code. Skills use the open SKILL.md format which is compatible with any AI coding agent that reads markdown instructions.