ai-extract
Enterprise Part of the commercial Kumiko Enterprise offering — not in the open framework.
Query handler (ai-extract:query:extract) that reads one document — as text, as a PDF, or both — and returns the data it contains, shaped by a JSON-Schema the caller supplies. Domain-agnostic: a rental contract, a receipt and an invoice are the same call with a different schema. The system prompt is editable per-tenant via the prompt-store or a config-key, so operators tune extraction rules without a deploy; the caller re-validates the result against its own schema and decides what to write. The document (PDF) path requires an Anthropic provider — other providers throw on the document content block, so a tenant configured with e.g. openai-compat can only use the text path.
How it fits
Section titled “How it fits”What this feature needs to run (Requires).
flowchart TB
n_ai_extract["ai-extract"]
subgraph how_reqs["Requires"]
n_ai_foundation["ai-foundation"]
n_config["config"]
n_prompt_store["prompt-store"]
end
n_ai_foundation --> n_ai_extract
n_config --> n_ai_extract
n_prompt_store --> n_ai_extract
Dependencies
Section titled “Dependencies”- Requires:
ai-foundation,config,prompt-store - Activation: always on (not toggleable)
Configuration
Section titled “Configuration”Per-tenant config keys, set via the tenant-admin UI or a seed. 🔒 = encrypted at rest.
| Key | Type | Default | Scope | Who can write | Who can read |
|---|---|---|---|---|---|
extract-system-prompt | text | You read one document and return the data it contains.\n\nRules:\n- Return ONLY what the document states. Never infer, complete or round a value.\n- A field the document does not state is omitted, not guessed and not filled with a placeholder.\n- Copy identifiers, names and addresses exactly as written, including spelling you consider wrong.\n- Amounts and dates keep the document's own values; convert only into the format the schema asks for.\n- The document may be a poor scan. An illegible field is an omitted field, not your best guess.\n\nCall the extract_data tool exactly once. | tenant | TenantAdmin, SystemAdmin | TenantAdmin, SystemAdmin |