Skip to main content

Step 1: Create and Set Up Your Azure SRE Agent

Deploy an Azure SRE Agent, connect your code repository, and add Azure resource access.

What you'll accomplish

  • Deploy an Azure SRE Agent to your subscription
  • Connect a code repository
  • Grant the agent access to the Azure scopes it should investigate

Prerequisites

RequirementDetails
Azure subscriptionAn active Azure subscription with permission to create resources
RoleContributor to create resources. You also need Owner or User Access Administrator on any scope where the portal must create role assignments, including Azure scopes you add during setup.
Repository accessAn account, personal access token, managed identity, or GitHub App with access to the repository you want to connect
Network access*.azuresre.ai must be reachable from your browser

Open the onboarding wizard

  1. Navigate to sre.azure.com.
  2. Sign in with your Azure credentials.
  3. Select the Agents tab, then click Create agent.

The wizard has a three-step flow: Basics → Review → Deploy.


Basics

Fill in the fields to define your agent:

FieldDescriptionExample
SubscriptionThe Azure subscription that will own the agent resourceMy Production Subscription
Resource groupAn existing resource group or create a new onerg-sre-agent
Agent nameA unique name for your agent instancecontoso-sre-agent
RegionAzure region for deploymentEast US 2
Model providerChoose the AI model provider for your agentVaries by subscription and region
Application InsightsCreate a new instance or use an existing oneCreate new (default)

After you select a region, the Model provider field appears. The available providers and default selection are loaded for your subscription and region. Options may include Microsoft Foundry, GitHub Copilot, and Anthropic, depending on availability and administrator policy.

note

The wizard identifies providers covered by EU Data Boundary (EUDB) commitments. Anthropic and GitHub Copilot are excluded from EUDB commitments in EUDB regions. Anthropic also requires a direct agreement and may be disabled by your administrator.

The wizard marks the default or preferred provider and shows its consumption multiplier when applicable. You can change the provider after creation in Settings → Basics. See Pricing and billing for cost details.

Click Next to proceed.

Checkpoint: All required fields are filled, including the model provider. The Next button is enabled.


Review

The wizard shows a summary of your configuration. Verify:

  • Subscription and resource group are correct.
  • Agent name and region match your intent.

Click Create to begin provisioning.

Review step showing agent configuration summary before deployment

Checkpoint: The summary matches what you entered. No validation errors appear.


Deploy

The deployment creates the following Azure resources:

ResourcePurpose
Managed IdentityAuthenticates the agent to Azure services
Role assignmentsGrants the current user access to administer the agent and grants the agent identity monitoring access
Azure SRE Agent resourceThe agent itself
Application Insights and Log Analytics WorkspaceCreated only when you select Create new for Application Insights

If you select an existing Application Insights resource, the deployment links it to the agent instead of creating new monitoring resources.

Wait for the deployment to complete. This typically takes 2–5 minutes.

Deployment succeeded with all resources created

Checkpoint: Deployment status shows Succeeded. Newly created resources are listed as created, and any existing Application Insights resource is linked to the agent.


Set up your agent

After deployment finishes, click Set up your agent to open the setup page. You'll see the header "More context. Better investigations." This page has two tabs:

TabData sources
QuickstartCode, Logs, Azure Resources, Incidents
Full setupEverything in Quickstart + Knowledge Files

Start with the Quickstart tab. Not all sources are required — but connecting more gives your agent better context for investigations. This guide walks through connecting code, logs, and Azure resources.

Setup page showing the Quickstart cards, including Code and Logs

Connect your code repository

  1. On the Code card, click the + button to connect repositories.
  2. In Choose a platform, select GitHub, Azure DevOps, or GitLab. For GitHub, enter github.com or your GitHub Enterprise Cloud host. For Azure DevOps, enter the organization name.
  3. In Authenticate, choose one of the methods offered for that platform:
    • GitHub: Your account (when configured), PAT, or a bring-your-own GitHub App. GitHub Enterprise Cloud requires a GitHub App.
    • Azure DevOps: Your account, managed identity, or PAT.
    • GitLab: PAT.
  4. Click Next to open Add repositories.
  5. Select one or more repositories and provide the required display details.
  6. Click Save.
Code card showing green checkmark with connected repository

Checkpoint: The Code card shows a green checkmark and lists the connected repositories.

tip

Connect the repository that contains the service you'll investigate first. Once connected, your agent immediately starts exploring the codebase and building expertise — learning your project structure, deployment configurations, and code patterns through Deep Context.


Connect your logs

Connecting log sources gives your agent access to production telemetry — error traces, performance metrics, and application health data. Combined with source code, this lets your agent correlate production issues with code changes during investigations.

The setup page marks Logs as Recommended and Best with code — connecting both gives your agent the full picture from day one.

  1. On the Logs card, click the + button.
  2. The Configure logging provider dialog opens with three steps.
  3. In Step 1: Choose a logging provider, select a log source:
Log sourceWhat it provides
Log Analytics WorkspaceQuery logs, discover tables, check activity logs, and monitor metrics across your Log Analytics workspaces. Read-only.
Application InsightsQuery application telemetry, trace requests, analyze dependencies, and monitor performance metrics. Read-only.
tip

If you don't see the connector you need, use the search bar at the top of the dialog to find it. Additional log sources include Azure Data Explorer (Kusto), Datadog, Splunk, Elasticsearch, Dynatrace, and New Relic.

  1. Click Next to proceed to Step 2: Set up logging provider.
  2. Fill in the required fields:
FieldDescription
NameA descriptive name for this connector (e.g., prod-logs)
Log Analytics Workspace or Application InsightsSelect the resource from the dropdown — it lists resources from your Azure subscriptions
Managed IdentitySelect an identity attached to the agent. The portal prefers a user-assigned managed identity and falls back to the system-assigned identity when no UAMI is available.
  1. Click Next to review, then click Add connector.

Checkpoint: The Logs card shows a green checkmark and lists your connected log source.

Verify log access

Ask your agent about a recent issue:

Check for any errors in the last 24 hours

Your agent queries the connected log source and returns results.

Permissions

The selected managed identity needs Log Analytics Reader and Monitoring Reader on the resource group containing the Log Analytics workspace or Application Insights resource. The portal attempts to assign missing roles and flags the connector if no effective role assignment is found. If role assignment fails, grant the roles in Azure and refresh the connector status.

tip

You can add multiple log sources — for example, connect both a Log Analytics workspace for infrastructure logs and an Application Insights resource for application telemetry. For the full list of supported log sources and how your agent uses them during investigations, see Azure Observability and External Observability.


Add Azure resource access

Granting the agent access to your Azure resources allows it to query metrics, logs, and resource configurations during investigations. The permission level you choose determines which RBAC roles are assigned (see Permissions for details). Connector-specific roles like Log Analytics Reader and Monitoring Reader are handled separately during connector setup.

  1. On the Quickstart or Full setup tab, find the Azure Resources card.
  2. On the Azure Resources card, click the + button to add resources.
  3. Choose resource type: Select Management groups, Subscriptions, or Resource groups, then click Next.

If you chose Management groups:

  1. Select one or more management groups.
  2. Review the required permissions. The wizard grants missing Reader and Azure Monitor Monitoring Contributor roles at the management-group scope.
  3. Add the management groups.

If you chose Subscriptions:

  1. Select subscriptions: Use the search box to find subscriptions. Check the ones you want the agent to access.
  2. Click Next to review agent permissions.
  3. The wizard grants missing Reader and Azure Monitor Monitoring Contributor roles on each selected subscription. Review the permissions status.
  4. Click Add subscriptions.

If you chose Resource groups:

  1. Filter by subscription: Use the subscription dropdown to filter which resource groups are shown.
  2. Select resource groups: Use the search box to find resource groups. Check the ones you want the agent to access. The grid shows the resource group name, subscription, and region.
  3. Click Next to review agent permissions.
  4. Choose the permission level for the agent, and review the role assignments.
  5. Click Add resource group.

Checkpoint: The Azure Resources card shows the connected management groups, subscriptions, or resource groups.

note

Before adding a scope, the wizard checks the agent identity's effective role assignments and grants any required roles that are missing. Resource-group roles depend on the selected permission level and detected resource types. For advanced permission management, see Manage permissions and access.


Click "Done and go to agent"

Once you've connected your data sources, click Done and go to agent. This takes you into the agent chat to start team onboarding.

Checkpoint: The agent chat opens.


CapabilityWhat it adds
ConnectorsHow the agent connects to external data sources
User RolesWho can access your agent and what they can do
PermissionsHow permission levels and RBAC roles work

Next step

→ Step 2: Team onboarding

Was this page helpful?