Tools
Genu
OpenClaw plugin: the agent answers with interactive cards in chat, composed from a component catalog.
Install
openclaw plugins install --link
Configuration Example
"plugins": { "entries": { "genu": { "enabled": true, "hooks": { "allowConversationAccess": true } } } }
README
# GenU
An OpenClaw plugin that lets the agent answer with a small interactive card in the chat thread, composed for the request: a form, a list of found results to choose from, a confirmation, or a booking with a live total and terms.
The agent describes the card as JSON (data, a tree of components from a fixed catalog, and actions) and calls the plugin's `genu_card` tool. The plugin validates it against the catalog and returns `show_widget` code that draws it with the renderer published at josephux/genu-renderer (pinned by version and hash on jsDelivr), in the host theme, and posts the user's choice back into the chat as their next message. The agent never writes HTML, CSS or code.
## Layout
- `index.js`: registers the `genu` widget kind.
- `src/schema.js`: the catalog, validation and normalization. Errors list every problem by path; advice holds back a card that is valid but weak until it is fixed or the rule is accepted.
- `src/compose.js`: builds the card document, inlining the renderer and the icons the card uses.
- `src/icons.js`, `src/lucide/`: the Lucide icon set, vendored as data by `scripts/vendor-lucide.mjs` (ISC license, in `src/lucide/LICENSE`). To update it, change the version in that script and run it.
- `renderer/card.css`, `renderer/card.js`: the components, the data model and the Form layout. No runtime dependencies. Colors come from the host theme tokens; shape, spacing and motion tokens are at the top of each file.
- `skills/genu/`: teaches the agent when to use a card, the catalog, and recipes for the common shapes. A test checks that every card in the skill validates.
- `examples/`: sample cards. `preview/` renders them outside OpenClaw.
- `design/canvas/`: scripts that build the design canvas (use cases and design system).
## Develop
```bash
npm test # schema and composition tests
npm run preview # writes preview/out/<example>-<theme>.html
node preview/shoot.mjs restaurant-light shot "click:.ic-trigger" "wait:600" # screenshot via headless Chrome
```
Install into a local OpenClaw from the source directory:
```bash
openclaw plugins install --link .
```
On OpenClaw 2026.11.6 and later, a plugin that isn't bundled with OpenClaw needs your permission before it can add to the conversation. Without it, GenU's reminder that sends find, book, watch and choose requests to a card is blocked. `openclaw plugins doctor` reports this as a blocked `before_prompt_build` hook. To allow it, set this in `~/.openclaw/openclaw.json`:
```json
"plugins": { "entries": { "genu": { "enabled": true, "hooks": { "allowConversationAccess": true } } } }
```
GenU still works without this setting: cards render, but the agent reaches for them less often.
## Limits
- Cards render where `show_widget` does: the Control UI web chat and the native apps. Posting answers back needs the Control UI; elsewhere the card offers a copy button.
- A card does not remember its state after the chat is reloaded, and cannot be changed once sent.
- A card cannot fetch anything or show remote images. All content is in the card when it is sent.
- Answers are capped at about 3,900 characters, the chat bridge's limit.
- Each card loads the renderer version pinned when it was sent, so a card already in a chat keeps that version.
## License
MIT, see `LICENSE`. Icons are from [Lucide](https://lucide.dev), under the ISC License (`src/lucide/LICENSE`).
tools
Comments
Sign in to leave a comment