Azure SRE 에이전트에 대한 API 참조

프로그래밍 방식으로 Azure SRE 에이전트를 관리하고 상호 작용하기 위한 REST API 작업입니다.

개요

Azure SRE 에이전트는 두 계층에서 REST API를 제공합니다. ARM(컨트롤 플레인)을 사용하여 에이전트 및 해당 하위 리소스를 만들고 구성하고 삭제합니다. 채팅, 리포지토리 관리 및 지식 업로드와 같은 런타임 작업에 데이터 평면 을 사용합니다.

비행기 기본 URL Auth 사용 목적
컨트롤 플레인 management.azure.com 표준 Azure RBAC 에이전트 만들기, 업데이트, 삭제 및 구성
데이터 평면 에이전트별 엔드포인트 azuresre.dev 관객 채팅, 리포지토리, 후크, 지식, 트리거

인증

컨트롤 플레인(ARM)

표준 Azure 인증 - Azure CLI, 서비스 주체 또는 관리 ID:

# Interactive login
az login

# Service principal
az login --service-principal -u $APP_ID -p $SECRET --tenant $TENANT_ID

# Managed identity (from Azure VM or Container App)
az login --identity

데이터 평면

데이터 평면에는 대상 https://azuresre.dev그룹과 별도의 토큰이 필요합니다.

# Step 1: Get the agent's data plane endpoint
ENDPOINT=$(az rest -m GET \
  --url "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/agents/{agentName}?api-version=2025-05-01-preview" \
  --query properties.agentEndpoint -o tsv)

# Step 2: Get a data plane token
TOKEN=$(az account get-access-token \
  --resource https://azuresre.dev \
  --query accessToken -o tsv)

# Step 3: Call the data plane
curl -H "Authorization: Bearer $TOKEN" "$ENDPOINT/api/v1/threads"

참고

에이전트 엔드포인트는 에이전트당 고유합니다. 패턴을 https://{name}--{id}.{hash}.{region}.azuresre.ai 따르고 ARM GET 작업은 이 엔드포인트를 반환합니다 properties.agentEndpoint.

RBAC 역할

역할 설명 Scope
SRE 에이전트 관리자 에이전트 구성 및 작업에 대한 모든 권한 에이전트 리소스
SRE 에이전트 사용자 채팅, 작업 승인, 스레드 관리 에이전트 리소스
SRE 에이전트 판독기 에이전트 구성 및 스레드에 대한 읽기 전용 액세스 에이전트 리소스

Azure 포털, CLI 또는 ARM API를 사용하여 역할을 할당합니다.

az role assignment create \
  --assignee {userOrServicePrincipalId} \
  --role "SRE Agent Administrator" \
  --scope "/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.App/agents/{name}"

ARM(컨트롤 플레인) 작업

API 버전

2025-05-01-preview

참고

컨트롤 플레인과 데이터 평면 API는 모두 현재 미리 보기로 제공됩니다. 엔드포인트 경로, 요청 및 응답 스키마 및 동작은 일반 공급 전에 변경될 수 있습니다. 이 API 버전에 통합을 고정하고 업그레이드 후 테스트합니다.

기본 URL

https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/agents/{agentName}

작업 테이블에서 경로 접미사를 추가한 다음 쿼리 매개 변수로 추가 ?api-version=2025-05-01-preview 합니다. 예: .../agents/{agentName}/start?api-version=2025-05-01-preview.

에이전트 리소스 작업

작업 메서드 경로 접미사
만들기 또는 업데이트 PUT (없음)
Microsoft Store에서 GET (없음)
Delete DELETE (없음)
Start POST /start
중지 POST /stop
사용량 가져오기 GET /usages
일일 사용량 가져오기 GET /dailyusages

에이전트 속성

재산 Type 설명
provisioningState string Succeeded, Failed, InProgress, CanceledDeleting (읽기 전용)
agentEndpoint string 데이터 평면 URL(읽기 전용)
powerState string Running 또는 Stopped (읽기 전용)
outboundIpAddresses string[] 허용 목록에 대한 아웃바운드 IP(읽기 전용)
actionConfiguration.mode string Review, Automatic 또는 ReadOnly
actionConfiguration.accessLevel string Low 또는 High
defaultModel.provider string Anthropic 또는 MicrosoftFoundry(Open AI)
defaultModel.name string 모델 이름(예: Automatic)
upgradeChannel string Stable 또는 Preview
monthlyAgentUnitLimit number 월간 활성 흐름 AAU 한도(Always-On 흐름 포함 안 됨)
knowledgeGraphConfiguration.identity string 관리 ID 리소스 ID
knowledgeGraphConfiguration.managedResources string[] 에이전트가 액세스할 수 있는 리소스 그룹 ID
logConfiguration object Application Insights 구성
incidentManagementConfiguration.type string PagerDuty, AzMonitor, ServiceNow또는 None
mcpServers string[] MCP 서버 URL
vnetConfiguration.subnetResourceId string VNet 삽입 서브넷
experimentalSettings object 기능 플래그 재정의

하위 리소스

하위 리소스 ARM 유형 Path
커넥터 Microsoft.App/agents/DataConnectors /DataConnectors/{name}
기술 Microsoft.App/agents/skills /skills/{name}
하위 대리인 Microsoft.App/agents/subagents /subagents/{name}
Tools Microsoft.App/agents/tools /tools/{name}
예약된 작업 Microsoft.App/agents/scheduledTasks /scheduledTasks/{name}
인시던트 필터 Microsoft.App/agents/incidentFilters /incidentFilters/{name}
후크 Microsoft.App/agents/hooks /hooks/{name}
일반적인 프롬프트 Microsoft.App/agents/commonPrompts /commonPrompts/{name}

모든 하위 리소스 지원 PUT (만들기/업데이트), GET작업 DELETE

하위 리소스 본문 형식

커넥터는 직접 속성을 사용합니다.

az rest -m PUT \
  --url "https://management.azure.com/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.App/agents/{agent}/DataConnectors/my-kusto?api-version=2025-05-01-preview" \
  --body '{
    "properties": {
      "name": "my-kusto",
      "dataConnectorType": "Kusto",
      "dataSource": "https://mycluster.eastus2.kusto.windows.net",
      "identity": "system"
    }
  }'

다른 하위 리소스 (기술, 스바겐트, 도구 등)는 base64로 인코딩된 봉투를 사용합니다.

# The spec is base64-encoded inside properties.value
SPEC='{"name":"my-tool","description":"Query Azure Resource Graph"}'
ENCODED=$(echo -n "$SPEC" | base64)

az rest -m PUT \
  --url "...Microsoft.App/agents/{agent}/tools/my-tool?api-version=2025-05-01-preview" \
  --body "{\"properties\":{\"value\":\"$ENCODED\"}}"

커넥터 유형

Type Value 사용 사례
Azure Data Explorer(아주르 데이터 탐색기) Kusto ADX 클러스터 쿼리
Application Insights Kusto App Insights 쿼리
Log Analytics Kusto 쿼리 Log Analytics
MCP Mcp MCP 호환 커넥터(Datadog, Splunk 등)
PagerDuty (페이지듀티) Mcp PagerDuty 인시던트
ServiceNow Mcp ServiceNow 인시던트
Outlook Outlook 이메일 알림
팀들 Teams Teams 채널 알림

데이터 플레인 연산

데이터 평면 API를 사용하여 메시지 보내기, 승인 관리, 지식 업로드 및 리포지토리, 후크 및 트리거 구성을 포함하여 실행 중인 에이전트와 상호 작용합니다.

기본 URL

ARM에서 가져오기:

ENDPOINT=$(az rest -m GET \
  --url "...Microsoft.App/agents/{name}?api-version=2025-05-01-preview" \
  --query properties.agentEndpoint -o tsv)

모든 데이터 평면 경로는 .로 $ENDPOINT/api/...시작합니다.

스레드 및 채팅

메서드 Path 설명
GET /api/v1/threads 대화 스레드 나열
GET /api/v1/threads/{threadId} 특정 스레드 가져오기
POST /api/v1/threads/{threadId}/messages 메시지 보내기(대화 시작)
GET /api/v1/threads/{threadId}/messages 스레드에서 메시지 가져오기

Approvals

메서드 Path 설명
GET /api/v1/approvals/{threadId} 보류 중인 승인 나열
POST /api/v1/approvals/{threadId}/{id}/decision 작업 승인 또는 거부

코드 리포지토리

메서드 Path 설명
PUT /api/v2/repos/{repoName} 코드 리포지토리 추가
GET /api/v2/repos 리포지토리 나열
GET /api/v2/repos/{repoName} 리포지토리 세부 정보 가져오기
DELETE /api/v2/repos/{repoName} 리포지토리 제거
POST /api/v2/repos/{repoName}/test 리포지토리 연결 테스트

지식(에이전트 메모리)

메서드 Path 설명
POST /api/v1/agentmemory/upload 문서 업로드(다중 파트, 총 100MB, 파일당 16MB)
GET /api/v1/agentmemory/status 메모리 상태 확인
DELETE /api/v1/agentmemory/document/{fileName} 문서 삭제
DELETE /api/v1/agentmemory/documents 문서 대량 삭제
GET /api/v1/agentmemory/indexer-status 인덱서 진행률 확인

HTTP 트리거

메서드 Path 설명
POST /api/v1/httptriggers/create HTTP 트리거 만들기
GET /api/v1/httptriggers 트리거 나열
POST /api/v1/httptriggers/{triggerId}/execute 트리거 실행
POST /api/v1/httptriggers/trigger/{triggerId} 공용 웹후크 엔드포인트(인증 필요 없음)

후크

메서드 Path 설명
PUT /api/v2/extendedAgent/hooks/{hookName} 후크를 만들거나 업데이트합니다.
GET /api/v2/extendedAgent/hooks 후크 나열
DELETE /api/v2/extendedAgent/hooks/{hookName} 후크를 삭제합니다.

확장 에이전트 구성

데이터 평면을 통해 스바겐, 도구, 커넥터, 기술, 프롬프트 및 플러그 인을 관리합니다.

Resource 경로 패턴
하위 대리인 /api/v2/extendedAgent/agents/{name}
Tools /api/v2/extendedAgent/tools/{name}
커넥터 /api/v2/extendedAgent/connectors/{name}
기술 /api/v2/extendedAgent/skills/{name}
일반적인 프롬프트 /api/v2/extendedAgent/commonprompts/{name}
예약된 작업 /api/v2/extendedAgent/scheduledtasks/{name}
Plugins /api/v2/extendedAgent/plugins/{name}

모든 리소스는 , PUTGETPATCH 메서드를 지원DELETE합니다.

실시간 스트리밍

에이전트는 실시간 채팅 스트리밍에 SignalR 을 사용합니다.

허브 Path 용도
AgentHub /agentHub 실시간 메시지 스트리밍 및 스레드 업데이트

동일한 전달자 토큰과 함께 SignalR 클라이언트 라이브러리를 사용하여 연결합니다.

예제

에이전트 속성 가져오기

az rest -m GET \
  --url "https://management.azure.com/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.App/agents/{name}?api-version=2025-05-01-preview" \
  -o json

모든 커넥터 나열

az rest -m GET \
  --url "https://management.azure.com/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.App/agents/{name}/DataConnectors?api-version=2025-05-01-preview" \
  -o json

데이터 평면을 통해 스레드 나열

TOKEN=$(az account get-access-token --resource https://azuresre.dev --query accessToken -o tsv)
ENDPOINT="https://{agentEndpoint}"

curl -s -H "Authorization: Bearer $TOKEN" "$ENDPOINT/api/v1/threads"

데이터 평면을 통해 코드 리포지토리 추가

curl -X PUT \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  "$ENDPOINT/api/v2/repos/my-repo" \
  -d '{
    "properties": {
      "url": "https://github.com/myorg/myrepo",
      "type": "GitHub"
    }
  }'