Skip to content

ai-agent

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

In-app tool-loop agent. ai-agent:stream:turn resolves a user prompt against the tenant’s LLM provider and the role-filtered tool catalog derived from the registry (search/find/get/list for every mounted entity, plus navigate/open_form/ask_user), streaming persisted ai-agent-turn rows back to the caller as they’re produced. In approval mode a write tool call is never dispatched directly, it turns into a proposal turn that ai-agent:write:approve / :reject resolve explicitly. read-only mode never exposes write tools to the model at all. edit mode (opt-in via editEnabled) auto-dispatches a write whose handler has an always permission rule and isn’t high-risk; see permissions.ts. Requires ai-foundation (LLM provider), tenant, and cap-counter (monthly token budget).

What this feature needs to run (Requires, top) and the write commands this feature provides (Provides, bottom).

flowchart TB
  n_ai_agent["ai-agent"]
  subgraph how_reqs["Requires"]
    n_ai_foundation["ai-foundation"]
    n_tenant["tenant"]
    n_cap_counter["cap-counter"]
  end
  subgraph how_provides["Provides"]
    n_cmd_ai_agent_write_append_turn(["append-turn"])
    n_cmd_ai_agent_write_approve(["approve"])
    n_cmd_ai_agent_write_approve_always(["approve-always"])
    n_cmd_ai_agent_write_log_tool_call(["log-tool-call"])
    n_cmd_ai_agent_write_reject(["reject"])
    n_cmd_ai_agent_write_set_permission(["set-permission"])
    n_cmd_more(["+1 more"])
  end
  n_ai_foundation --> n_ai_agent
  n_tenant --> n_ai_agent
  n_cap_counter --> n_ai_agent
  n_ai_agent --> n_cmd_ai_agent_write_append_turn
  n_ai_agent --> n_cmd_ai_agent_write_approve
  n_ai_agent --> n_cmd_ai_agent_write_approve_always
  n_ai_agent --> n_cmd_ai_agent_write_log_tool_call
  n_ai_agent --> n_cmd_ai_agent_write_reject
  n_ai_agent --> n_cmd_ai_agent_write_set_permission
  n_ai_agent --> n_cmd_more

Provides, write commands this feature registers (dispatch them through the command bus):

  • ai-agent:write:append-turn
  • ai-agent:write:approve
  • ai-agent:write:approve-always
  • ai-agent:write:log-tool-call
  • ai-agent:write:reject
  • ai-agent:write:set-permission
  • ai-agent:write:transcribe

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

KeyTypeDefaultScopeWho can writeWho can read
modeselect (read-only | approval | edit)approvaltenantTenantAdmin, SystemAdminall
monthly-token-limitnumber (1–100000000)1000000tenantTenantAdmin, SystemAdminall
monthly-transcription-limitnumber (1–1000000)1000tenantTenantAdmin, SystemAdminall