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).
How it fits
Section titled “How it fits”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-turnai-agent:write:approveai-agent:write:approve-alwaysai-agent:write:log-tool-callai-agent:write:rejectai-agent:write:set-permissionai-agent:write:transcribe
Dependencies
Section titled “Dependencies”- Requires:
ai-foundation,tenant,cap-counter - 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 |
|---|---|---|---|---|---|
mode | select (read-only | approval | edit) | approval | tenant | TenantAdmin, SystemAdmin | all |
monthly-token-limit | number (1–100000000) | 1000000 | tenant | TenantAdmin, SystemAdmin | all |
monthly-transcription-limit | number (1–1000000) | 1000 | tenant | TenantAdmin, SystemAdmin | all |