CoolFace
Apppublic

Onyxl/esp32-ai-proxy

sourceHugging Facemitupdated 2mo agoView on Hugging Face
0likes
App README

ESP32 AI Proxy

A Gradio-based proxy that connects ESP32 microcontrollers to HuggingFace AI models with agentic tool-calling support.

Features

  • —Simple JSON API for ESP32 communication
  • —Agentic tool-calling - AI can request hardware operations (LED, sensors, motors)
  • —Multi-model support - Qwen, Mistral, Llama
  • —Conversation history maintained server-side
  • —No API keys on ESP32 - all authentication handled by the proxy

ESP32 Integration

Send a POST request to /api/send_command with:

json
{
  "message": "turn on the LED",
  "context": "sensor readings: temp=25C, humidity=60%",
  "history": ""
}

Response:

json
{
  "response": "I'll turn on the LED for you.",
  "tool_calls": [{"name": "set_led", "arguments": {"pin": 2, "state": "on"}}],
  "history": "..."
}

Setup

  1. 1.Duplicate this Space to your account
  2. 2.Add your HuggingFace token as a secret named HF_TOKEN
  3. 3.Connect your ESP32-S3 via WiFi
  4. 4.Send HTTP POST requests to the API endpoint