Skip to content
Kimenpre-v1documentation home
Color scheme

Working with AI

Kimen treats agent legibility as a deliverable: an API a capable agent cannot wire correctly from its description alone is treated as a defect. Everything below is generated from the component sources and shipped with the package, so it can never drift from the code.

The library, indexed for language models the way the llms.txt convention describes. The index is short — what Kimen is, how to install and load it, and one line per component saying when to use it — and each line links one Markdown document with that component’s complete contract: when-to-use / when-not-to-use guidance, typed attributes (required, bounded and URL attributes marked), slots, CSS parts, events, methods, styling tokens and curated runnable examples.

  • On this site: /llms.txt is the index. Every document it links is served under /llms/ — for example /llms/ki-button.md — and /llms-full.txt is all of it in one file.
  • In the npm package: @kimen/elements ships llms.txt with relative links to llms/*.md and llms-full.txt, so an agent reads the documents of the version that is installed, offline.
  • In the repository: llms.txt at the repository root.

Point your tool at the index — @docs in Cursor or Windsurf, or paste the URL into a ChatGPT/Claude conversation — and the agent reads about two thousand tokens, then fetches only the components it decides to use.

To set up a coding agent rather than point it at files, install the Kimen agent skills (kimen-components and kimen-genui) and connect the kimen-mcp server, which lists and describes the catalog, validates UI specs and renders them as live components in MCP Apps hosts. Setup for Claude Code, Claude Desktop, Codex, Antigravity, OpenCode and other clients: Connect your agent.

The Custom Elements Manifest is the interchange format the ecosystem reads: Storybook, IDE completions (VS Code custom data, JetBrains web-types) and this site’s own API tables all consume it.

  • In the npm package: the customElements field of @kimen/elements points to generated/custom-elements.json.
  • On this site: served at /assets/elements/custom-elements.json for tools that want to fetch it.

Kimen extends the standard schema with whenToUse / whenNotToUse fields per component — the same guidance rendered on each component page.

The catalog: from description to guardrail

Section titled “The catalog: from description to guardrail”

Reading about components is half the story; emitting UI safely is the other half. @kimen/catalog gives agents a validated output format — the UI spec — and gives hosts a renderer that enforces it fail-closed. For protocol-level integration, Kimen ships adapters for A2UI and MCP Apps, where a Kimen surface reaches an MCP host as a self-contained ui:// resource.

To configure the model itself, @kimen/emitter derives the guidance artifacts from the catalog in use: a system prompt carrying each component’s usage guidance verbatim, a catalog-specialized JSON Schema with provider-strict lowerings, and a provider-neutral tool definition — plus the normalize-and-repair helpers that close the reliability loop. See Emitting specs with any LLM.

llms.txt tells a model what exists; the catalog constrains what it may build; the emitter teaches any model to build it. Shipping all three is the point.