Quickstart

Turn your Strands agent into an agent-native application in 10 minutes.

Start with your coding agent

Use this prompt to connect your AWS Strands agent to CopilotKit and verify a working conversation. Your coding agent will follow this guide in your project, or you can work through the manual steps below.

Open your coding agent in your project's folder, or in an empty folder for a new app.

Prerequisites

Before you begin, you'll need the following:

  • An OpenAI or Anthropic API key
  • Node.js 20+
  • Python 3.12+ (Python agents only)
  • uv (Python agents only)
  • Your favorite package manager

Getting started

Set up CopilotKit Intelligence

Sign in to cloud-hosted Intelligence. Cloud-hosted setup uses a server-side project API key and does not issue COPILOTKIT_LICENSE_TOKEN. You will connect the app after you create it below.

Choose your starting point

You can either start fresh with our starter template or integrate CopilotKit into your existing Strands agent.

Run our CLI

npx copilotkit@latest create --framework aws-strands-ts

The CLI walks you through:

  • Project name
  • CopilotKit Intelligence: persistent threads and the inspector. Choose Yes to scaffold a project pre-wired for the platform (the CLI walks you through sign-up, or you can create an account first), or No for a standard AWS Strands setup.
  • Framework: the command selects the AWS Strands template for this page.

Install dependencies

npm install

Configure your environment

Create a .env file in your agent directory and add your OpenAI API key:

agent/.env
OPENAI_API_KEY=your_openai_api_key

Get your OpenAI API key

Using Anthropic instead

The starter reads its model from COPILOTKIT_AGENT_MODEL. Add these lines to agent/.env:

agent/.env
ANTHROPIC_API_KEY=your_anthropic_api_key
COPILOTKIT_AGENT_MODEL=anthropic:claude-sonnet-4-6

Every model call in the agent then uses Claude. This includes the A2UI tool.

Start the development server

npm run dev

This will start both the UI and agent servers concurrently.

Start chatting

Your AI agent is now ready to use. Navigate to localhost:3000 and try asking it some questions:

What can you do?
Please tell me a joke.
What do you think about React?

Open Inspector and confirm setup

On localhost, click the Inspector button in the corner of the app.

  1. Open Inspect, then Agent. Your agent is listed.
  2. Send a chat message. Open Inspect, then AG-UI Events. Events are moving.
  3. Open Rich Threads. The list is unlocked (Intelligence is on), or locked with Copy setup prompt (Intelligence is off).

More detail: Inspector.

Deploying to AWS?

If you're planning to deploy your Strands agent to AWS Bedrock AgentCore, see the AgentCore deploy guide.

What's next?

Now that you have your basic agent setup, explore these advanced features:

How is this guide?