Get AI agent details, package URLs, or logs
GET/ai/agents/:id
Default (no action): returns details for agent {id}. CUSTOM agents require at least read-only resource access. SYSTEM agents are returned with a reduced field set and AccessType read-only. ARN attributes are omitted. CUSTOM agents include ReferenceId when the AgentCore runtime exists. Query action selects an alternate 200 shape. Logs and package actions are CUSTOM-only (AI-1002 for SYSTEM). Time range for log actions is Unix milliseconds; omitted start-time/end-time default to the last hour; the range cannot exceed 30 days (IPV-1008). action=retrieve-script: presigned GET URL for agents/{id}/agent_package.zip (or PackageExists=false). action=upload-script: presigned PUT URL to replace the package (then PUT /ai/agents/{id} to apply). action=view-logs: processed CloudWatch logs. action=generate-logs: starts async S3 processing (poll download-logs). action=download-logs: presigned GET URLs for existing processed JSON files.
Request
Responses
- 200
- 400
- 500
Successful response. Shape depends on action: agent details; retrieve-script package download; upload-script package upload URL; view-logs; generate-logs trigger; or download-logs URLs.
Response Headers
Validation or authorization failure. Body is {"Message": " -
Response Headers
Backend failure. Body is {"Message": " -