azure-ai-agents-persistent-java
Azure AI Agents Persistent SDK for Java.
Skill by MicrosoftOfficial
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/microsoft-azure-ai-agents-persistent-java
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: cloud, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/azure-ai-agents-persistent-java
What's inside
- Skill 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. Triggers: "PersistentAgentsClient", "persistent agents java", "agent threads java", "agent runs java", "streaming agents java".
- License
- MIT
- Metadata
- author: Microsoft · package: com.azure:azure-ai-agents-persistent · version: 1.0.0
- Instructions
- 142 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- examples.md · references/
SKILL.md (first lines)
# Azure AI Agents Persistent SDK for Java
Low-level SDK for creating and managing persistent AI agents with threads, messages, runs, and tools.
## Installation
```xml
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-ai-agents-persistent</artifactId>
<version>1.0.0-beta.1</version>
</dependency>
```
## Environment Variables
```bash
PROJECT_ENDPOINT=https://<resource>.services.ai.azure.com/api/projects/<project> # Required for project configuration
MODEL_DEPLOYMENT_NAME=gpt-4o-mini # Required for agent model selection
AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production
```
## Authentication
```java
import com.azure.ai.agents.persistent.PersistentAgentsClient;
import com.azure.ai.agents.persistent.PersistentAgentsClientBuilder;
import com.azure.core.credential.TokenCredential;
import com.azure.identity.AzureIdentityEnvVars;
import com.azure.identity.DefaultAzureCredentialBuilder;
import com.azure.identity.ManagedIdentityCredentialBuilder;
String endpoint = System.getenv("PROJECT_ENDPOINT");
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();
PersistentAgentsClient client = new PersistentAgentsClientBuilder()
.endpoint(endpoint)
.credential(credential)
.buildClient();
```
## Key Concepts
The Azure AI Agents Persistent SDK provides a low-level API for managing persistent agents that can be reused across sessions.
### Client Hierarchy
| Client | Purpose |
|--------|---------|
| `PersistentAgentsClient` | Sync client for agent operations |
| `PersistentAgentsAsyncClient` | Async client for agent operations |
## Core Workflow
### 1. Create Agent
```java
// Create agent with tools
PersistentAgent agent = client.createAgent(
modelDeploymentName,
"Math Tutor",
"You are a personal math tutor."
);
```
### 2. Create Thread
```java
PersistentAgentThread thread = client.createThread();
```
### 3. Add Message
```java
client.createMessage(
thread.getId(),
MessageRole.USER,
"I need help with equations."
);
```
### 4. Run Agent
```java
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());
}
```
### 5. Get Response
```java
PagedIterable<PersistentThreadMessage> messages = client.listMessages(thread.getId());
for (PersistentThreadMessage message : messages) {
System.out.println(message.getRole() + ": " + message.getContent());
}
```
### 6. Cleanup
```java
client.deleteThread(thread.getId());
client.deleteAgent(agent.getId());
```
## Best Practices
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 doneFrom microsoft/skills, MIT.
More from microsoft/skills
- 0.651score
skill-creator
microsoftOfficial
Guide for creating effective skills for AI coding agents working with Azure SDKs and Microsoft Foundry services.
SkillBFreshness: B★ 3.1KClaude Code +9 - 0.643score
azure-search-nav
MicrosoftOfficial
Builds an Azure portal deep link to a specific blade/menu item for supported Microsoft.ContainerService, Microsoft.Kubernetes, and Microsoft.Compute resources…
SkillAFreshness: A★ 3.1KClaude Code +9 - 0.643score
azure-compliance
MicrosoftOfficial
Run Azure compliance and security audits with azqr plus Key Vault expiration checks.
SkillAFreshness: A★ 3.1KClaude Code +9 - 0.643score
aks-known-issues
MicrosoftOfficial
Lookup documented AKS fixes only when the prompt includes an exact catalog signature and all of its qualifiers: VMCannotFitEphemeralOSDisk…
SkillAFreshness: A★ 3.1KClaude Code +9 - 0.643score
aks-gpu-inference
MicrosoftOfficial
Diagnose Day-2 AKS GPU and KAITO incidents using profile-aware, read-only evidence.
SkillAFreshness: A★ 3.1KClaude Code +9 - 0.643score
foundry-iq
MicrosoftOfficial
Foundry IQ knowledge bases.
SkillAFreshness: A★ 3.1KClaude Code +9 - 0.643score
aks-network-capture
MicrosoftOfficial
Collects bounded packet captures from AKS nodes and Azure network configuration for wire-level evidence.
SkillAFreshness: A★ 3.1KClaude Code +9 - 0.643score
azure-app-onboard
MicrosoftOfficial
End-to-end orchestrator: from a business idea, app idea, or existing app to running Azure deployment with cost estimates and pre-deploy approval.
SkillAFreshness: A★ 3.1KClaude Code +9 - 0.643score
azure-prepare
MicrosoftOfficial
Prepare azd-based Azure projects for deployment: generates azure.yaml, infrastructure (Bicep/Terraform), and Dockerfiles for the Azure Developer CLI (azd)…
SkillAFreshness: A★ 3.1KClaude Code +9 - 0.643score
azure-kubernetes
MicrosoftOfficial
Plan, create, and configure production-ready Azure Kubernetes Service (AKS) clusters.
SkillAFreshness: A★ 3.1KClaude Code +9 - 0.643score
appinsights-instrumentation
MicrosoftOfficial
Guidance for instrumenting webapps with Azure Application Insights.
SkillAFreshness: A★ 3.1KClaude Code +9 - 0.643score
aks-troubleshooting
MicrosoftOfficial
Debug live Azure Kubernetes Service (AKS) incidents with a read-only, evidence-first investigation.
SkillAFreshness: A★ 3.1KClaude Code +9
Signals
- Stars
- 3,145
- Forks
- 354
- Open issues
- 26
- Contributors
- 32
- Last commit (this folder)
- Apr 29, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 1.0.0
- License
- MIT
- Repository
- github.com/microsoft/skills
- Website
- microsoft.github.io/skills/
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from Microsoft
- 0.643score
azure-kubernetes
MicrosoftOfficial
Plan, create, and configure production-ready Azure Kubernetes Service (AKS) clusters.
SkillAFreshness: A★ 3.1KClaude Code +9 - 0.643score
azure-prepare
MicrosoftOfficial
Prepare azd-based Azure projects for deployment: generates azure.yaml, infrastructure (Bicep/Terraform), and Dockerfiles for the Azure Developer CLI (azd)…
SkillAFreshness: A★ 3.1KClaude Code +9 - 0.643score
azure-app-onboard
MicrosoftOfficial
End-to-end orchestrator: from a business idea, app idea, or existing app to running Azure deployment with cost estimates and pre-deploy approval.
SkillAFreshness: A★ 3.1KClaude Code +9 - 0.643score
appinsights-instrumentation
MicrosoftOfficial
Guidance for instrumenting webapps with Azure Application Insights.
SkillAFreshness: A★ 3.1KClaude Code +9 - 0.643score
azure-compliance
MicrosoftOfficial
Run Azure compliance and security audits with azqr plus Key Vault expiration checks.
SkillAFreshness: A★ 3.1KClaude Code +9 - 0.643score
foundry-iq
MicrosoftOfficial
Foundry IQ knowledge bases.
SkillAFreshness: A★ 3.1KClaude Code +9
Cite this page
azure-ai-agents-persistent-java skill. Agent Mart. https://agentmart.dev/skills/microsoft-azure-ai-agents-persistent-java (last updated 2026-10-24)