Skip to content

Installation

This guide will help you install and set up the AgentCore CLI on your system.

Prerequisites

Before installing the AgentCore CLI, ensure you have:

  • Python 3.11+ installed on your system
  • Docker installed and running (for building and managing container images)
  • AWS CLI configured with appropriate permissions
  • Access to Amazon Bedrock AgentCore Runtime (Preview)

Installation Options

Bash
1
2
3
4
5
# Install using pip
pip install agentcore-cli

# Or using uv (recommended)
uv pip install agentcore-cli
Bash
1
2
3
4
5
6
7
8
9
# Clone the repository
git clone https://github.com/theagenticguy/agentcore-cli.git
cd agentcore-cli

# Install dependencies using uv (recommended)
uv sync

# Or install using pip
pip install -e .

Verifying Installation

After installation, verify that the AgentCore CLI is working correctly:

Bash
agentcore-cli --version

You should see the version number and a welcome banner.

AWS Credentials

The AgentCore CLI requires valid AWS credentials to function. You can set these up in several ways:

Bash
aws configure

You'll be prompted to enter:

  • AWS Access Key ID
  • AWS Secret Access Key
  • Default region name
  • Default output format (optional)
Bash
1
2
3
export AWS_ACCESS_KEY_ID=your_access_key_id
export AWS_SECRET_ACCESS_KEY=your_secret_access_key
export AWS_DEFAULT_REGION=us-west-2

If your organization uses AWS Single Sign-On:

Bash
aws sso login --profile your-sso-profile
export AWS_PROFILE=your-sso-profile

If you're running on an EC2 instance or ECS container, you can use IAM roles attached to your compute resource.

Required AWS Permissions

The AgentCore CLI requires the following AWS permissions:

  • Bedrock AgentCore: For runtime management
  • ECR: For repository and image management
  • IAM: For role creation and management
  • CloudFormation: For stack management
  • Cognito: For user pool management
  • Parameter Store: For configuration sync
  • CloudWatch Logs: For monitoring

Here's a sample IAM policy with the minimum required permissions:

JSON
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "bedrock-agentcore:*",
        "bedrock-agentcore-control:*",
        "ecr:*",
        "iam:CreateRole",
        "iam:AttachRolePolicy",
        "iam:PassRole",
        "iam:GetRole",
        "iam:DeleteRole",
        "iam:DetachRolePolicy",
        "cloudformation:*",
        "cognito-idp:*",
        "cognito-identity:*",
        "ssm:GetParameter",
        "ssm:PutParameter",
        "ssm:DeleteParameter",
        "ssm:DescribeParameters",
        "logs:CreateLogGroup",
        "logs:CreateLogStream",
        "logs:PutLogEvents"
      ],
      "Resource": "*"
    }
  ]
}

Warning

This is a sample policy with broad permissions. In production, you should follow the principle of least privilege and restrict permissions to only what's necessary.

Next Steps

Once you've installed the AgentCore CLI, you're ready to:

  1. Run the initialization wizard to set up your project
  2. Deploy your first agent

If you encounter any issues during installation, see our troubleshooting guide.