What are custom agents, skills and agent memory in Azure SRE Agent?
Imagine your team has been running the same web app for three years. Your senior engineer knows that when the counter page throws HTTP 500, the first thing to check is one app setting, then one line in Program.cs, then the 5xx metric for that minute. She doesn’t need to think about it. A new team member, or an AI agent, starts from zero every time and spends twenty minutes rediscovering the same path.
That is the gap this article is about. Out of the box, Azure SRE Agent is a capable generalist. In Article 1 we created the agent and onboarded it, and in Article 2 it found the root cause of a broken demo app using GitHub code context. But a generalist still has to be told how your team works. Azure SRE Agent gives you three building blocks for that:
- Skills – your runbooks, written as a
SKILL.mdfile (optionally with tools). The agent loads a skill automatically when the situation matches its description. - Custom agents (the docs also call them subagents) – focused specialists with their own instructions, skills and tools. You call them on demand with
/agent, or wire them to incident response plans and scheduled tasks. - Memory – what the agent remembers between conversations: facts you save with
#remember, knowledge files you upload, and session insights it writes itself after every investigation.
In this article I build one of each on the same az-sre-agent from the earlier articles: a skill for the counter app’s HTTP 500 case, a read-only app-service-health custom agent, and a few memory entries. Everything is done in the sre.azure.com portal.
Where things stand (December 2026)
Azure SRE Agent has been generally available since 10 March 2026. Skills, custom agents and the memory system are all part of the GA portal; Microsoft Learn still labels some memory pages as preview, and the portal moves faster than the docs. Two differences I noticed in my own tenant:
- The docs place Agent Canvas under Builder or Build + setup → Workflows. In the live portal it is Build + configure → Agent Canvas.
- The docs list a Handoff Description field when you create a custom agent. The current form has Name, Instructions, Skills, Tools and Hooks; handoffs are drawn on the canvas instead.
Skills vs custom agents vs memory – which one do I need?
| Skill | Custom agent | Memory / knowledge | |
|---|---|---|---|
| What it is | A runbook (SKILL.md) plus optional tools | A specialist with its own instructions, skills, tools and hooks | Facts, documents and past investigation learnings |
| How it’s used | Automatically, when the description matches | Explicitly with /agent, or from an incident plan / scheduled task | Searched automatically by the built-in memory_search skill |
| Best for | Repeatable procedures (“when X happens, check A, B, C”) | A domain expert (App Service, databases, networking) or a multi-step workflow | Context that doesn’t change often: owners, environments, “this is normal” |
| Example in this article | counter-app-http500 | app-service-health | #remember the demo app’s context |
My rule of thumb: write it as a skill first. Promote it to a custom agent only when you want a separate persona with a narrower tool set, or when you want to trigger it from an incident or a schedule.
Step 1 – Open Agent Canvas and look at the built-in skills
Open sre.azure.com, select your agent and go to Build + configure → Agent Canvas. On a new agent the canvas is empty, with two buttons: Create custom agent and Create skill. The Canvas view / Table view / Test playground toggle at the top switches between the visual diagram, a list and a split-screen test chat.

Figure 1: Agent Canvas on a new agent – nothing custom yet
Before writing your own, look at what ships with the agent: Build + configure → Extensions → Skills. My agent showed 37 of 45 built-in skills active. Three are locked on and can’t be turned off – executing_code_in_workspace, memory_search and self_manual – and the rest (AKS, API Management, App Insights, Activity Logs, Azure CLI, Container Apps, web_app_down and so on) can be switched off per agent. Each description tells the agent when to load the skill, and that is exactly how your own skills work too.

Figure 2: Built-in skills – 37 of 45 active, three core skills locked on
Tip: turn off built-in skills for services you don’t run. Fewer candidate skills means less chance the agent picks the wrong one, and a smaller prompt.
Step 2 – Create a skill from a real runbook
The best skill content comes from an investigation that already happened. In Article 2 the agent investigated the HTTP 500 on sre-demo-counter-pks, and its session insight (Step 5) even wrote down the investigation pattern. I turned that into a skill.
On Agent Canvas, open the Create dropdown. The options are Custom agent, Remote agent, Skill, Trigger and Tool. Select Skill.

Figure 3: The Create menu on Agent Canvas
2.1 Name, description and SKILL.md
The dialog has the form on the left and a SKILL.md editor on the right. The YAML front matter (name, description, tools) stays in sync with the form fields, so you can type in either place. The description is the most important line: the agent reads every skill description in its system prompt and decides from that alone whether to load the skill.
---name: counter-app-http500description: Use when the sre-demo-counter-pks web app returns HTTP 500 errors, or someone reports the Increment button failing after a few clicks.tools: - RunAzCliReadCommands---## When to use this skillUse this skill for HTTP 500 / Http5xx reports on the App Serviceweb app sre-demo-counter-pks in rg-sre-agent-demo.## Steps1. Confirm the app state with az webapp show (state, plan, runtime).2. Check the live app settings with az webapp config appsettings list. If INJECT_ERROR=1 is set, that is the most likely cause.3. In the connected repo (Program.cs), look at the Increment handler: it raises the crashCount cookie and throws "Simulated error after 5 button clicks!" when INJECT_ERROR=1 and the count is above five.4. Compare Http5xx with Requests for the same minute using AnalyzeMetrics.5. Use az webapp deployment source show to confirm which repo and branch is deployed.## Rules- Read-only. Never change app settings, restart the app or redeploy. Propose the fix and wait for a human.- If the deployed commit or an exception trace is not available, report the cause as "likely", not "proven".## Expected outputA short report: affected resource, likely root cause, evidence (setting,code line, metric counts), recommended fix (remove INJECT_ERROR or set itto 0), and evidence gaps.
2.2 Tools and supporting files
Under Tools → Choose tools I added only RunAzCliReadCommands (the Azure Operation group also has RunAzCliWriteCommands and GetAzCliHelp). The tool picker groups 80+ tools into Azure Operation, Code Analysis, DevOps, Diagnostics, Knowledge Base, Log Query, Monitoring, Release Management, Utility and Visualization. The portal’s own hint is worth repeating: tools attached to a skill are only available while the skill is active; for consistent behaviour, attach tools to the agent instead.
The Files area takes extra files next to SKILL.md – a KQL query, a shell script, a longer runbook. Keep SKILL.md short and put detail in those files.

Figure 4: Create skill – form fields on the left, SKILL.md on the right, RunAzCliReadCommands attached
Select Create. The skill appears on the canvas under Skills · 1, and the main agent can use it straight away – no /skill command needed. The docs note a limit of five active skills at a time; the oldest one is unloaded when a sixth is needed, and active skills are cleared when the conversation is compacted.
Step 3 – Create a custom agent
A skill tells the agent how to do something. A custom agent is a separate specialist that you invoke on purpose. I created app-service-health: a read-only App Service health checker that always answers in the same format.
On Agent Canvas, select Create → Custom agent. The dialog has Form and YAML tabs and a flask icon (Test live agent) to try it before saving.
3.1 Name and instructions
The instructions are the custom agent’s system prompt. I kept them short and specific, with a fixed output format and explicit rules:
You are a read-only Azure App Service health specialist for therg-sre-agent-demo resource group.When invoked:1. Identify the web app the user is asking about (default: sre-demo-counter-pks).2. Check its state, App Service plan, runtime and recent deployments.3. Compare Http5xx, Requests and response time for the last hour.4. If the counter-app-http500 skill applies, follow it.5. Reply with a short health card: Status (Healthy / Degraded / Down), Evidence (metrics and settings you checked), Likely cause, Recommended next step.Rules:- Never change settings, restart, scale or redeploy. Recommend the fix and let a human apply it.- Do not print subscription IDs, tenant IDs or connection strings in your answer.- Say "likely" when evidence is incomplete.
Refine with AI rewrites your instructions, and View AI suggestions recommends skills and tools – handy for a first draft, but read what it changes.
3.2 Skills, tools and hooks
By default a custom agent inherits all global skills and tools (37 skills and 36 tools on my agent). Selecting anything under Choose skills or Choose tools replaces that default for this agent. I picked four skills: my counter-app-http500, plus the built-in azure_application_insights, metrics_and_chart_visualization and web_app_down. The three core skills (including memory_search) stay on regardless. I left tools inherited for this demo; in production I would narrow them to read-only tools. Manage Hooks adds governance hooks – more on those in Article 5.

Figure 5: Create a custom agent – instructions plus four selected skills
3.3 Check the YAML
Switch to the YAML tab to see what you are really creating. This is the format you can keep in Git or edit from VS Code with the SRE Agent MCP server extension:
api_version: azuresre.ai/v1kind: AgentConfigurationspec: name: app-service-health system_prompt: >- You are a read-only Azure App Service health specialist ... agent_type: Autonomous enable_skills: true allowed_skills: - counter-app-http500 - azure_application_insights - metrics_and_chart_visualization - web_app_down

Figure 6: The YAML view – note agent_type: Autonomous, added by default
Watch out: the form doesn’t show it, but the YAML sets agent_type: Autonomous. In my setup that is safe because the agent’s managed identity only has Reader access and the agent runs in Review mode, so anything outside Reader needs a human to approve it (see Step 4). The instructions saying “never change settings” are guidance, not a security boundary. Use RBAC and run modes for the boundary.
Select Create. A notification confirms “app-service-health is now running” and the agent appears on the canvas. One small portal quirk: the node still says “Inherits 36 tools · 37 skills”, but opening Edit shows the four selected skills were saved.

Figure 7: The new custom agent on Agent Canvas
Step 4 – Invoke the custom agent with /agent
Custom agents don’t run on their own in chat. Start a New chat, type /agent, and pick the specialist from the list. It is attached to the message as a chip (Agent: app-service-health).

Figure 8: Typing /agent lists the custom agents you have created
I sent one prompt:
Give me a health card for sre-demo-counter-pks for the last hour.
Here is what happened, in order:
- It loaded the
metrics_and_chart_visualizationskill (not my HTTP 500 skill – correct, since nobody had reported a 500). - It read its memory file
overview.mdbefore doing anything else. - It ran read-only Azure CLI commands (
az webapp show,az webapp config show,az appservice plan list,az monitor metrics list,az monitor activity-log list), each labelled Safe, Low risk or Medium risk. - Twice, the managed identity got an authorization error and the agent showed an Authorization required → Grant permissions card. Granting re-runs that one command with my credentials (on-behalf-of). I approved both read-only requests.
- It drew charts for Requests and Http5xx and analysed each metric before answering.
The answer followed the health-card format from the instructions exactly:

Figure 9: The custom agent’s health card – Healthy, with the evidence gaps called out
I like that it did not just say “Healthy”. It said “Healthy, with limited traffic evidence”, explained that response time had no data because there was no traffic, and noted that deployment history returned 403. That is the “say likely when evidence is incomplete” rule doing its job.
Step 5 – Teach the agent with memory
Skills and custom agents are things you build. Memory is what the agent accumulates. When you ask a question, the built-in memory_search skill searches all memory sources together and cites what it used.
| Memory source | Who writes it | Where you see it |
|---|---|---|
Synthesized knowledge (memories/synthesizedKnowledge/) | The agent, during conversations and onboarding. overview.md is always loaded into the prompt (about 2,000 characters) | “Read memory / Created memory / Edited memory” steps in chat |
| User memories | You, with #remember, #retrieve, #forget | “Saved to memory” badge on your message |
| Session insights | The agent, automatically, about 30 minutes after a chat or task goes quiet | Build + configure → Monitor → Session insights |
| Knowledge sources | You – uploaded files or web pages | Build + configure → Context → Knowledge sources |
| Custom instructions | You – always-on guidance for the main agent | Build + configure → Extensions → Custom instructions |
5.1 Session insights – the agent grades its own work
Open Build + configure → Monitor → Session insights. My agent had two insights, one for each earlier article. The Article 2 one, “Counter Web App HTTP 500s Caused by Enabled Error Injection”, has three sections:
- Timeline – each step of the investigation with a status.
- Evaluation – what went well and what didn’t, including the exact commands that failed and what to use instead (for example,
GetActivityLogsSummaryreturned “Operation not supported”, so useGetDeploymentActivity). - Derived learning from thread – system design knowledge plus an investigation pattern for next time.

Figure 10: A session insight – timeline of the Article 2 investigation

Figure 11: Derived learning – the agent wrote its own runbook for a repeat of this failure
Compare the investigation pattern in Figure 11 with the skill I wrote in Step 2: they are nearly the same. That is the workflow I recommend: let the agent investigate, read its session insight, and turn the derived learning into a skill. The thumbs up/down at the bottom of an insight is also feedback the agent learns from.
5.2 #remember – facts the agent can’t discover
Some things no tool can find out: who owns an app, what “normal” looks like, which errors are intentional. The health card in Step 4 flagged zero traffic as limited evidence – but for a demo app, zero traffic is normal. So I told it:
#remember sre-demo-counter-pks is a demo app for blog articles. Zero traffic is normal. INJECT_ERROR=1 is set on purpose during demos to cause HTTP 500 after five clicks. Owner: Praveen.
The message got a Saved to memory badge immediately. Then the agent went further than I expected:
- It searched existing memory for the app, found nothing, and created a new memory file,
counter-demo-operational-context.md, with a scope note: “do not flag an idle last-hour request count alone as unhealthy”. - It edited
overview.mdto replace the stale 2 December note (“no repositories attached, no user service identified”) with the app, its plan, the attached repository and a link to the new file. - It added a sensible caveat of its own: verify the setting’s current state before assuming a 500 is the intentional demo one.

Figure 12: #remember created a memory file and updated overview.md
Use #retrieve to look something up (“#retrieve who owns the counter app?“) and #forget to remove a fact that is no longer true. Out-of-date memory gives confident wrong answers, so treat it like documentation and review it.
5.3 Custom instructions and knowledge sources
Two more places to put team context:
- Custom instructions (Build + configure → Extensions → Custom instructions) – always-on guidance added to the main agent’s system prompt, up to 16,384 bytes. Custom agents built from the workspace inherit it. Good for team-wide rules like “always include the resource group in answers” or “never suggest restarts during business hours”.
- Knowledge sources (Build + configure → Context → Knowledge sources) – Add file for runbooks, architecture docs and postmortems, and Add web page for a URL. Repository connections have moved to Code access. For content that changes often (a live wiki), the docs recommend a connector instead of an upload.

Figure 13: Custom instructions – always-on guidance for the main agent

Figure 14: Knowledge sources – upload files or add web pages
Permissions note: adding knowledge sources needs Microsoft.App/agents/memory/write and …/memory/delete on the agent. In my session the page showed a notice that these were missing for the signed-in account, so check the account’s SRE Agent role before you plan a bulk upload. The Learn pages also disagree on limits (one says 16 MB per file and many formats including PDF and Word; another says .md/.txt and 50 MB), so check the upload dialog in your own portal.
You can also ask the agent to write a knowledge document from an investigation (“turn this investigation into a runbook and save it to your knowledge”), or upload a folder from the command line:
# Upload a single runbooksrectl doc upload --file ./runbooks/high-memory-guide.md# Upload every .md and .txt file in a folder (recursive)srectl doc upload --file ./runbooks
Governance and security
- Instructions are not a security boundary. “Never restart” in a prompt is guidance. The real boundary is the managed identity’s RBAC role (Reader in my case) and the run mode (Review).
- Check
agent_typein the YAML. New custom agents default toAutonomous. That is fine on a Reader identity; think twice before giving such an agent write tools on a Contributor identity. - OBO grants run as you. “Grant permissions” re-runs a command with your own credentials. The card shows the command and a risk label – read it before clicking, and decline anything that writes unless you meant it.
- Scope skills and tools per custom agent. Selecting skills and tools overrides the 37/36 inherited defaults, which keeps a specialist from wandering into unrelated services.
- Memory stores what you say. The agent wrote my subscription ID into its memory files on its own. Don’t
#remembersecrets, connection strings or personal data, and review memory files like any other documentation. - Use hooks for hard rules. Hooks (Build + configure → Extensions → Hooks, or per custom agent) can block or require approval for specific actions – covered in Article 5.
Pricing and limitations
Skills, custom agents and memory have no separate price. You pay for the agent itself:
- Always-on flow: 4 Azure Agent Units (AAU) per agent per hour, from creation until deletion – about US$0.40/hour in Central US (US$0.10 per AAU). New customers get 30 days without this charge.
- Active flow: token-based AAUs for each conversation, task or incident. A custom agent that loads several skills, draws charts and runs a verification step uses more active-flow AAUs than a single question. My health-card prompt ran about six minutes and roughly a dozen tool calls.
- Check usage under Build + configure → Monitor → Agent consumption.
Limitations I hit or noted:
- A maximum of five active skills at once; active skills are cleared on conversation compaction (the agent re-reads
SKILL.mdwhen it needs a skill again). - Custom agents are not automatic in chat – you need
/agent, a handoff, an incident response plan or a scheduled task. - Background helper subagents (for example, the verification step in Article 2) can’t request OBO permissions yet – “permission bubbling” isn’t supported. A custom agent invoked with
/agentin the chat did raise OBO cards for me. - Session insights appear about 30 minutes after a thread goes quiet, not immediately.
- The portal and the docs differ on menu names and on knowledge-file limits – trust what your portal shows.
My recommendation
Don’t start by writing ten skills. Let the agent handle a few real incidents first, then open Session insights and read the Derived learning sections. Each good investigation pattern becomes a skill with a sharp description. Use #remember for the facts only your team knows – owners, “this is normal”, planned maintenance. Build a custom agent only when you need a separate specialist with a narrower tool set or a fixed output format, and keep it on a Reader identity until you trust it.
Summary
In this article, we learnt how to teach Azure SRE Agent how a team works by creating a skill from a real runbook, building a read-only custom agent and calling it with /agent, and growing the agent’s memory with session insights and #remember.
| Topic | What to Remember |
|---|---|
| Where | sre.azure.com → your agent → Build + configure → Agent Canvas |
| Built-in skills | 45 ship with the agent (37 active on mine); memory_search, self_manual and executing_code_in_workspace can’t be turned off |
| Skill | SKILL.md + optional tools and files; loaded automatically from its description; max five active |
| Custom agent | Own instructions, skills, tools and hooks; invoked with /agent or from incidents and schedules; YAML defaults to agent_type: Autonomous |
| Overrides | Choosing skills or tools on a custom agent replaces the inherited global set |
| Session insights | Written ~30 minutes after a thread ends: timeline, evaluation, derived learning |
| #remember / #retrieve / #forget | Save, search and remove facts; the agent may also create memory files and update overview.md |
| Custom instructions | Always-on guidance for the main agent, up to 16,384 bytes |
| Security | RBAC and run mode are the boundary, not prompts; OBO grants run as you |
| Cost | No extra charge for these features; always-on ~US$0.40/hour (Central US) plus active-flow AAUs |
Do you like this article? If you want to get more updates about these kind of articles, you can join my Learning Groups
Discover more from Praveen Kumar Sreeram's Blog
Subscribe to get the latest posts sent to your email.
One comment