Catalog PyPI
Back to packageRELEASE DETAILS

0.31.2

PyPI

agentcore-cli

Unofficial Python port of the AgentCore CLI (@aws/agentcore) for Amazon Bedrock AgentCore

agentcoreagentsawsbedrockcli
Published12 Oct 2026
Direct dependencies14
Transitive dependenciesNot calculated

README

Version 0.31.2 documentation

agentcore-cli

Create, develop, and deploy AI agents to Amazon Bedrock AgentCore.

Python port of the AgentCore CLI (@aws/agentcore v0.31.1).

Status: early release. All commands are ported and covered by tests, but agentcore deploy has not yet been verified end-to-end against a real AWS account. Please report issues.

Overview

Amazon Bedrock AgentCore enables you to deploy and operate AI agents securely at scale using any framework and model. AgentCore provides tools and capabilities to make agents more effective, purpose-built infrastructure to securely scale agents, and controls to operate trustworthy agents. This CLI helps you create, develop locally, and deploy agents to AgentCore with minimal configuration.

Install

pip install agentcore-cli

Requirements:

  • Python 3.11+
  • uv for Python agents
  • Node.js 20+ for agentcore deploy (deploys run the project's CDK app)

Upgrading from the Bedrock AgentCore Starter Toolkit? Both the old Python CLI and this one use the agentcore command name, so having both installed can cause confusion. Uninstall the old one using whichever tool you originally used:

pip uninstall bedrock-agentcore-starter-toolkit     # if installed via pip
pipx uninstall bedrock-agentcore-starter-toolkit    # if installed via pipx
uv tool uninstall bedrock-agentcore-starter-toolkit # if installed via uv

Quick start

Run agentcore with no arguments to walk through the commands interactively, or run each command individually:

# Initialize a new agent project (choose framework: strands, langgraph, or custom)
agentcore init my-agent --framework strands

# Develop locally
cd my-agent
agentcore dev

# Deploy to AgentCore Runtime
agentcore deploy --region us-east-1

# Test the deployed agent
agentcore invoke --agent-name my-agent --input "Hello, what can you do?"

init derives valid names from the folder: my-agent becomes project MyAgent with agent my_agent (invoke --agent-name accepts either spelling). --framework custom scaffolds a minimal bedrock-agentcore entrypoint for your own code.

You can also use the upstream wizard, agentcore create, which guides you through agent setup.

Supported frameworks

FrameworkNotes
Strands AgentsAWS-native, streaming support (Python + TypeScript)
LangChain/LangGraphGraph-based workflows
Google ADKGemini models only
OpenAI AgentsOpenAI models only
Bedrock Managed AgentsRuntime environment for Bedrock Managed Agents sessions (Python, Container)

Supported model providers

ProviderAPI key requiredDefault model
Amazon BedrockNo (uses AWS credentials)us.anthropic.claude-sonnet-4-5-20250514-v1:0
AnthropicYesclaude-sonnet-4-5-20250514
Google GeminiYesgemini-2.5-flash
OpenAIYesgpt-4.1

Commands

Project lifecycle

CommandDescription
createCreate a new AgentCore project
initInitialize a new agent project (added in this port)
devStart local development server
deployDeploy infrastructure to AWS
invokeInvoke deployed agents

Resource management

CommandDescription
addAdd harnesses, agents, memory, credentials, gateways and gateway-targets, evaluators, online evals, online insights, knowledge bases, config bundles, datasets, policy engines and policies, payment managers and payment connectors, capacity providers, runtime endpoints
removeRemove any of the above resources from the project

Note: run agentcore deploy after add or remove to update resources in AWS.

Harness

A harness bundles a runtime, model, tools, skills, memory, and observability into one declarative config. Use it when you want infrastructure without writing agent code.

CommandDescription
add harnessAdd a harness resource (runtime + model + memory)
add toolAdd a tool to a harness (--harness <name> --type <type> --name <name>)
add skillAdd a skill to a harness (--harness <name> + --path / --s3 / --git)
export harnessExport a harness config to a deployable Strands Python agent under app/

After export harness, read app/<agentName>/EXPORT_NOTES.md before running deploy. It lists any manual follow-up the exporter could not automate.

Observability

CommandDescription
logsStream or search agent runtime logs
traces listList recent traces for a deployed agent
traces getDownload a trace to a JSON file
statusShow deployed resource details

Evaluations

CommandDescription
add evaluatorAdd a custom LLM-as-a-Judge evaluator
add online-evalAdd continuous evaluation for live traffic
run evalRun on-demand evaluation against agent traces
run batch-evaluationRun evaluators across all sessions
run recommendationOptimize prompts and tool descriptions
evals historyView past eval run results
pause online-evalPause a deployed online eval config
resume online-evalResume a paused online eval config
stop batch-evaluationStop a running batch evaluation
logs evalsStream or search online eval logs

Config bundles

CommandDescription
add config-bundleAdd a versioned configuration bundle
cb versionsList version history for a bundle
cb diffDiff two versions of a bundle
cb create-branchCreate a new branch on an existing bundle

Create agents with --with-config-bundle to auto-wire config bundle support into the generated template.

A/B tests

CommandDescription
run ab-testStart an A/B test (config-bundle or target-based) on a gateway
view ab-testList A/B test jobs or view one in detail
pause ab-testPause traffic splitting for a running test
resume ab-testResume a paused test
stop ab-testStop a running test (terminal)
promote ab-testApply the winning variant to agentcore.json
archive ab-testDelete the test on the service and clear local history

Knowledge bases

CommandDescription
add knowledge-baseAdd a managed Bedrock Knowledge Base wired to a gateway

Compatibility with the npm CLI

All upstream commands and flags work as documented in the upstream command reference (agentcore create, add, remove, status, logs, traces, evals, ...).

  • Projects are interchangeable: the same agentcore/ files, written byte-for-byte as the npm CLI writes them.
  • Secrets in agentcore/.env.local use the same enc:v1: AES-256-GCM envelope and key (OS keychain entry aws-agentcore / env-local-secret-key, or ~/.agentcore/secrets.key).
  • Additions in this port: agentcore init, deploy --region, and invoke --agent-name / --input.
  • Differences: interactive mode uses prompts instead of a full-screen UI; no telemetry is sent; agentcore update upgrades via pip (or tells you the pipx/uv command).

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 14

Native requirements
14 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
boto3
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
boto3>=1.43.111runtime
cryptography
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
cryptography>=42runtime
keyring
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
keyring>=25runtime
opentelemetry-proto
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
opentelemetry-proto>=1.20runtime
packaging
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
packaging>=24runtime
pybars3
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
pybars3>=0.9.7runtime
pydantic
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
pydantic>=2.7runtime
pyyaml
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
pyyaml>=6runtime
questionary
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
questionary>=2runtime
rich
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
rich>=13runtime
typer
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
typer>=0.12runtime
websockets
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
websockets>=13runtime
pytest
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
pytest>=8; extra == "dev"runtime
ruff
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.11",
  "evaluation": "NOT_EVALUATED"
}
ruff>=0.5; extra == "dev"runtime

Distribution files

2 collected
agentcore_cli-0.31.2-py3-none-any.whl

bdist_wheel · 1,260.72 KB · Python py3

Source file
agentcore_cli-0.31.2.tar.gz

sdist · 1,280.9 KB · Python source

Source file

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 21:43 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:f579cbb2b6bc56e9e0b06d1d646797db8def736d74873396c60aa905158b36fe

Other collected versions

View all collected versions →