Skip to content

ai-draft

Enterprise Part of the commercial Kumiko Enterprise offering — not in the open framework.

Query handler (ai-draft:query:draft) that takes a source message (subject, sender, body) and a stated purpose, then returns a ready-to-send draft reply via the tenant’s configured LLM provider. The system prompt is editable per-tenant through a config-key or the prompt-store (no deploy required); the caller is responsible for sending or storing the returned draft in a separate write action. Model, effort and token budget come from the prompt revision in the prompt-store, falling back to the tenant defaults.

This Enterprise implementation is optional. If you need a narrower or domain-specific version, you can build an app-owned feature, handler, or job with Kumiko’s public extension points.

Use this package when you want the maintained implementation, its existing contracts, and the surrounding operational behavior. A custom implementation is not drop-in compatible automatically: your app owns its authorization, validation, integrations, tests, security review, and production operations.

Start with Features and composition and Custom write handlers.

What this feature needs to run (Requires).

flowchart TB
  n_ai_draft["ai-draft"]
  subgraph how_reqs["Requires"]
    n_ai_foundation["ai-foundation"]
    n_config["config"]
    n_prompt_store["prompt-store"]
  end
  n_ai_foundation --> n_ai_draft
  n_config --> n_ai_draft
  n_prompt_store --> n_ai_draft

Per-tenant config keys, set via the tenant-admin UI or a seed. 🔒 = encrypted at rest.

KeyTypeDefaultScopeWho can writeWho can read
draft-system-prompttextYou draft a reply message for a business application.\n\nGiven the source message and the stated purpose, write a professional, concise reply.\n- Match the language of the source message unless a target language is given.\n- Courteous and to the point; avoid placeholders like [name] unless unavoidable.\n- Return the draft via the draft_message tool (subject + body).\n\nIf the purpose is unclear or you are missing information you cannot reasonably assume, call clarify_request instead. Call exactly one tool.tenantTenantAdmin, SystemAdminTenantAdmin, SystemAdmin