Quickstart

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

Start with your coding agent

Use this prompt to connect your CrewAI 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 need a CrewAI Flow. It can run locally or on infrastructure you manage; a CrewAI Enterprise deployment is optional. If you use the CopilotKit CLI path below, the starter creates the Flow integration for you.

The CLI starter also needs:

  • Node.js 20.9+
  • Python 3.10 to 3.13
  • uv
  • An OpenAI API key

Getting started

Optional: Set up CopilotKit Intelligence

Start cloud-hosted setup and create or select a project if you want persistent threads and the inspector.

  • The CLI's init flow writes the server-side project API key to .env as CPK_INTELLIGENCE_API_KEY.
  • Cloud-hosted setup does not issue COPILOTKIT_LICENSE_TOKEN.
  • You do not need a Copilot Cloud account to run a local CrewAI Flow with CopilotKit.

How do you want to get started?

Bootstrap with the new CopilotKit CLI (Beta) or code along with us to get started.

Run the CLI

Run the following command in your Next.js application:

npx copilotkit@latest init --framework flows

The starter uses a regular CrewAI Flow.

Start the app

In the project directory, copy the example environment file:

cp .env.example .env

Set OPENAI_API_KEY in .env. Then install the dependencies and start the app:

npm install
npm run dev

npm install also installs the Python dependencies of the Flow with uv. npm run dev starts the UI and the Flow server.

Talk to your agent

You've successfully integrated a CrewAI Flow agent chatbot to your application. Depending on the template you chose, you may see some different UI elements. To start, try asking a few questions to your agent.

  • Can you tell me a joke?
  • Can you help me understand AI?
  • 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.


What's next?

How is this guide?