ESP Claw in ESP32


ESP Claw in ESP32

ESP Claw in ESP32

01 Overview

The ESP-Claw (AI Agent on ESP32) is an AI-powered embedded system built on the ESP32-S3 that enables users to flash firmware, connect to Wi-Fi, and configure the device through Telegram. It demonstrates AI-assisted embedded development, GPIO control using optional components such as an LED, and practical ESP32 programming with minimal hardware requirements.

The ESP-Claw (AI Agent on ESP32) is an innovative AI-powered embedded system built on the ESP32-S3 that combines artificial intelligence, IoT connectivity, and embedded programming into a single platform. It enables users to flash the official firmware, connect the device to Wi-Fi, and configure its behavior through Telegram while supporting optional peripherals such as LED. By integrating AI capabilities with the ESP32-S3's processing power and GPIO interfaces, the system demonstrates intelligent device interaction, automation, and real-time hardware control. This project provides users with practical experience in ESP32 development, AI-assisted programming, wireless communication, and embedded systems using minimal hardware requirements.

Project Use Case

The ESP-Claw (AI Agent on ESP32) is designed for students, IoT developers, and beginners who want to learn embedded systems, AI integration, and ESP32 programming. It simplifies the development of AI-enabled embedded applications by providing an easy way to flash firmware, connect to Wi-Fi, and configure device behavior through Telegram, eliminating the need for complex setup procedures. This project can be used in classrooms, embedded systems laboratories, IoT workshops, and personal learning projects, where users can gain practical experience in AI-assisted programming, wireless communication, GPIO control, and real-world automation using the ESP32-S3.

02 Hardware and Software Components

Gather everything below before you start. The ESP Claw in ESP32 includes most of these components.

Hardware Components

Component Description
Seeed Studio XIAO ESP32S3 The main micro controller used to run the ESP-Claw firmware and control the system.
USB Cable Used for flashing the firmware and powering the ESP32-S3 board.
LED LED (Light Emitting Diode) serves as a status indicator in the ESP-Claw project, showing system states such as power, connection, and activity.
Resistor 220ohms 220Ω Resistor is used to limit the current flowing to the LED, protecting it from damage and ensuring safe operation in the ESP-Claw circuit.
Jumper Wires Used to connect the components to the ESP32-S3 board.
Breadboard Provides a temporary and solder less setup for easy circuit assembly.

Software Tools

Software Version / Details
ESP-Claw Version 0.1.0
Telegram Version 6.9.3
ESP32-S3 Version 3.0
Note:This project uses only the essential hardware components required to demonstrate the ESP-Claw framework. The external LED is optional and is included solely to demonstrate GPIO output control during AI agent interaction.

03 Application Discussion

Here is what each key component does and why it is part of these projects.

Seeed Studio XIAO ESP32S3

The main microcontroller that runs the ESP-Claw firmware and controls the system.

USB Cable

Provides power and uploads the firmware to the ESP32-S3.

LED

Indicates the system status, such as power and activity.

220 Ω Resistor

Limits the current to protect the LED.

Jumper Wires

Connect the components to the ESP32-S3.

Breadboard

Provides a solderless platform for building and testing the circuit.

04 Getting Started: Hardware Setup

The ESP-Claw project uses the ESP32-S3 platform. Follow these steps once to set up your development environment before starting the project.

ESP Claw in ESP32
ESP Claw in ESP32

Step 1 — Gather Your Components

  1. 1x Seeed Studio XIAO ESP32S3
  2. 1x Breadboard
  3. 1x Red LED
  4. 1x Resistor (220Ω)
  5. 2x Jumper Wires (1x Red, 1x Black)
  6. 1x USB Type-C Cable

Step 2 — Identify LED Polarity and Place it on the Breadboard

  1. Examine your LED to identify its pins: the longer leg is the positive terminal (Anode), and the shorter leg is the negative terminal (Cathode).
  2. Insert the LED into the breadboard so that the two legs are in two separate, independent rows.
Important: Never place both legs of the LED into the same row, as this will short-circuit the component.

Step 3 — Connect the Resistor

  1. Take your resistor and bend its legs so it can bridge two rows on the breadboard.
  2. Insert one leg of the resistor into the same row as the shorter leg (Cathode) of the LED.
  3. Insert the other leg of the resistor into a new, separate row further down the breadboard.
Why use a resistor? LEDs are highly sensitive to current. Connecting an LED directly to a power source without a resistor can burn out the LED instantly.

Step 4 — Connect the Jumper Wires

Connect the Black jumper wire to a GND (Ground) pin on your ESP32 board. Connect the other end to the row containing the free, remaining leg of the resistor.

Connect the Red jumper wire to a Digital GPIO pin (e.g., D10 or your designated signal pin) on the ESP32 board. Connect the other end to the row containing the longer leg (Anode) of the LED.

Step 5 — Power Up the Board

Double-check all your breadboard connections to ensure no pins or bare wires are accidentally touching.

Plug the USB Type-C cable into the ESP32 board, and connect the other end to your computer's USB port to provide power.

05 ESP-Claw Setup (ESP32-S3 + Telegram)

The ESP-Claw project uses the ESP32-S3, Wi-Fi, and Telegram for AI-powered device interaction and configuration. Complete the firmware installation, Wi-Fi setup, and Telegram integration once, then reuse the same configuration for all supported examples and optional hardware demonstrations. Each example simply uses its own GPIO peripherals and AI agent settings.

Part A — Hardware Assembly & Connections

  1. Components: The setup uses an ESP32-S3 development board, a breadboard, an LED, a resistor, and jumper wires.
  2. Wiring: The LED and resistor are placed onto the breadboard.
  3. Jumper wires connect the development board's GPIO pins and ground (GND) to the LED and resistor circuit.
Note: ESP-Claw requires your own Wi-Fi credentials, Telegram bot token, and API key. Replace the placeholder values in the configuration with your own credentials, and keep them secure because they provide access to your device and services.

Part B — Flashing the Firmware via Browser

  1. Platform: The user navigates to the online flashing tool
  2. Connection: The ESP32-S3 board is connected to the PC via a USB cable, and the browser establishes a serial connection to the COM port.
  3. Configuration: The user selects the appropriate chip variant (ESP32-S3).
  4. Flashing: The firmware is successfully downloaded and flashed directly onto the device through the web interface.

Flash the ESP-Claw Firmware

bash

Connect to Wi-Fi

bash
WI-FI SSID     WI-FI PASSWORD 

After flashing, connect the ESP32-S3 to your Wi-Fi network by entering your SSID and password in the configuration.

text
Connected

Open Telegram

bash
Open

Open Telegram, start a chat with your configured bot, and send a message to begin interacting with the ESP-Claw AI agent.

text
Flashing

Part C — Initial Device Provisioning & Configuration

  1. Wi-Fi Setup: Once flashed, the device connects to the local Wi-Fi network.
  2. Local Web Interface: The user opens the device's local configuration page via its IP address
  3. LLM Integration: In the first-use wizard, DeepSeek is chosen as the LLM provider, and the model deepseek-v4-pro is selected. The user copies an API key from the DeepSeek Platform and pastes it into the configuration.
  4. Instant Messenger Integration: The user creates a new Telegram bot using Telegram's BotFather, copies the Telegram Bot Token, and links it to the ESP-CLAW device.
  5. Web Search Engine: A Tavily API search key is generated and added to enable the web search capabilities of the device.
  6. Restart: The device saves all configurations and restarts to complete the initialization wizard.
Note: Use the latest ESP-Claw firmware release. Older firmware versions may not support the latest features and bug fixes.

Part D — Direct Interaction via Telegram

Each ESP-Claw example uses the same Wi-Fi and Telegram configuration. Configure these settings once during the initial setup, and all subsequent examples can reuse them.

  1. Natural Language Controls: The user opens a direct chat with their newly created Telegram bot (ESPClawBot).
  2. AI Agent Execution: The user gives commands in plain English: "Write code to blink an LED connected to GPIO2 and display in 'on' and 'off' messages in this chatbot."
  3. Autonomous Coding: The embedded AI agent reasons through the hardware request, automatically generates the necessary Lua scripts, configures GPIO22 as an output, runs the code in the background, and outputs real-time log updates directly into the Telegram chat whenever the physical LED turns ON or OFF.
Note: If the ESP-Claw device fails to connect, verify that your Wi-Fi credentials, Telegram bot token, and API key are correct, and ensure the ESP32-S3 is connected to a stable internet connection.

06 Flash

Step 1 — Flash the ESP-CLAW Firmware

Unlike standard projects that require library compilation, ESP-CLAW flashes a full agent core system directly from your web browser:

  • Connect your ESP32-S3 board to your PC's USB interface slot via your Type-C data connection line.
  • Open your internet web browser and go to the official Espressif provisioning website page at esp-claw.com.
  • Pick the matching microchip framework platform profile ESP32-S3 and select your exact board module configuration option ESP32-S3.
  • Click the connection establishment control link button, highlight your target COM port option, and finalize the web serial link.
  • Click the installation deployment script button to securely write the binary file system blocks onto your device.

Step 2 — Provision the Agent Environment

  1. Once installation finishes, let the board restart and connect to your local wireless Wi-Fi station setup.
  2. Identify the board's dynamic local IP address mapping and input it directly into your web browser address field to access the setup wizard.
  3. Configure your integrated model setup layer: Select DeepSeek as your cloud engine, assign the model variant core name to deepseek-v4-pro, and paste your personal account API verification authorization key block.
  4. Initialize your remote execution interface: Open your messaging software, message the official account handler @BotFather to generate a brand new chatbot profile entry framework, and copy the delivered Telegram Bot Token hash key into your ESP-CLAW configuration wizard before saving and rebooting.
  5. Flash Upload Flashing

07 Flash Breakdown

This project uses the XIAO ESP32-S3 development board with the ESP-Claw firmware and an optional external LED for GPIO demonstration. It also requires a Wi-Fi connection and Telegram for AI agent configuration and interaction.

Pin Connections

Component ESP32 Pin
XIAO ESP32-S3 Main Microcontroller
External LED Anode + GPIO 2
External LED Cathode – 220 Ω Resistor
220 Ω Resistor GND
Jumper Wires Connect GPIO2, LED, Resistor, and GND

07 Software Setup

Step 1 — Configure the AI Agent Environment

Unlike standard projects requiring specific libraries, the ESP-CLAW agent framework handles hardware logic directly through a cloud-linked LLM core. Follow these provisioning steps to link your configuration:

  • Launch your web browser interface window and log in to your local ESP-CLAW device configuration page using its assigned network IP address.
  • Navigate to the primary LLM engine settings layer and select DeepSeek from the provider options dropdown list.
  • Designate the specific processing brain core architecture variant to deepseek-v4-pro.
  • Paste your personal account authentication key token into the API Key parameter field.

Step 2 — Execute Chat-Based Interaction

  1. Open your Telegram application workspace and pull up your registered chatbot interface screen profile conversation window @ESPClawBot.
  2. Input a direct instruction prompt command utilizing normal conversational English dialogue, specifying your targeted digital hardware pins.
  3. The edge framework will pass your text instruction downstream to the AI processing block, dynamically generate the required execution loops in the background, and return real-time status output logs directly inside the chat interface window.
  4. Flash Upload.

08 Testing and Calibration

AI Agent on ESP32: This project uses the ESP-Claw framework running on the ESP32-S3. Complete the firmware flashing, Wi-Fi configuration, and Telegram setup described in the previous section before proceeding with the examples and optional hardware connections below.

06 Hardware Setup

Pin Connections

Component ESP32 Pin
XIAO ESP32-S3 Main Microcontroller
External LED Anode + GPIO 2
External LED Cathode – 220 Ω Resistor
220 Ω Resistor GND
Jumper Wires Connect GPIO2, LED, Resistor, and GND
Note: The optional LED is connected to a GPIO pin of the XIAO ESP32-S3 through a current-limiting resistor. The LED is used as a simple output device to demonstrate GPIO control and provide visual feedback during AI agent operation.

07 Software Setup

Step 1 — Configure the AI Agent Environment

Unlike standard projects that require local library compilation, the ESP-CLAW agent framework handles hardware logic through a cloud-linked LLM engine. Complete this provisioning once to enable autonomous control:

  • Access the local ESP-CLAW setup interface by entering your board's IP address into your web browser.
  • Navigate to the configuration settings and select DeepSeek as your AI provider.
  • Set the agent core model profile to deepseek-v4-pro.
  • Paste your unique account API authentication token into the key field.

Step 2 — Telegram Bot Integration

To control the hardware via conversational commands, you must link your local agent to a Telegram bot:

  • Message @BotFather in your Telegram app to register a new bot and retrieve your unique Telegram Bot Token.
  • Add your search engine API key to enable autonomous web lookup capabilities for your agent.
  • Click Save and reboot your ESP32 board to apply the new agent credentials.

Step 3 — Operational Command Flow

Once deployed, your ESP32 acts as an autonomous agent reachable via direct message. Interact with the system using your registered bot username @ESPClawBot to manipulate hardware in real-time:

Instruction Type Example Chat Command
Inventory warehouse/inventory
Hardware Control "Turn the LED on."
Hardware Control "Turn the LED off."
Logic Execution "Blink the LED three times."
Logic Execution "Turn on the LED for five seconds, then turn it off."

09 System Demonstration

The video below demonstrates the ESP-Claw (AI Agent on ESP32) project in action—from firmware flashing and Wi-Fi configuration to Telegram-based AI interaction and GPIO control using optional peripherals.

The videos below demonstrate the ESP-Claw (AI Agent on ESP32) project in action.

 


10 Conclusion

The ESP-Claw (AI Agent on ESP32) is a practical and accessible platform for exploring artificial intelligence, embedded systems, and IoT using the ESP32-S3. By guiding users through firmware installation, Wi-Fi configuration, Telegram integration, and optional GPIO peripherals, the project provides hands-on experience in AI-assisted programming, wireless communication, and real-time hardware control. It serves as an excellent learning platform for students, hobbyists, and developers seeking to build intelligent embedded applications with minimal hardware requirements.

By working through this project, students and makers gain practical experience in firmware flashing, ESP32-S3 programming, Wi-Fi connectivity, Telegram-based AI interaction, and GPIO control using optional peripherals such as LEDs, buttons, and sensors. These hands-on skills provide a strong foundation in embedded systems, AI-assisted development, IoT communication, and intelligent device automation, which are increasingly valuable in modern engineering and technology careers.

Possible Improvements and Future Enhancements

  • Add support for additional sensors and actuators to enable more advanced AI-driven automation and environmental monitoring.
  • Integrate voice recognition and speech synthesis for hands-free interaction with the AI agent.
  • Add cloud data logging and visualization using platforms such as Firebase, MQTT, or Home Assistant for remote monitoring.
  • Improve system security by implementing encrypted communication, user authentication, and secure API key management.
  • Support multiple ESP32 devices for coordinated AI-assisted IoT applications and distributed automation.
  • Integrate smart home protocols and platforms, such as Home Assistant, to enable seamless IoT ecosystem integration.

11 References

  • Espressif Systems. ESP-Claw: AI agent framework for ESP32. GitHub. — github.com
  • Espressif Systems. ESP32-S3 series. — espressif.com
  • Espressif Systems. ESP-IDF programming guide. — espressif.com
  • Seeed Studio. Getting started with XIAO ESP32-S3. — seeedstudio.com
  • Telegram. Telegram Bot API. — telegram.org
  • DeepSeek AI. — deepseek.com

12 Project Authors

  • John Paul Terania
  • Cheenelie Gregorio
ESP Claw in ESP32 – CreateLabz

Esp32-s3Espclaw

Leave a comment

All comments are moderated before being published