View a markdown version of this page

자산 관리 - AWS DevOps 에이전트

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

자산 관리

AWS DevOps Agent는 에이전트 스페이스의 구성 및 참조 자료를 자산, 에이전트가 알고 있는 내용과 동작 방식을 형성하는 고객 관리형 리소스로 저장합니다. Skills, AGENTS.md 파일 및 첨부 파일은 모두 자산이며 Asset API를 통해 프로그래밍 방식으로 생성, 읽기, 업데이트 및 삭제할 수 있습니다.

이 주제에서는 자산 모델, 필요한 IAM 권한, 각 자산 유형에 필요한 메타데이터, AWS CLI 및 AWS SDK for Python(Boto3)을 사용하여 end-to-end 관리하는 방법을 설명합니다. 기술 자체의 개념적 개요는 섹션을 참조하세요DevOps 에이전트 기술. 직접 생성하지 않은 에이전트 생성 지식은 섹션을 참조하세요학습한 기술.

자산 API를 사용해야 하는 경우

운영자 웹 앱은 단일 스킬을 작성하거나 AGENTS.md 파일을 대화형으로 업로드하는 가장 빠른 방법입니다. Asset API는 프로그래밍 방식으로 동일한 작업을 노출하므로 스크립트와 자동화가 웹 앱을 거치지 않고도 자산을 관리할 수 있습니다. Asset API를 직접 호출하는 일반적인 이유는 다음과 같습니다.

  • 웹 앱 대신 스크립트, 터미널 또는 노트북에서 자산을 작성하거나 업데이트합니다.

  • 스타터 스킬 세트 또는 AGENTS.md 파일을 새 에이전트 스페이스에 대량 로드합니다.

  • 자산의 콘텐츠를 읽어 백업하거나 버전을 비교합니다.

Asset API의 모든 작업은 AWS CLI를 통해 로, AWS SDKs를 aws devops-agent <operation> 통해 devops-agent 클라이언트로 노출됩니다.

자산 API 작업

자산 API는 다음 작업을 표시합니다. 각 행에는 작업을 호출하기 위해 부여해야 하는 IAM 작업과 작업이 적용되는 리소스가 나열됩니다. 를 제외한 모든 작업은 aidevops: 네임스페이스에 있으며 양식의 에이전트 스페이스 리소스에 ListAssetTypes적용됩니다arn:aws:aidevops:<region>:<account-id>:agentspace/<agentSpaceId>. aidevops: 권한에 대한 더 광범위한 배경 정보는 섹션을 참조하세요DevOps 에이전트 IAM 권한.

연산 설명 IAM 작업 Resource
ListAssetTypes AWS DevOps Agent에서 지원하는 자산 유형을 나열합니다. aidevops:ListAssetTypes *
CreateAsset 에이전트 스페이스(스킬, AGENTS.md, 첨부 파일, 사용자 지정 에이전트, 테스트 프로필 또는 피드백)에서 새 자산을 생성합니다. aidevops:CreateAsset 에이전트 공간
GetAsset 자산의 메타데이터 및 버전 정보를 검색합니다. aidevops:GetAsset 에이전트 공간
UpdateAsset 기존 자산의 메타데이터 또는 콘텐츠를 업데이트합니다. aidevops:UpdateAsset 에이전트 공간
DeleteAsset 에이전트 스페이스에서 자산과 모든 파일을 삭제합니다. aidevops:DeleteAsset 에이전트 공간
ListAssets 자산 유형별 선택적 필터링을 사용하여 에이전트 스페이스의 자산을 나열합니다. aidevops:ListAssets 에이전트 공간
ListAssetVersions 자산의 기록 버전을 나열합니다. aidevops:ListAssetVersions 에이전트 공간
GetAssetContent 자산의 전체 콘텐츠를 zip 번들로 다운로드합니다. aidevops:GetAssetContent 에이전트 공간
CreateAssetFile 기존 자산에 새 파일을 추가합니다. aidevops:CreateAssetFile 에이전트 공간
GetAssetFile 경로별로 자산에서 단일 파일을 검색합니다. aidevops:GetAssetFile 에이전트 공간
UpdateAssetFile 자산에 있는 기존 파일의 콘텐츠 또는 메타데이터를 바꿉니다. aidevops:UpdateAssetFile 에이전트 공간
DeleteAssetFile 자산에서 단일 파일을 제거합니다. aidevops:DeleteAssetFile 에이전트 공간
ListAssetFiles 자산 내의 파일을 나열합니다. aidevops:ListAssetFiles 에이전트 공간

예제 IAM 정책

다음 정책은 단일 에이전트 스페이스의 자산에 대한 전체 관리 액세스 권한을 부여합니다.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "aidevops:CreateAsset", "aidevops:GetAsset", "aidevops:UpdateAsset", "aidevops:DeleteAsset", "aidevops:ListAssets", "aidevops:ListAssetVersions", "aidevops:GetAssetContent", "aidevops:CreateAssetFile", "aidevops:GetAssetFile", "aidevops:UpdateAssetFile", "aidevops:DeleteAssetFile", "aidevops:ListAssetFiles" ], "Resource": "arn:aws:aidevops:us-east-1:111122223333:agentspace/8f6187a7-0388-4926-8217-3a0fe32f757c" }, { "Effect": "Allow", "Action": "aidevops:ListAssetTypes", "Resource": "*" } ] }

다음 정책은 단일 에이전트 공간의 자산에 대한 읽기 전용 액세스 권한을 부여합니다.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "aidevops:GetAsset", "aidevops:ListAssets", "aidevops:ListAssetVersions", "aidevops:GetAssetContent", "aidevops:GetAssetFile", "aidevops:ListAssetFiles" ], "Resource": "arn:aws:aidevops:us-east-1:111122223333:agentspace/8f6187a7-0388-4926-8217-3a0fe32f757c" }, { "Effect": "Allow", "Action": "aidevops:ListAssetTypes", "Resource": "*" } ] }

자산 유형

모든 자산에는 어떤 종류의 리소스인지 식별하는 assetType 문자열이 있습니다. 자산 API를 통해 , skill, agents_md, attachment, test_profile, custom_agent의 6가지 자산 유형을 생성할 수 있습니다feedback. 다음 섹션에서는 각 유형을 설명합니다. 를 호출ListAssetTypes하여 런타임 시 유형 식별자를 검색할 수도 있습니다.

각 자산에는 리소스를 설명하는 자유 형식 metadata JSON 객체가 있습니다. 내부의 키는 snake_case(예: , agent_typesskill_type)를 metadata 사용합니다. 요청 본문metadata의 최상위 수준에서 외부의 키는 camelCase(예: , agentSpaceId, assetTypeclientToken)를 사용합니다. 필수 및 선택적 metadata 키는 다음 섹션에 설명된 대로 자산 유형에 따라 달라집니다.

UpdateAsset 또는 UpdateAssetFile를 호출하면 서비스는에 PATCH 의미 체계를 적용합니다metadata. 포함시킨 키는 교체되고 생략한 키는 저장된 값을 유지합니다. 자산이 생성된 assetType 후에는 자산을 변경할 수 없습니다.

스킬

skill 자산은 관련될 때 에이전트가 로드하는 지침과 참조 자료를 패키징합니다. 간단한 스킬은 단일 SKILL.md 파일이고, 복잡한 스킬은 SKILL.md 파일과 선택적 references/ 또는 assets/ 디렉터리가 포함된 zip 번들입니다.

필수 metadata 속성:

  • name(문자열) - 스킬의 고유 식별자입니다. 소문자, 숫자 및 하이픈만 해당, 1~64자. 하이픈으로 시작하거나 끝나지 않아야 합니다. 단순 기술에만 필요합니다. zip 업로드의 경우 서비스가 SKILL.md 프론트미터name에서 읽으며 여기에 제공된 모든 값은 무시됩니다.

  • 설명(문자열) - 에이전트가 스킬을 사용해야 하는 시기에 대한 1~1024자의 설명입니다. 단순 기술에만 필요합니다. zip 업로드의 경우 서비스가 SKILL.md 프론트미터description에서 읽으며 여기에 제공된 모든 값은 무시됩니다.

  • agent_types(문자열 배열) -이 스킬이 적용되는 하나 이상의 에이전트 유형입니다. ["GENERIC"]를 사용하여 모든 에이전트 유형에서 스킬을 사용할 수 있도록 합니다. 다른 값에는 CHAT, INCIDENT_TRIAGE, INCIDENT_RCA, INCIDENT_MITIGATION, PREVENTION, CHANGE_REVIEW, CHANGE_RELEASE, QUALITY_ASSURANCE_TESTING, RELEASE_SHEPHERD, 및 RELEASE_READINESS_REVIEW가 포함됩니다RELEASE_TESTING. GENERIC 값은 다른 값과 결합할 수 없습니다.

선택적 metadata 속성:

  • skill_type(문자열) - 기본값은 입니다USER. 자산 API는 고객이 생성한 스킬만 허용하므로 허용되는 유일한 값은 입니다USER. 서비스는 에이전트 자체에서 생성된 스킬용으로 LEARNED예약된 skill_type로 설정된 요청을 거부합니다.

  • status(문자열) - 스킬의 활성화 상태입니다. 허용되는 값은 ACTIVE 및 입니다INACTIVE(대문자만 해당). 기본값은 ACTIVE입니다. 비활성 스킬은 에이전트 스페이스에 남아 있지만 조사 또는 채팅 중에 에이전트가 로드하지 않습니다. 스킬을 삭제하지 않고 비활성화하거나 다시 활성화metadata.status하려면와 UpdateAsset 함께를 사용합니다. 스킬은 활성화를 지원하는 유일한 자산 유형이며 다른 모든 자산 유형에서는 status 필드가 무시됩니다. 작업 예제는 스킬 활성화 및 비활성화를 참조하세요.

  • enable_tools(문자열 배열) - 에이전트가이 스킬을 로드할 때 호출할 수 있는 도구 식별자 목록입니다.

예제 metadata:

{ "name": "rds-performance-investigation", "description": "Investigation procedures for RDS performance issues including connection exhaustion, slow queries, replication lag, and storage capacity. Use this skill when investigating database latency, connection errors, or read/write performance degradation.", "agent_types": ["GENERIC"] }

제한: Zip 업로드는 6MB를 초과해서는 안 됩니다. 에이전트 공간은 최대 200개의 사용자 생성 스킬을 포함할 수 있습니다.

에이전트_md

agents_md 자산은 특정 에이전트 유형에 대한 대기 에이전트 지침이 포함된 마크다운 파일입니다. 에이전트는 모든 작업이 시작될 때 일치하는 AGENTS.md 로드합니다. 에이전트 지침에 대한 자세한 내용은 섹션을 참조하세요에이전트 지침.

필수 metadata 속성:

  • agent_type(문자열) - AGENTS.md 파일이 적용되는 에이전트 유형입니다. 유효한 값은 GENERIC, CHAT, INCIDENT_TRIAGE, INCIDENT_RCA, INCIDENT_MITIGATION, PREVENTION, CHANGE_REVIEW, CHANGE_RELEASE, QUALITY_ASSURANCE_TESTING, RELEASE_SHEPHERD, RELEASE_READINESS_REVIEWRELEASE_TESTING입니다.

예제 metadata:

{ "agent_type": "INCIDENT_TRIAGE" }

제한: 각 에이전트 공간은 당 최대 1개의 AGENTS.md 포함할 수 있습니다agent_type. 파일 콘텐츠는 마크다운(text/markdown)이어야 하며 25KB를 초과해서는 안 됩니다.

연결

attachment 자산은 예를 들어 아키텍처 다이어그램, 실행서 PDF 또는 샘플 로그 파일과 같이 에이전트가 조사 중에 참조할 수 있는 바이너리 또는 텍스트 파일을 저장합니다.

필수 metadata 속성:

  • 파일 이름(문자열) - 기본 이름 및 확장명(예: )을 포함한 원래 파일 이름입니다topology.png.

  • extension(문자열) - 선행 점이 없는 파일 확장명입니다(예: , pngpdf, csv).

  • size(숫자) - 바이트 단위의 파일 크기입니다.

예제 metadata:

{ "filename": "topology.png", "extension": "png", "size": 184320 }

제한: 에이전트 스페이스에 있는 모든 연결의 총 크기는 10GB를 초과할 수 없습니다.

사용자 지정_에이전트

custom_agent 자산은 선별된 도구 및 기술 세트를 사용하여 특수 에이전트 구성을 정의합니다. 사용자 지정 에이전트를 사용하여 에이전트의 범위를 특정 워크플로 또는 기능 세트로 지정합니다.

필수 metadata 속성:

  • name(문자열) - 사용자 지정 에이전트의 고유 식별자입니다. 소문자, 숫자 및 하이픈만 해당, 1~64자. 하이픈으로 시작하거나 끝나지 않아야 합니다.

선택적 metadata 속성:

  • 도구(문자열 배열) - 사용자 지정 에이전트가 사용할 수 있는 도구 식별자입니다. 생략할 경우 기본값은 빈 목록입니다.

  • 스킬(문자열 배열) - 사용자 지정 에이전트가 로드하는 스킬 식별자입니다. 생략할 경우 기본값은 빈 목록입니다.

예제 metadata:

{ "name": "rds-firefighter", "tools": ["cloudwatch:GetMetricData", "rds:DescribeDBInstances"], "skills": ["rds-performance-investigation"] }

test_profile

test_profile 자산은 수행할 테스트 유형과 대상 엔드포인트를 포함하여 릴리스 테스트 실행을 위한 재사용 가능한 구성을 저장합니다.

필수 metadata 속성:

  • test_agent_type(문자열) -이 프로파일이 수행하는 테스트 유형입니다. 유효 값은 releaseUiTestingreleaseApiTesting입니다.

  • target_url(문자열) - 테스트 실행 대상의 URL입니다.

선택적 metadata 속성:

  • name(문자열) - 테스트 프로필의 사람이 읽을 수 있는 식별자입니다. 소문자, 숫자 및 하이픈만 해당, 1~128자. 하이픈으로 시작하거나 끝나지 않아야 합니다.

  • 설명(문자열) - 테스트 프로필에 포함되는 항목에 대한 1~1024자의 설명입니다.

  • test_personas(문자열 배열) - 테스트 실행 중에 연습할 페르소나입니다. 유효 값은 guestauthenticated입니다.

  • api_spec(문자열) - 테스트 실행을 위한 API 사양입니다. 와 관련이 있습니다releaseApiTesting.

  • credentials_secret_arn(문자열) - 테스트 실행에 대한 자격 증명을 보유한 AWS Secrets Manager 보안 암호의 ARN입니다.

예제 metadata:

{ "name": "checkout-api-tests", "description": "Release API tests for the checkout service.", "test_agent_type": "releaseApiTesting", "target_url": "https://api.example.com", "test_personas": ["guest", "authenticated"], "api_spec": "openapi: 3.0.0", "credentials_secret_arn": "arn:aws:secretsmanager:us-east-1:111122223333:secret:checkout-creds" }

의견

feedback 자산은 단일 에이전트 실행에 대해 고객이 제공한 피드백을 기록합니다. 피드백 자산을 사용하여 다운스트림 평가 파이프라인이 집계할 수 있는 결정과 메모를 캡처합니다.

필수 metadata 속성:

  • agent_types(문자열 배열) - 실행을 생성한 에이전트 유형입니다. 하나 이상의 값을 포함해야 합니다(예: INCIDENT_TRIAGE).

선택적 metadata 속성:

  • execution_id(문자열) -이 피드백이 연결된 실행입니다. 에서이 CreateAsset값을 설정합니다. 에서는 변경할 수 없습니다UpdateAsset.

예제 metadata:

{ "execution_id": "b2c3d4e5-6789-01ab-cdef-example22222", "agent_types": ["INCIDENT_TRIAGE"] }

자산 콘텐츠: 파일 또는 zip

모든 CreateAsset 요청에는 자산 저장소의 바이트를 포함하는 content 객체가 포함됩니다. 의 모양은 단일 파일을 업로드하는지 아니면 zip 번들을 업로드하는지에 content 따라 달라집니다.

  • 단일 텍스트 파일 - 최대 1.5MB의 UTF-8 텍스트를 content.file.body.text 포함합니다. 간단한 기술 및 AGENTS.md 파일에 사용합니다.

json { "content": { "file": { "path": "SKILL.md", "body": { "text": "# Skill\n\nInstructions go here." } } } }

  • 단일 바이너리 파일 - 최대 6MB의 base64 인코딩 바이너리 콘텐츠를 content.file.body.bytes 제공합니다. 이미지 또는 PDFs와 같은 첨부 파일에 사용합니다. Blob은 content 조합 내에 중첩되므로 미리 파일을 base64로 인코딩하고 로 요청을 제출합니다--cli-input-json(작업 예제는 이진 파일에서 스킬 생성 참조).

json { "content": { "file": { "path": "topology.png", "body": { "bytes": "<base64-encoded bytes>" } } } }

  • Zip 번들 - 최대 6MB의 base64 인코딩 zip 아카이브를 content.zip.zipFile 포함합니다. references/ 또는 assets/ 디렉터리에 SKILL.md 추가 파일이 포함된 스킬에 사용합니다.

json { "content": { "zip": { "zipFile": "<base64-encoded zip bytes>" } } }

전체 번들을 다시 업로드하지 않고 기존 자산 내에서 개별 파일을 추가, 교체 또는 삭제하려면 CreateAssetFile, UpdateAssetFile및를 사용합니다DeleteAssetFile.

스킬 end-to-end 관리

다음 연습에서는 세 가지 방법(단일 텍스트 파일, 바이너리 파일, zip 번들)으로 스킬을 생성한 다음 읽기, 업데이트 및 삭제 작업을 수행합니다. 를 에이전트 스페이스 ID8f6187a7-0388-4926-8217-3a0fe32f757c로 바꿉니다.

단일 텍스트 파일에서 스킬 생성

이는 인라인으로 업로드된 단일 SKILL.md 파일이라는 가장 간단한 경로입니다. 업로드에는 정확히 하나의 텍스트 파일이 포함되어 있으므로 description에서 name 및를 제공해야 합니다metadata.

AWS CLI:

aws devops-agent create-asset \ --agent-space-id 8f6187a7-0388-4926-8217-3a0fe32f757c \ --asset-type skill \ --metadata '{ "name": "rds-performance-investigation", "description": "Investigation procedures for RDS performance issues. Use when investigating database latency, connection errors, or query timeouts.", "agent_types": ["GENERIC"] }' \ --content '{ "file": { "path": "SKILL.md", "body": { "text": "# RDS Performance Investigation\n\nUse this skill when customers report database latency, connection errors, query timeouts, or read/write performance degradation." } } }'

Python(Boto3):

import boto3 client = boto3.client("devops-agent") response = client.create_asset( agentSpaceId="8f6187a7-0388-4926-8217-3a0fe32f757c", assetType="skill", metadata={ "name": "rds-performance-investigation", "description": ( "Investigation procedures for RDS performance issues. " "Use when investigating database latency, connection errors, " "or query timeouts." ), "agent_types": ["GENERIC"], }, content={ "file": { "path": "SKILL.md", "body": { "text": ( "# RDS Performance Investigation\n\n" "Use this skill when customers report database latency, " "connection errors, query timeouts, or read/write " "performance degradation." ) }, } }, ) asset_id = response["asset"]["assetId"]

이진 파일에서 스킬 생성

스킬 콘텐츠가 UTF-8 텍스트가 아닌 경우 이진 업로드를 사용합니다. 아래 예제에서는 사전 렌더링된 PDF를 스킬 본문으로 업로드합니다. 요청 본문에는 content 조합 내에 중첩된 base64 인코딩 BLOB이 포함되어 있으므로 JSON 파일의 요청을 --cli-input-json 로 제공하고 base64 인코딩 BLOB을 미리 제공합니다.

아래 -w 0 플래그는 GNUbase64에 인코딩된 BLOB을 한 줄로 내보내도록 지시합니다.이 플래그가 없으면 기본 76자 줄 바꿈은 BLOB이 헤리독으로 보간될 때 잘못된 JSON을 생성하는 줄 바꿈을 삽입합니다. macOS에서는 base64 -i ops-runbook.pdf (BSDbase64는 기본적으로 래핑되지 않음)를 사용합니다.

요청 본문을 빌드합니다.

base64 -w 0 ops-runbook.pdf > ops-runbook.b64 cat > create-skill.json <<EOF { "agentSpaceId": "8f6187a7-0388-4926-8217-3a0fe32f757c", "assetType": "skill", "metadata": { "name": "ops-runbook", "description": "Operations runbook covering on-call escalation paths.", "agent_types": ["GENERIC"] }, "content": { "file": { "path": "SKILL.pdf", "body": { "bytes": "$(cat ops-runbook.b64)" } } } } EOF

AWS CLI:

aws devops-agent create-asset --cli-input-json file://create-skill.json

Python(Boto3):

with open("ops-runbook.pdf", "rb") as f: body_bytes = f.read() response = client.create_asset( agentSpaceId="8f6187a7-0388-4926-8217-3a0fe32f757c", assetType="skill", metadata={ "name": "ops-runbook", "description": "Operations runbook covering on-call escalation paths.", "agent_types": ["GENERIC"], }, content={ "file": { "path": "SKILL.pdf", "body": {"bytes": body_bytes}, } }, )

zip 번들에서 스킬 생성

스킬에 SKILL.md 더하기 참조 자료 및 자산과 같이 둘 이상의 파일이 포함된 경우 zip 업로드를 사용합니다. zip 업로드의 경우 서비스 읽기 nameSKILL.md 프론트미터description에서를 업로드하므로에 포함하지 마십시오metadata.

zip 레이아웃은 다음과 같습니다.

rds-performance-investigation.zip ├── SKILL.md ├── references/ │ └── rds-metrics-reference.md └── assets/ └── rds-investigation-flowchart.png

SKILL.md 에는 서비스가 이름과 설명을 추출할 수 있도록 frontmatter가 포함되어야 합니다.

--- name: rds-performance-investigation description: Investigation procedures for RDS performance issues including connection exhaustion, slow queries, replication lag, and storage capacity. Use this skill when investigating database latency, connection errors, or read/write performance degradation. --- # RDS Performance Investigation ...

요청 본문을 빌드합니다.

base64 -w 0 rds-performance-investigation.zip > skill.zip.b64 cat > create-skill.json <<EOF { "agentSpaceId": "8f6187a7-0388-4926-8217-3a0fe32f757c", "assetType": "skill", "metadata": { "agent_types": ["GENERIC"] }, "content": { "zip": { "zipFile": "$(cat skill.zip.b64)" } } } EOF

AWS CLI:

aws devops-agent create-asset --cli-input-json file://create-skill.json

Python(Boto3):

with open("rds-performance-investigation.zip", "rb") as f: zip_bytes = f.read() response = client.create_asset( agentSpaceId="8f6187a7-0388-4926-8217-3a0fe32f757c", assetType="skill", metadata={"agent_types": ["GENERIC"]}, content={"zip": {"zipFile": zip_bytes}}, )

리포지토리에서 스킬 가져오기

GitHub 리포지토리 디렉터리에서 직접 스킬을 가져와 스킬을 생성할 수 있습니다. AWS DevOps Agent는 스킬 콘텐츠를 가져오고, SKILL.md frontmatter에서 이름과 설명을 추출하고, Agent Space에서 스킬을 생성합니다. 이를 통해 버전 관리 기술을 관리하고 프로그래밍 방식으로 가져오거나 동기화할 수 있습니다.

사전 조건:

  • 에이전트 스페이스에는 GitHub 계정이 연결되어 있어야 합니다. GitHub 연결을(를) 참조하세요.

  • 리포지토리 디렉터리에는 frontmatter가 있는 유효한 SKILL.md 파일이 포함되어야 합니다.

AWS CLI:

aws devops-agent create-asset \ --agent-space-id 8f6187a7-0388-4926-8217-3a0fe32f757c \ --asset-type skill \ --metadata '{ "agent_types": ["GENERIC"] }' \ --content '{"sourceUrl": {"url": "https://github.com/my-org/my-repo/tree/main/skills/rds-investigation"}}'

Python(Boto3):

response = client.create_asset( agentSpaceId="8f6187a7-0388-4926-8217-3a0fe32f757c", assetType="skill", metadata={"agent_types": ["GENERIC"]}, content={ "sourceUrl": { "url": "https://github.com/my-org/my-repo/tree/main/skills/rds-investigation" } }, ) asset_id = response["asset"]["assetId"]

서비스는 디렉터리 콘텐츠를 가져오고, name 및에 대한 SKILL.md frontmatter를 읽고description, 모든 파일을 가져옵니다. descriptionname 또는 metadata를 포함하지 마십시오. 프런트미터에서 자동으로 추출됩니다.

가져온 스킬 동기화:

리포지토리에서 최신 변경 사항을 가져오려면 UpdateAsset를 사용하여를 호출합니다content.sourceUrl.

aws devops-agent update-asset \ --agent-space-id 8f6187a7-0388-4926-8217-3a0fe32f757c \ --asset-id <assetId> \ --content '{"sourceUrl": {"url": "https://github.com/my-org/my-repo/tree/main/skills/rds-investigation"}}'
response = client.update_asset( agentSpaceId="8f6187a7-0388-4926-8217-3a0fe32f757c", assetId="<assetId>", content={ "sourceUrl": { "url": "https://github.com/my-org/my-repo/tree/main/skills/rds-investigation" } }, )

동기화는 스킬 콘텐츠를 리포지토리 디렉터리의 현재 상태로 완전히 대체합니다. 편집 가능한 필드(상태, 에이전트 유형)는 보존됩니다.

가져오기 소스 보기:

GetAsset는 리포지토리 가져오기 기술을 metadata.source 위해에서 소스 정보를 반환합니다.

{ "metadata": { "name": "rds-performance-investigation", "description": "Investigation procedures for RDS performance issues...", "source": { "url": "https://github.com/my-org/my-repo/tree/main/skills/rds-investigation", "lastSyncedAt": 1718467200 }, "agent_types": ["GENERIC"], "skill_type": "USER", "status": "ACTIVE" } }

제약 조건:

  • GitHub URLs만 허용됩니다. 참조 파일을 포함하여 전체 디렉터리를 가져오는 SKILL.md(예: https://github.com/org/repo/tree/main/skills/my-skill)이 포함된 디렉터리를 가리킬 수 있습니다. SKILL.md 리포지토리의 루트에 있는 경우 SKILL.md만 가져오는 파일(예: https://github.com/org/repo/blob/main/SKILL.md)에 직접 연결할 수도 있습니다.

  • 디렉터리에는 유효한 프론트미터가 있는 SKILL.md가 포함되어야 합니다.

  • 총 디렉터리 크기는 6MB를 초과할 수 없으며 최대 100개의 파일을 초과할 수 없습니다.

  • content.sourceUrlcontent.file 및와 상호 배타적입니다. 동일한 요청에서 결합할 수 content.zip없습니다.

  • 메타데이터 전용 업데이트( 제외content)는 기존 가져오기 소스를 보존하며 리포지토리에서 다시 가져오지 않습니다.

가져오기, 나열, 업데이트 및 삭제

GetAsset를 사용하여 ID별로 단일 자산을 검색합니다.

aws devops-agent get-asset \ --agent-space-id 8f6187a7-0388-4926-8217-3a0fe32f757c \ --asset-id <assetId>

ListAssets를 사용하여 에이전트 스페이스의 모든 자산을 페이징합니다.

aws devops-agent list-assets \ --agent-space-id 8f6187a7-0388-4926-8217-3a0fe32f757c \ --max-results 50 aws devops-agent list-assets \ --agent-space-id 8f6187a7-0388-4926-8217-3a0fe32f757c \ --max-results 50 \ --next-token <token>

콘텐츠를 다시 업로드하지 않고 하나 이상의 metadata 필드를 변경하는 UpdateAsset 데 사용합니다. 생략한 키는 기존 값을 유지합니다.

aws devops-agent update-asset \ --agent-space-id 8f6187a7-0388-4926-8217-3a0fe32f757c \ --asset-id <assetId> \ --metadata '{ "agent_types": ["INCIDENT_TRIAGE", "INCIDENT_RCA"] }'

ListAssetVersions를 사용하여 자산의 버전 기록을 검사합니다. 성공UpdateAsset하거나 UpdateAssetFile 호출할 때마다 자산의 버전 번호가 발전합니다.

aws devops-agent list-asset-versions \ --agent-space-id 8f6187a7-0388-4926-8217-3a0fe32f757c \ --asset-id <assetId>

DeleteAsset를 사용하여 자산과 모든 파일을 제거합니다.

aws devops-agent delete-asset \ --agent-space-id 8f6187a7-0388-4926-8217-3a0fe32f757c \ --asset-id <assetId>

기존 스킬에 단일 파일 추가

zip 번들에서 스킬을 이미 생성하고 새 참조 파일을 하나 추가하려면 전체 번들을 다시 업로드할 필요가 없습니다. 사용CreateAssetFile:

aws devops-agent create-asset-file \ --agent-space-id 8f6187a7-0388-4926-8217-3a0fe32f757c \ --asset-id <assetId> \ --path references/troubleshooting.md \ --content '{ "text": "# Troubleshooting\n\nAdditional notes." }'

파일을 바꾸려면를 동일한 인수update-asset-file와 함께 사용합니다. 제거하려면를 사용합니다delete-asset-file.

기술 활성화 및 비활성화

스킬은에서 활성화 상태를 유지합니다metadata.status. 새 스킬은 ACTIVE 기본적으로 조사 및 채팅 중에 에이전트가 로드합니다. 예를 들어 예기치 않은 결과를 생성하는 이유를 조사하고 나중에 다시 활성화하는 동안 스킬을 비활성화하여 스킬을 삭제하지 않고 교체에서 제외할 수 있습니다.

CreateAsset 요청에 를 포함하여 생성 시 초기 상태를 설정합니다metadata.status.

aws devops-agent create-asset \ --agent-space-id 8f6187a7-0388-4926-8217-3a0fe32f757c \ --asset-type skill \ --metadata '{ "name": "rds-performance-investigation", "description": "Investigation procedures for RDS performance issues.", "agent_types": ["GENERIC"], "status": "INACTIVE" }' \ --content '{ "file": { "path": "SKILL.md", "body": { "text": "# RDS Performance Investigation" } } }'

를 사용하여 기존 스킬을 비활성화합니다UpdateAsset. metadata는 부분 업데이트로 적용되므로 전송 시 다른 모든 필드는 그대로 status 유지됩니다.

aws devops-agent update-asset \ --agent-space-id 8f6187a7-0388-4926-8217-3a0fe32f757c \ --asset-id <assetId> \ --metadata '{ "status": "INACTIVE" }'

를 사용하여 동일한 방식으로 다시 활성화합니다"status": "ACTIVE".

aws devops-agent update-asset \ --agent-space-id 8f6187a7-0388-4926-8217-3a0fe32f757c \ --asset-id <assetId> \ --metadata '{ "status": "ACTIVE" }'

GetAsset 및 에는 스킬 자산에 status metadata 대한 현재가 ListAssets 항상 포함되므로 언제든지 실시간 활성화 상태를 읽을 수 있습니다.

status 필드는 대/소문자를 구분합니다. ACTIVEINACTIVE (대문자)만 허용됩니다. 다른 모든 값은에서 실패합니다ValidationException. 활성화는 스킬에만 적용됩니다. 다른 자산 유형에 metadata.status 대한 설정은 영향을 주지 않으며 필드는 응답에서 삭제됩니다.

다른 자산 유형의 예

위의 스킬 연습은 다른 모든 자산 유형에 적용됩니다. 유일한 차이점은 metadata 블록과 첨부 파일의 경우 바이너리 콘텐츠 선택입니다. 아래 최소 CreateAsset 호출은 각 유형을 보여줍니다.

AGENTS.md 생성:

aws devops-agent create-asset \ --agent-space-id 8f6187a7-0388-4926-8217-3a0fe32f757c \ --asset-type agents_md \ --metadata '{ "agent_type": "INCIDENT_TRIAGE" }' \ --content '{ "file": { "path": "AGENTS.md", "body": { "text": "# Triage Instructions\n\nFollow these steps for new incidents." } } }'

첨부 파일을 생성합니다(이진 콘텐츠, 이진 파일에서 스킬 생성에 표시된 대로 JSON 파일에서 요청 빌드).

base64 -w 0 topology.png > topology.png.b64 cat > create-attachment.json <<EOF { "agentSpaceId": "8f6187a7-0388-4926-8217-3a0fe32f757c", "assetType": "attachment", "metadata": { "filename": "topology.png", "extension": "png", "size": 184320 }, "content": { "file": { "path": "topology.png", "body": { "bytes": "$(cat topology.png.b64)" } } } } EOF aws devops-agent create-asset --cli-input-json file://create-attachment.json

사용자 지정 에이전트 생성:

aws devops-agent create-asset \ --agent-space-id 8f6187a7-0388-4926-8217-3a0fe32f757c \ --asset-type custom_agent \ --metadata '{ "name": "rds-firefighter", "tools": ["cloudwatch:GetMetricData", "rds:DescribeDBInstances"], "skills": ["rds-performance-investigation"] }' \ --content '{ "file": { "path": "AGENT.md", "body": { "text": "# RDS Firefighter\n\nCustom agent for RDS incidents." } } }'

테스트 프로필 생성:

aws devops-agent create-asset \ --agent-space-id 8f6187a7-0388-4926-8217-3a0fe32f757c \ --asset-type test_profile \ --metadata '{ "name": "checkout-api-tests", "test_agent_type": "releaseApiTesting", "target_url": "https://api.example.com", "test_personas": ["guest", "authenticated"] }' \ --content '{ "file": { "path": "PROFILE.md", "body": { "text": "# Checkout API test profile" } } }'

피드백 자산 생성:

aws devops-agent create-asset \ --agent-space-id 8f6187a7-0388-4926-8217-3a0fe32f757c \ --asset-type feedback \ --metadata '{ "execution_id": "b2c3d4e5-6789-01ab-cdef-example22222", "agent_types": ["INCIDENT_TRIAGE"] }' \ --content '{ "file": { "path": "FEEDBACK.md", "body": { "text": "{\"verdict\":\"correct\"}" } } }'

지원되는 자산 유형을 나열합니다.

aws devops-agent list-asset-types