Get started with AgentCore Runtime using the AgentCore CLI in TypeScript
This page provides a concise workflow for creating and deploying a code-based TypeScript Strands agent to AgentCore Runtime. For CLI installation, complete prerequisites, project capabilities, observability, and cleanup, see Get started with Amazon Bedrock AgentCore.
Prerequisites
-
Install the AgentCore CLI as described in Install the AgentCore CLI.
-
Configure your AWS credentials and permissions as described in Prerequisites.
-
Install Node.js 22 or later.
Create your agent project
Create a TypeScript project that uses the Strands Agents SDK and Amazon Bedrock:
agentcore create \ --name MyTsProject \ --template agent-typescript-strands
The template creates a Node.js 22 CodeZip Runtime, adds an AgentCore Memory resource, and installs the project dependencies.
For other model providers and the CLI’s China Region restrictions, see Choose a Runtime model provider and CLI project scope in China Regions. TypeScript Strands supports the openai_compatible provider but not lite_llm.
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.
Test your agent locally
Start the Runtime locally and open the Agent Inspector:
cd MyTsProject 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 your deployed agent
agentcore invoke --runtime agent \ --payload '{"prompt":"Hello, what can you do?"}'
Iterate on app/agent/main.ts, test locally, and deploy again when you are ready.
Troubleshoot
For common CLI installation, deployment, configuration, and observability issues, see Troubleshoot.
Next steps
-
Get started with Amazon Bedrock AgentCore - use the complete AgentCore CLI workflow.