tech-advisor / training /data /raw /about-aws-devops-agent-managing-assets.md
aslanconfig's picture
Initial commit: Tech Advisor fine-tuned on AWS DevOps Agent docs
975da6d
|
Raw
History Blame Contribute Delete
5.61 kB

A newer version of the Gradio SDK is available: 6.20.0

Upgrade

Managing Assets

AWS DevOps Agent stores the configuration and reference material for an Agent Space as assets, the customer-managed resources that shape what the agent knows and how it behaves. Skills, AGENTS.md files, and attachments are all assets, and you can create, read, update, and delete them programmatically through the Asset API.

When to use the Asset API

The Operator Web App is the fastest way to author a single skill or upload an AGENTS.md file interactively. The Asset API exposes the same operations programmatically so that scripts and automation can manage assets without going through the Web App. Common reasons to call the Asset API directly include:

  • Authoring or updating an asset from a script, terminal, or notebook instead of the Web App.
  • Bulk-loading a starter set of skills or AGENTS.md files into a new Agent Space.
  • Reading an asset's contents to back it up or compare versions.

Every operation in the Asset API is exposed through the AWS CLI as aws devops-agent <operation> and through the AWS SDKs as the devops-agent client.

Asset API operations

Operation Description IAM action Resource
ListAssetTypes List the asset types supported by AWS DevOps Agent. aidevops:ListAssetTypes *
CreateAsset Create a new asset in an Agent Space. aidevops:CreateAsset Agent Space
GetAsset Retrieve an asset's metadata and version information. aidevops:GetAsset Agent Space
UpdateAsset Update the metadata or content of an existing asset. aidevops:UpdateAsset Agent Space
DeleteAsset Delete an asset and all of its files from an Agent Space. aidevops:DeleteAsset Agent Space
ListAssets List assets in an Agent Space, with optional filtering. aidevops:ListAssets Agent Space
ListAssetVersions List the historical versions of an asset. aidevops:ListAssetVersions Agent Space
GetAssetContent Download an asset's full content as a zip bundle. aidevops:GetAssetContent Agent Space
CreateAssetFile Add a new file to an existing asset. aidevops:CreateAssetFile Agent Space
GetAssetFile Retrieve a single file from an asset by its path. aidevops:GetAssetFile Agent Space
UpdateAssetFile Replace the content or metadata of an existing file. aidevops:UpdateAssetFile Agent Space
DeleteAssetFile Remove a single file from an asset. aidevops:DeleteAssetFile Agent Space
ListAssetFiles List the files within an asset. aidevops:ListAssetFiles Agent Space

Asset types

Every asset has an assetType string that identifies what kind of resource it is. Three asset types can be created through the Asset API: skill, agents_md, and attachment.

skill

A skill asset packages instructions and reference material that the agent loads when relevant. A simple skill is a single SKILL.md file; a complex skill is a zip bundle.

Required metadata properties:

  • name (string) – A unique identifier for the skill. Lowercase letters, numbers, and hyphens only, 1-64 characters.
  • description (string) – A 1-1024 character explanation of when the agent should use the skill.
  • agent_types (array of strings) – One or more agent types this skill applies to.

Optional metadata properties:

  • skill_type (string) – Defaults to USER.
  • status (string) – ACTIVE or INACTIVE. Defaults to ACTIVE.
  • enable_tools (array of strings) – A list of tool identifiers the agent can call when it loads this skill.

agents_md

An agents_md asset is a markdown file containing standing agent instructions for a specific agent type.

Required metadata properties:

  • agent_type (string) – The agent type the AGENTS.md file applies to.

Limits: Each Agent Space can contain at most one AGENTS.md per agent_type. Maximum 25 KB.

attachment

An attachment asset stores a binary or text file that the agent can reference during investigations.

Required metadata properties:

  • filename (string) – The original file name.
  • extension (string) – The file extension without the leading dot.
  • size (number) – The size of the file in bytes.

Managing a skill end-to-end

Create a skill from a single text file

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"]
  }' \
  --content '{
    "file": {
      "path": "SKILL.md",
      "body": {
        "text": "# RDS Performance Investigation\n\nUse this skill when customers report database latency."
      }
    }
  }'

Create a skill from a zip bundle

base64 -w 0 rds-performance-investigation.zip > skill.zip.b64
aws devops-agent create-asset --cli-input-json file://create-skill.json

Get, list, update, and delete

aws devops-agent get-asset --agent-space-id <id> --asset-id <assetId>
aws devops-agent list-assets --agent-space-id <id> --max-results 50
aws devops-agent update-asset --agent-space-id <id> --asset-id <assetId> --metadata '{ "agent_types": ["INCIDENT_TRIAGE"] }'
aws devops-agent delete-asset --agent-space-id <id> --asset-id <assetId>

Activating and deactivating skills

aws devops-agent update-asset --agent-space-id <id> --asset-id <assetId> --metadata '{ "status": "INACTIVE" }'
aws devops-agent update-asset --agent-space-id <id> --asset-id <assetId> --metadata '{ "status": "ACTIVE" }'