View a markdown version of this page

Get started with AgentCore Runtime using the AgentCore CLI - Amazon Bedrock AgentCore
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Get started with AgentCore Runtime using the AgentCore CLI

This page provides a concise workflow for creating and deploying a code-based Strands agent to AgentCore Runtime. For CLI installation, complete prerequisites, project structure, capabilities, observability, and cleanup, see Get started with Amazon Bedrock AgentCore.

Create and test your agent

Create a Python project that uses the Strands Agents SDK and Amazon Bedrock:

agentcore create \ --name MyProject \ --template agent-python-strands

The template creates a Python CodeZip Runtime named agent, adds an AgentCore Memory resource, and installs the project dependencies.

You can also run agentcore with no arguments to open the interactive menu. Outside a project, the menu offers create. Inside a project, it offers deploy, invoke, and status. Choosing dev from the menu starts the local server in headless mode. To open the Agent Inspector, run agentcore dev --mode browser.

To choose the template interactively, run agentcore create without options:

Creating a Python Strands project with the interactive wizard.

Start the Runtime locally and open the Agent Inspector:

cd MyProject agentcore dev --mode browser

Without --mode browser, agentcore dev defaults to headless mode and streams the Runtime output to your terminal.

Build and deploy your agent

agentcore build agentcore deploy

Check the deployed resources:

agentcore status

Invoke the deployed Runtime:

agentcore invoke --runtime agent \ --payload '{"prompt":"Hello, what can you do?"}'

Iterate on app/agent/main.py, test locally, and deploy again when you are ready.

Troubleshoot

For common CLI installation, deployment, configuration, and observability issues, see Troubleshoot.

Next steps