Agent Commands¶
The agent
command group contains all commands related to managing agent runtimes, including creation, updates, invocation, and deletion.
Overview¶
Agent commands provide complete lifecycle management for your agents on Amazon Bedrock AgentCore Runtime. Each agent represents a containerized AI application that can be deployed, versioned, and invoked through endpoints.
-
create
Create and deploy a new agent runtime.
-
update
Update an existing agent with a new version.
-
invoke
Invoke an agent runtime with a prompt or payload.
-
list
List all deployed agent runtimes.
-
status
Show detailed status of an agent runtime.
-
delete
Delete an agent runtime and associated resources.
agent create¶
Create and deploy a new agent runtime.
Bash | |
---|---|
Arguments¶
Argument | Description |
---|---|
name |
The name of the agent to create (required) |
Options¶
Option | Description |
---|---|
--dockerfile PATH |
Path to the Dockerfile (default: Dockerfile ) |
--context PATH |
Docker build context (default: current directory) |
--build-args KEY=VALUE |
Build arguments for Docker build (can be used multiple times) |
--image-tag TAG |
Tag for the container image (default: latest ) |
--environment ENV |
Environment to deploy to (default: current environment) |
--region REGION |
AWS region for deployment |
--no-deploy |
Build the container but don't deploy the agent runtime |
--role-prefix PREFIX |
IAM role name prefix (default: agentcore ) |
--memory MB |
Memory allocation in MB (default: 2048 ) |
--timeout SEC |
Function timeout in seconds (default: 900 ) |
--concurrency NUM |
Maximum concurrent executions (default: 10 ) |
--environment-vars KEY=VALUE |
Environment variables for the agent (can be used multiple times) |
Examples¶
agent update¶
Update an existing agent with a new version.
Bash | |
---|---|
Arguments¶
Argument | Description |
---|---|
name |
The name of the agent to update (required) |
Options¶
Option | Description |
---|---|
--dockerfile PATH |
Path to the Dockerfile (default: Dockerfile ) |
--context PATH |
Docker build context (default: current directory) |
--build-args KEY=VALUE |
Build arguments for Docker build (can be used multiple times) |
--image-tag TAG |
Tag for the container image (default: autogenerated) |
--environment ENV |
Environment to deploy to (default: current environment) |
--region REGION |
AWS region for deployment |
--no-deploy |
Build the container but don't deploy the agent runtime |
--endpoint NAME |
Endpoint to update (default: DEFAULT ) |
--memory MB |
Memory allocation in MB |
--timeout SEC |
Function timeout in seconds |
--concurrency NUM |
Maximum concurrent executions |
--environment-vars KEY=VALUE |
Environment variables for the agent (can be used multiple times) |
Examples¶
agent invoke¶
Invoke an agent runtime with a prompt or payload.
Bash | |
---|---|
Arguments¶
Argument | Description |
---|---|
name |
The name of the agent to invoke (required) |
Options¶
Option | Description |
---|---|
--prompt TEXT |
Text prompt to send to the agent |
--file PATH |
Path to a file containing the prompt |
--payload JSON |
Raw JSON payload to send to the agent |
--payload-file PATH |
Path to a JSON file containing the payload |
--endpoint NAME |
Endpoint to invoke (default: DEFAULT ) |
--environment ENV |
Environment to use (default: current environment) |
--output FILE |
Save the response to a file |
--raw |
Output raw response without formatting |
--timeout SEC |
Request timeout in seconds (default: 30 ) |
Examples¶
agent list¶
List all deployed agent runtimes.
Bash | |
---|---|
Options¶
Option | Description |
---|---|
--environment ENV |
Environment to list agents from (default: current environment) |
--region REGION |
AWS region to list agents from |
--verbose , -v |
Show detailed information for each agent |
Examples¶
Bash | |
---|---|
agent status¶
Show detailed status of an agent runtime.
Bash | |
---|---|
Arguments¶
Argument | Description |
---|---|
name |
The name of the agent to show status for (required) |
Options¶
Option | Description |
---|---|
--environment ENV |
Environment to use (default: current environment) |
--region REGION |
AWS region to use |
Examples¶
Bash | |
---|---|
agent delete¶
Delete an agent runtime and associated resources.
Bash | |
---|---|
Arguments¶
Argument | Description |
---|---|
name |
The name of the agent to delete (required) |
Options¶
Option | Description |
---|---|
--environment ENV |
Environment to delete from (default: current environment) |
--region REGION |
AWS region to delete from |
--force |
Skip confirmation prompt |
--keep-ecr |
Keep the ECR repository and images |
--keep-iam |
Keep the IAM role |
Examples¶
Next Steps¶
Now that you understand the agent commands, you might want to explore:
- Environment Commands to manage your environments
- Container Commands to work directly with Docker containers
- Configuration Commands to manage your AgentCore configuration