Azure AI Agents Persistent SDK for Java
Create persistent AI agents with Azure SDK
Build persistent AI agents that maintain state across sessions. This SDK provides low-level control over agent threads, messages, and runs in Java applications.
تنزيل ZIP المهارة
رفع في Claude
اذهب إلى Settings → Capabilities → Skills → Upload skill
فعّل وابدأ الاستخدام
اختبرها
استخدام "Azure AI Agents Persistent SDK for Java". Create a math tutor agent that helps students with algebra
النتيجة المتوقعة:
- Agent 'Math Tutor' created successfully with ID: agent_abc123
- Thread created with ID: thread_xyz789
- Message added to thread
- Run initiated and completed
- Assistant: To solve 2x + 5 = 15, first subtract 5 from both sides...
استخدام "Azure AI Agents Persistent SDK for Java". Execute code to solve a quadratic equation
النتيجة المتوقعة:
- Run status: RequiresAction
- Tool call: code_interpreter
- Code executed: numpy.roots([1, -5, 6])
- Assistant: The solutions are x = 2 and x = 3
التدقيق الأمني
آمنStatic analysis scanned 0 files with 0 lines. Risk score: 0/100. This skill contains only documentation (SKILL.md) describing the Azure AI Agents Persistent SDK for Java. No executable code, scripts, or security-sensitive patterns detected. The documentation describes standard Azure authentication patterns using DefaultAzureCredential which is the recommended secure approach.
درجة الجودة
ماذا يمكنك بناءه
Customer Support Agent Integration
Embed a persistent support agent in your Java backend that maintains conversation history across customer sessions.
Educational Tutoring System
Build a personalized tutoring agent that tracks student progress and adapts teaching style over multiple sessions.
Enterprise Assistant Workflow
Create reusable agent instances for common enterprise tasks like document processing or data analysis.
جرّب هذه الموجهات
Help me create a basic Azure AI persistent agent using Java. Show me how to set up authentication with DefaultAzureCredential, create an agent with custom instructions, and send a simple message.
Show me how to build a multi-turn conversation flow with Azure AI persistent agents. Include thread creation, adding messages, running the agent, polling for completion, and retrieving all messages from the thread.
I need to create an Azure AI agent that uses custom tools. Show me how to define tools, attach them to an agent, handle the RequiresAction status, and submit tool outputs back to the run.
Create a complete production-ready example of Azure AI persistent agents in Java. Include proper error handling for all run statuses, async client usage for high throughput, resource cleanup in finally blocks, and environment-based configuration.
أفضل الممارسات
- Use DefaultAzureCredential for secure production authentication instead of hardcoded keys
- Implement proper polling delays (500ms recommended) between run status checks to avoid rate limiting
- Always clean up resources by deleting threads and agents when no longer needed
تجنب
- Skipping polling between run status checks which causes missed state transitions
- Hardcoding credentials instead of using environment variables and Azure managed identities
- Not handling all run statuses (RequiresAction, Failed, Cancelled) leading to stuck workflows