Skip to main content

Feed content to your AI

Goal: turn any document — Word, PDF, JSON, Markdown, HTML — into a stream of clean, anchored content blocks an AI assistant or RAG pipeline can read without knowing anything about the source format. No translation is involved. Every block carries a stable content_hash anchor — a retrieval key derived from the block's text, not its position — so an edit produced later can be written back to the same block with the surrounding markup intact. Concepts: Content model, Checks.

Ingestion is a pipeline job, so the desktop's role here is inspection, not export:

  1. See what your AI will see. Open a file in your project — the Blocks view is the same record stream kapi inspect emits: the text and its structural role, with the surrounding markup stripped away.
  2. Judge the parse before you index. Preview — plus Structure and Layout where the format carries them — shows whether headings, tables, and reading order came through; cheaper to catch here than in retrieval quality later.
  3. Then stream. The feed itself is kapi inspect --jsonl (CLI tab), or a connected assistant reading blocks directly (Agent tab).

In a project

In a .kapi project, kapi stats, kapi inspect, and kapi check with no file argument survey every source the recipe declares — and the same content_hash anchors stay stable across runs, so an assistant indexing your project can retrieve and rewrite the same blocks over time.

Further reading

  • Edit content — the inspect → edit → apply loop and the preservation contract.
  • MCP server — every structured tool behind the same loop.
  • What gets translated — if your goal is translation rather than AI ingestion.