Skip to content

feat: add ai_hello minimal LVGL + velaclaw demo - #80

Merged
tanghao-xiaomi merged 1 commit into
open-vela:dev-ai-contest-2026from
CV-Bowen:feat/ai-hello-demo
Dec 2, 2026
Merged

tanghao-xiaomi merged 1 commit into
open-vela:dev-ai-contest-2026from
CV-Bowen:feat/ai-hello-demo

Conversation

@CV-Bowen

@CV-Bowen CV-Bowen commented Dec 2, 2026

Copy link
Copy Markdown

Summary

Add ai_hello, a ~300 line native LVGL app showing how a C app talks to ai_agent through the velaclaw client SDK: tap one of three preset questions, the app sends it with velaclaw_ask() and shows the answer.

mini_memo is currently the only SDK user, but it also pulls in voice, storage and JSON parsing. ai_hello keeps only what a new app has to get right:

  • the reply callback runs on an ai_agent thread, so the text is handed to the LVGL thread through a locked buffer + lv_timer;
  • the SDK has no timeout, so the app gives up after 30 s;
  • the system role is read from /data/ai_hello_persona.txt on every ask, so it can be changed with echo without rebuilding.

It is used as the hands-on example of the openvela AI workshop (R528 MIBOX-X1).

Depends on open-vela/packages_ai_agent#51 and open-vela/packages_ai_agent#52 (CMake SDK build, local client status message).

Impact

New app behind CONFIG_AI_HELLO (default n, depends on GRAPHICS_LVGL && EXAMPLES_AI_AGENT_VELA). No change to existing apps.

Testing

Host: Ubuntu 22.04 x86_64, prebuilt toolchains from the openvela manifest (dev-ai-contest-2026).

  • R528 MIBOX-X1 (r528s3-mibox-x1, nsh + ai_agent + CONFIG_AI_HELLO=y), Make build, DeepSeek backend: three taps, three different answers in 0.9–1.1 s.
  • goldfish-arm64-v8a-ap (ai_agent defconfig + CONFIG_AI_HELLO=y), CMake build: builds and links; app starts and sends the question to ai_agent.
  • nuttx/tools/checkpatch.sh -f: clean except the license-header path note, same as mini_memo.

@CV-Bowen
CV-Bowen requested review from a team as code owners December 2, 2026 03:34
A ~300 line C app showing how a native LVGL app talks to ai_agent
through the velaclaw client SDK: tap one of three preset questions,
the app sends it with velaclaw_ask() and shows the answer.

It demonstrates the points a new app has to get right:
  - the reply callback runs on an ai_agent thread, so the text is
    handed to the LVGL thread through a locked buffer + lv_timer;
  - the SDK has no timeout, so the app gives up after 30 s;
  - the system role is read from /data/ai_hello_persona.txt on every
    ask, so it can be changed with echo without rebuilding.

The UI is English; the default role asks the model to answer in Chinese,
so a CJK TTF font is loaded for the reply label.

Builds with both Make (R528 MIBOX-X1) and CMake (goldfish). Needs the
ai_agent fixes "cmake: build the velaclaw local client SDK" and
"agent_loop: skip working status on the velaclaw local client channel".

Verified on R528 MIBOX-X1 with DeepSeek: three taps, three different
answers in 0.9-1.1 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
@tanghao-xiaomi
tanghao-xiaomi merged commit 58e9a22 into open-vela:dev-ai-contest-2026 Dec 2, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants