zclaw:在ESP32上运行的,不到888KB的个人AI助手。
zclaw: personal AI assistant in under 888 KB, running on an ESP32

原始链接: https://github.com/tnm/zclaw

## zclaw:适用于ESP32的微型AI助手 zclaw是一款轻量级AI个人助手,专为在ESP32板上运行而设计,固件尺寸非常小(<= 888KB)。它使用C语言编写,可以实现对计划任务、GPIO引脚和持久内存的自然语言控制。 用户可以创建自定义工具,并通过Telegram或托管Web中继与zclaw交互。它支持流行的LLM提供商,如Anthropic、OpenAI和OpenRouter,并在ESP32-C3、S3和C6板上进行了测试。 设置过程简化为一行启动脚本,然后进行烧录和凭证配置。提供了全面的文档和各种脚本,用于构建、烧录(包括安全选项)、测试和基准测试性能。zclaw非常适合寻求有趣且可黑客改造的AI驱动ESP32项目的爱好者和开发者。

Hacker News 新闻 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 zclaw: 在 ESP32 上运行的个人 AI 助手,体积小于 888 KB (github.com/tnm) 10 分,tosh 发表于 1 小时前 | 隐藏 | 过去 | 收藏 | 1 条评论 帮助 johnea 发表于 7 分钟前 [–] 我其实不需要任何帮助…回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

Lobster soldering a Seeed Studio XIAO ESP32-C3

The smallest possible AI personal assistant for ESP32.

zclaw is written in C and runs on ESP32 boards with a strict firmware budget target of <= 888 KB on the default build. It supports scheduled tasks, GPIO control, persistent memory, and custom tool composition through natural language.

Fun to use, fun to hack on.

Use the docs site for complete guides and reference.

One-line bootstrap (macOS/Linux):

bash <(curl -fsSL https://raw.githubusercontent.com/tnm/zclaw/main/scripts/bootstrap.sh)

Already cloned?

Non-interactive install:

Important setup notes:

  • bootstrap.sh clones/updates the repo and then runs ./install.sh.
  • For encrypted credentials in flash, use secure mode (--flash-mode secure in install flow, or ./scripts/flash-secure.sh directly).
  • After flashing, provision WiFi + LLM credentials with ./scripts/provision.sh.
  • Quick validation path: run ./scripts/web-relay.sh and send a test message to confirm the device can answer.
  • If serial port is busy, run ./scripts/release-port.sh and retry.
  • Full setup/provisioning details are in the docs site index.
  • Chat via Telegram or hosted web relay
  • Timezone-aware schedules (daily, periodic, and one-shot once)
  • Built-in + user-defined tools
  • GPIO read/write control with guardrails
  • Persistent memory across reboots
  • Provider support for Anthropic, OpenAI, and OpenRouter

Tested targets: ESP32-C3, ESP32-S3, and ESP32-C6. Other ESP32 variants should work fine (some may require manual ESP-IDF target setup). Tests reports are very welcome!

Recommended starter board: Seeed XIAO ESP32-C3

  • ./scripts/build.sh - Build firmware
  • ./scripts/flash.sh - Flash firmware
  • ./scripts/flash-secure.sh - Flash with encryption
  • ./scripts/provision.sh - Provision credentials to NVS
  • ./scripts/monitor.sh - Serial monitor
  • ./scripts/emulate.sh - Run QEMU profile
  • ./scripts/web-relay.sh - Hosted relay + mobile chat UI
  • ./scripts/benchmark.sh - Benchmark relay/serial latency
  • ./scripts/docs-site.sh - Serve docs site
  • ./scripts/test.sh - Run host/device test flows
  • ./scripts/test-api.sh - Run live provider API checks (manual/local)

Relay path benchmark (includes web relay processing + device round trip):

./scripts/benchmark.sh --mode relay --count 20 --message "ping"

Direct serial benchmark (host round trip + first response time). If firmware logs METRIC request ... lines, the report also includes device-side timing:

./scripts/benchmark.sh --mode serial --serial-port /dev/cu.usbmodem1101 --count 20 --message "ping"

MIT

联系我们 contact @ memedata.com