GETTING STARTED / 06

Build an AI Passport app with Codex

Open the app project in Codex, turn the idea into a verifiable task, then build, install, and iterate on hardware.

01

Prepare the app project and a test device

Start with a project you can build and an AI Passport you can use for testing. Note the dependencies and build command, and save a working firmware file you can restore if something goes wrong.

A programmable AI Passport connected over USB
Establish a build, flash, and recovery baseline first
  • Complete one clean build of the original project
  • Learn how to restore the default firmware and keep a tested stable build
  • Connect the test device with a data-capable USB cable
02

Open the app project in Codex

Give Codex the complete app project as its workspace. First ask it to read the project instructions, hardware configuration, existing examples, and build scripts, then summarize the paths it plans to reuse before making changes.

Prompt for the Agent
Build  using the complete project at https://gitee.com/FoloToy/ai-passport; reuse a local checkout if available.
Read AGENTS.md and docs/README.md first, then consult relevant documentation, hardware interfaces, and examples as needed. Prepare the environment and install the Skills required by the project.
Preserve existing changes and develop on a new branch. Reuse the BSP and design a fresh application UI instead of copying the demo; check font coverage for Chinese text. Ask when key requirements are unclear and handle the rest autonomously.
Run project validation and deliver merged firmware flashable from 0x0. Report test results and anything unverified. When finished, proactively ask whether to test on hardware; do not flash without confirmation.
The Codex project screen shown in the video
Choose Codex and let it understand the complete project first
Tip
Open the whole project so your AI agent can read the code, run tests, and build the firmware in one place.
03

Turn the app into a verifiable task

Tell Codex who the app is for, what appears after startup, how the three buttons behave, and what a successful result looks like. Require a completed build and flashable artifact, not source code alone.

Describing an AI Passport app in Codex
Turn the idea into a task with hardware constraints and acceptance criteria
  • Context and core goal
  • Screens, states, and text
  • Short- and long-press behavior for Up, Down, and Confirm
  • Sound, Bluetooth, networking, and storage needs
  • Success criteria, build command, and firmware output
04

Let Codex implement, build, and fix errors

Ask Codex to make the changes, run the project’s build and test commands, and fix any errors. Have it summarize what changed, what it checked, where to find the firmware, and what still needs testing.

Codex working through the project task
Keep implementation, building, error correction, and handoff together
Tip
Keep the full build error in the same task when something fails. Do not skip verification or treat unbuilt source as the finished result.
05

Install the Codex build on AI Passport

Open the web flasher, select the app produced by Codex, verify the target device, and start installation. Keep USB connected until writing finishes, then restart and confirm that the device boots.

A Codex-built app running on AI Passport
The result must start and run on real hardware
  • Select the artifact from the current build
  • Do not unplug or close the page during installation
  • Keep device logs and the build identity if anything fails
06

Use the device, then return feedback to Codex

Play through the complete experience away from the computer. Check display readability, one-handed controls, startup time, and recovery behavior. Give the reproduction steps, visuals, and logs back to the same Codex task for a focused rebuild.

Testing a custom mini game on AI Passport
Use real interaction feedback to drive the next Codex iteration
  • Keep each iteration focused on a few reproducible issues
  • Save a source commit and firmware backup for every usable build
  • Add screens, rules, or connectivity only after the core flow is stable