# Run the R1 demo (/en/ai/device-kit/build/run-the-r1-demo)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

Use this guide when you want to validate the official R1 development baseline before customizing the device, server, or firmware stack.

## What you will set up [#what-you-will-set-up]

This baseline bring-up flow covers:

* The sample repository and development assets
* The demo server used by the device workflow
* Device network access and basic operating flow
* Firmware build, flash, and end-to-end verification

## Recommended order [#recommended-order]

1. [Run the demo server](run-the-demo-server)
2. [Configure device network](configure-device-network)
3. [Build and flash firmware](build-and-flash-firmware)
4. Verify the device interaction using the checks below

## Prerequisites [#prerequisites]

Before you begin, ensure you have the following:

* **Python 3.7 or later** for running the server-side components
* **R1 development board**: Contact [Agora Sales](mailto\:sales@agora.io) to purchase the R1 development board jointly developed by Agora and RiseLink. Refer to the [BK official documentation](https://docs.bekencorp.com/arminodoc/bk_idk/bk7258/en/v2.0.1/get-started/index.html) to set up your development environment.
* **Android device** for installing and testing the mobile app
* **Third-party AI services**: API keys and service endpoints for your chosen Large Language Model (LLM) and Text-to-Speech (TTS) providers
* **Agora project credentials**: An Agora project with Conversational AI Engine enabled

For project setup instructions, see [Enable services](../reference/enable-services).

## Get the sample project [#get-the-sample-project]

1. Clone the `Conversational-AI-IOT-Sample` repository to your local machine:

   ```bash
   git clone https://github.com/AgoraIO-Community/Conversational-AI-IOT-Sample.git
   ```

2. Switch to the `bk7258/v2.0.1` branch:

   ```bash
   cd Conversational-AI-IOT-Sample
   git checkout bk7258/v2.0.1
   ```

## Verify the device demo [#verify-the-device-demo]

After you have configured the server, device network, and firmware:

1. Connect the R1 development board to your computer using a Type-C cable connected to the `USB TO UART` interface.
2. If this is the first-time setup, press and hold the **S1** button for 5 seconds to enter network configuration mode, then finish Wi-Fi setup through the Android app.
3. Short press the **Middle button** to start a conversation with the AI agent.
4. Short press the **Middle button** again to end the conversation.
5. If the device enters deep sleep mode after 3 minutes of inactivity, press the **RST** button to restart.

   <CalloutContainer type="info">
     <CalloutTitle>
       Info
     </CalloutTitle>

     <CalloutDescription>
       * The `USB TO UART` interface also charges the battery. The device automatically activates when you connect a battery or data cable.
       * If the programming tool fails to restart the development board automatically, press the **RST** button to manually restart and restore programming capability.
     </CalloutDescription>
   </CalloutContainer>

## Related pages [#related-pages]

* [Run the demo server](run-the-demo-server)
* [Configure device network](configure-device-network)
* [Build and flash firmware](build-and-flash-firmware)
* [Demo server APIs](demo-server-apis)
