Azure Persistent Agents for .NET
A practical .NET playbook for building and operating Azure AI persistent agents.
The document describes Azure authentication, environment variables, and cleanup, and shows DefaultAzureCredential usage; however, it does not specify least-privilege permissions, user confirmation, sensitive-data handling, tool data flows, external-API risks, or recoverable rollback. Code Interpreter, file upload, function calling, OpenAPI, MCP, and SharePoint capabilities can create external effects, so substantial points are deducted.
Core workflows for creation, polling, streaming, function calling, and exception handling are documented, and the repository provides general CI/evaluation infrastructure; however, there is no skill-specific test evidence, installation guidance mixes --prerelease with stable/preview versions, the Azure AI Search example references an undefined searchConnectionId, and polling/failure-state handling is incomplete. Static evidence therefore supports only a conservative score.
The name, audience, SDK scope, and trigger phrases are clear, covering CRUD, threads, runs, streaming, tools, and search; however, non-fit scenarios, input/output contracts, permission prerequisites, and trigger boundaries are not defined. The core function depends on Azure AI services and network reachability, with no Chinese-language guidance or mainland-China connectivity treatment, so points are deducted.
The document has clear sections for installation, authentication, environment variables, workflows, examples, tool and type references, best practices, error handling, related SDKs, versions, MIT licensing, and reference links. It lacks a changelog, explicit maintenance ownership and update path, complete limitation disclosure, troubleshooting guidance, and stable parameter commitments, so it is not full marks.
For users familiar with Azure and .NET, the examples provide a useful starting point for the low-level persistent-agents SDK and cover major tasks. However, some examples are incomplete or rely on questionable variable/version assumptions, and production safeguards for retries, cancellation, timeouts, permissions, sensitive files, and tool-output validation are missing. The output therefore requires meaningful review and remains within the static effectiveness cap.
The skill provides version information and primary-source links to NuGet, Microsoft Learn, Azure SDK source, and samples; the repository also shows CI and general test code. However, no tests specific to this skill path, execution results, or independent review are supplied, and no code was executed in this assessment, so only limited static evidence is credited.
- The install command uses --prerelease while the version section lists both stable and preview releases; the target version and compatible API surface should be explicit and pinned.
- The Azure AI Search example uses an undefined searchConnectionId; the function-calling example executes tools directly without showing allowlists, authorization, input validation, or user confirmation.
- File upload, Code Interpreter, web search, and API/MCP tools may process sensitive data or create external side effects; deployment should add data-flow, least-privilege, auditing, and rollback guidance.
- No skill-specific reproducible execution results are provided; all examples should be validated against the intended SDK version.
What it does & when to use it
This skill targets .NET developers using the Azure.AI.Agents.Persistent SDK. It covers low-level management of agents, threads, messages, runs, files, and vector stores. The examples include polling and streaming, function calling, code interpreter, file search, Bing Grounding, and Azure AI Search. It is suited to applications that need direct control over agent execution and resource lifecycles rather than a high-level project-client abstraction.
It shows how to install Azure.AI.Agents.Persistent and Azure.Identity, configure an Azure AI project endpoint, model deployment, and optional connection resources. It demonstrates creating, reading, and deleting agents, threads, messages, runs, files, and vector stores; polling run status; consuming streaming updates; handling RequiresAction and function calls; and catching RequestFailedException. It also documents tool definitions and resources for code interpreter, file search, Bing, Azure AI Search, OpenAPI, Azure Functions, MCP, SharePoint, and Microsoft Fabric.
- A .NET backend team needs persistent Azure AI agents with conversation threads and message history.
- An application team needs real-time agent output and chooses the Runs streaming API.
- A .NET developer needs agents to call business functions and submit tool results.
- A document application needs agents to search uploaded files through vector stores.
- A developer is building a math, retrieval, or current-events assistant using code interpreter or Bing Grounding.
Pros & cons
- Covers the full low-level workflow from agent creation through resource cleanup.
- Includes polling, streaming, function calling, and several tool integrations.
- Provides concrete authentication, run-status, error-handling, and cleanup patterns.
- The repository is MIT-licensed and actively developed with expanding tests.
- As a low-level SDK guide, it requires developers to manage polling, status branches, and resource lifecycles.
- Examples depend on an Azure AI project endpoint, a model deployment, and relevant Azure connection resources.
- The source does not provide independent test coverage, performance data, or cost information for this specific skill.
- Some documented functionality uses a preview package version, so API stability must be assessed by adopters.
How to install
Install the repository's skill collection with npx skills add microsoft/skills, then select the required skill in the wizard. Skills are installed into the selected agent's directory, such as .github/skills/ for GitHub Copilot. The target file is .github/plugins/azure-sdk-dotnet/skills/azure-ai-agents-persistent-dotnet/SKILL.md. The documented package commands are dotnet add package Azure.AI.Agents.Persistent --prerelease and dotnet add package Azure.Identity.
How to use
In an Agent Skills-compatible coding agent, ask for a task such as “Use PersistentAgentsClient to create a persistent .NET agent and thread with streaming responses” or “Add function calling and file search to a .NET agent.” Configure PROJECT_ENDPOINT and MODEL_DEPLOYMENT_NAME; Bing and Azure AI Search examples also require their connection IDs. The source lists Stable v1.1.0 and Preview v1.2.0-beta.8 but does not document a version-selection policy.
Compared to similar skills
The source explicitly identifies Azure.AI.Projects as a high-level project client, while this skill focuses on the lower-level Azure.AI.Agents.Persistent SDK. Choose this skill when direct control over threads, runs, and tool execution matters; use the related SDK guidance when a higher-level Foundry project client is the better fit.