realtime-voice-component / demo
AGENTS.md887 starsChanged 8 months agoApache-2.0View on GitHub
This demo/ app is organized as a small set of canonical examples for the package, not as a general-purpose sandbox. Run these when you change the demo app:
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repositoryOne other file it gives its agents.
- AGENTS.mdAGENTS.md
The file
We split this AGENTS.md into the rules it gives an agent
7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 34
Keep demo-specific tools and controller logic inside the matching demo folder.
- Very specific: line 35
Keep cross-demo behaviors in src/demos/shared/, especially the shared session wiring and change_demo tool.
- Very specific: line 36
Keep the overview page snippets aligned with the current public package API.
- Distinctive: line 37
If wake-word behavior changes, treat it as shared demo behavior unless the change is truly route-specific.
- Distinctive: line 39
Keep the package story simple: app-owned tools first, wake word second.
- Very specific: line 40
When changing a demo's visible fields or tool contract, update the route UI, the demo tools/controller, and test/demoApp.test.tsx together.
- Distinctive: line 44
Run these when you change the demo app:
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Demo App Instructions
This demo/ app is organized as a small set of canonical examples for the package, not as a general-purpose sandbox.
Purpose
/is the overview page. It explains whatrealtime-voice-componentis for, how tools fit into the integration model, and which demos to study next./demo/themeis the smallest example. It demonstrates a tiny tool surface with one visible UI action plus an optional message tool./demo/formis the structured example. It demonstrates one-field-at-a-time updates, post-tool follow-ups, and explicit submission.
Folder Layout
src/demos/shared/- shared card/shell primitives
- shared toast/message tool
- shared wake-word hook
- shared session/controller wiring for cross-demo handoff
src/demos/overview/- overview route only
src/demos/theme/index.tsxfor page UIcontroller.tsfor controller wiringtools.tsfor theme-specific toolsconfig.tsfor prompt/config constants
src/demos/form/index.tsxfor page UIcontroller.tsfor controller wiringtools.tsfor form-specific toolsconfig.tsfor prompt/config constants
Editing Rules
- Reuse the shared demo card system and
demo.css. Do not introduce a second visual language for one route. - Keep demo-specific tools and controller logic inside the matching demo folder.
- Keep cross-demo behaviors in
src/demos/shared/, especially the shared session wiring andchange_demotool. - Keep the overview page snippets aligned with the current public package API. If tool or controller APIs change, update
/,README.md, and the relevant examples together. - If wake-word behavior changes, treat it as shared demo behavior unless the change is truly route-specific.
- Switching between interactive demos should reset the Realtime session, then reconnect and resend the visible state for the newly active demo if the widget was already live.
- Keep the package story simple: app-owned tools first, wake word second.
- When changing a demo's visible fields or tool contract, update the route UI, the demo tools/controller, and
test/demoApp.test.tsxtogether.
Validation
Run these when you change the demo app:
corepack pnpm demo:typecheckcorepack pnpm testcorepack pnpm demo:build
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

