kiki-agent-lite 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -10
- package/dist/docs/en/configuration/config-files.md +63 -20
- package/dist/docs/en/configuration/data-locations.md +12 -4
- package/dist/docs/en/configuration/env-vars.md +4 -6
- package/dist/docs/en/configuration/overrides.md +13 -14
- package/dist/docs/en/configuration/providers.md +8 -6
- package/dist/docs/en/customization/agent-profiles.md +33 -38
- package/dist/docs/en/customization/agents.md +129 -107
- package/dist/docs/en/customization/hooks.md +41 -48
- package/dist/docs/en/customization/personas.md +19 -21
- package/dist/docs/en/customization/plugins.md +180 -156
- package/dist/docs/en/customization/prompt-fields.md +10 -6
- package/dist/docs/en/customization/skills.md +11 -13
- package/dist/docs/en/customization/skins.md +23 -27
- package/dist/docs/en/customization/themes.md +15 -15
- package/dist/docs/en/features/agents.md +85 -0
- package/dist/docs/en/features/daily.md +37 -7
- package/dist/docs/en/features/ecosystem.md +3 -1
- package/dist/docs/en/features/extend.md +7 -1
- package/dist/docs/en/features/freedom.md +4 -0
- package/dist/docs/en/features/index.md +6 -5
- package/dist/docs/en/features/long-work.md +23 -5
- package/dist/docs/en/features/look.md +1 -1
- package/dist/docs/en/features/people.md +10 -2
- package/dist/docs/en/features/spaces.md +16 -4
- package/dist/docs/en/features/workbench.md +11 -3
- package/dist/docs/en/getting-started/desktop-app.md +44 -29
- package/dist/docs/en/getting-started/first-launch.md +32 -21
- package/dist/docs/en/getting-started/installation.md +27 -12
- package/dist/docs/en/getting-started/use-cases.md +35 -35
- package/dist/docs/en/guides/goals.md +9 -7
- package/dist/docs/en/guides/interaction.md +26 -26
- package/dist/docs/en/guides/interface.md +18 -14
- package/dist/docs/en/guides/memory.md +43 -14
- package/dist/docs/en/guides/sessions.md +32 -26
- package/dist/docs/en/guides/settings.md +60 -29
- package/dist/docs/en/index.md +8 -2
- package/dist/docs/en/reference/command.md +8 -4
- package/dist/docs/en/reference/keyboard.md +18 -4
- package/dist/docs/en/reference/model-vocabulary.md +6 -8
- package/dist/docs/en/reference/slash-commands.md +4 -4
- package/dist/docs/en/reference/tools.md +92 -15
- package/dist/docs/en/release-notes/changelog.md +1 -9
- package/dist/docs/en/server/acp.md +1 -1
- package/dist/docs/en/server/ide.md +1 -1
- package/dist/docs/en/server/local-server.md +5 -5
- package/dist/docs/en/server/mcp.md +2 -2
- package/dist/docs/en/server/rest-api.md +79 -5
- package/dist/docs/en/server/sdk.md +2 -2
- package/dist/docs/zh/configuration/config-files.md +56 -15
- package/dist/docs/zh/configuration/data-locations.md +12 -4
- package/dist/docs/zh/configuration/env-vars.md +4 -6
- package/dist/docs/zh/configuration/overrides.md +13 -14
- package/dist/docs/zh/configuration/providers.md +7 -5
- package/dist/docs/zh/customization/agent-profiles.md +31 -36
- package/dist/docs/zh/customization/agents.md +120 -98
- package/dist/docs/zh/customization/hooks.md +35 -42
- package/dist/docs/zh/customization/personas.md +16 -18
- package/dist/docs/zh/customization/plugins.md +167 -142
- package/dist/docs/zh/customization/prompt-fields.md +9 -5
- package/dist/docs/zh/customization/skills.md +10 -12
- package/dist/docs/zh/customization/skins.md +19 -23
- package/dist/docs/zh/customization/themes.md +12 -12
- package/dist/docs/zh/features/agents.md +85 -0
- package/dist/docs/zh/features/daily.md +37 -7
- package/dist/docs/zh/features/ecosystem.md +3 -1
- package/dist/docs/zh/features/extend.md +7 -1
- package/dist/docs/zh/features/freedom.md +4 -0
- package/dist/docs/zh/features/index.md +6 -5
- package/dist/docs/zh/features/long-work.md +22 -4
- package/dist/docs/zh/features/look.md +1 -1
- package/dist/docs/zh/features/people.md +10 -2
- package/dist/docs/zh/features/spaces.md +15 -3
- package/dist/docs/zh/features/workbench.md +11 -3
- package/dist/docs/zh/getting-started/desktop-app.md +43 -28
- package/dist/docs/zh/getting-started/first-launch.md +32 -21
- package/dist/docs/zh/getting-started/installation.md +26 -11
- package/dist/docs/zh/getting-started/use-cases.md +35 -37
- package/dist/docs/zh/guides/goals.md +8 -8
- package/dist/docs/zh/guides/interaction.md +25 -25
- package/dist/docs/zh/guides/interface.md +18 -14
- package/dist/docs/zh/guides/memory.md +43 -14
- package/dist/docs/zh/guides/sessions.md +30 -24
- package/dist/docs/zh/guides/settings.md +54 -23
- package/dist/docs/zh/index.md +7 -1
- package/dist/docs/zh/reference/command.md +7 -3
- package/dist/docs/zh/reference/keyboard.md +18 -4
- package/dist/docs/zh/reference/model-vocabulary.md +6 -8
- package/dist/docs/zh/reference/slash-commands.md +3 -3
- package/dist/docs/zh/reference/tools.md +74 -9
- package/dist/docs/zh/release-notes/changelog.md +1 -9
- package/dist/docs/zh/server/acp.md +1 -1
- package/dist/docs/zh/server/ide.md +1 -1
- package/dist/docs/zh/server/local-server.md +5 -5
- package/dist/docs/zh/server/mcp.md +2 -2
- package/dist/docs/zh/server/rest-api.md +69 -1
- package/dist/docs/zh/server/sdk.md +2 -2
- package/dist/main.mjs +12545 -3456
- package/dist/web/assets/AppErrorBoundary-RFIAb-Uf.js +1 -0
- package/dist/web/assets/NavScopeBoundary-DY_ET7A-.js +1 -0
- package/dist/web/assets/{arc-y2SkSoyr.js → arc-CMgTB1m7.js} +1 -1
- package/dist/web/assets/{architectureDiagram-3BPJPVTR-uCwLz53m.js → architectureDiagram-3BPJPVTR-BU79ou2C.js} +1 -1
- package/dist/web/assets/{blockDiagram-GPEHLZMM-BZyWv36G.js → blockDiagram-GPEHLZMM-Bkuldod2.js} +1 -1
- package/dist/web/assets/{c4Diagram-AAUBKEIU-DKGx9i50.js → c4Diagram-AAUBKEIU-C3WMeqyu.js} +1 -1
- package/dist/web/assets/channel-DpDZUJRn.js +1 -0
- package/dist/web/assets/{chunk-2J33WTMH-CSkrhrsp.js → chunk-2J33WTMH-CesyWmwo.js} +1 -1
- package/dist/web/assets/{chunk-4BX2VUAB-CtxMoJ68.js → chunk-4BX2VUAB-C7rghYTf.js} +1 -1
- package/dist/web/assets/{chunk-55IACEB6-Dos3ftEy.js → chunk-55IACEB6-BqRHhwtz.js} +1 -1
- package/dist/web/assets/{chunk-727SXJPM-wbzEYK9z.js → chunk-727SXJPM-BhSqCRBc.js} +1 -1
- package/dist/web/assets/{chunk-AQP2D5EJ-B9GKvCD6.js → chunk-AQP2D5EJ-DdYE2ZVZ.js} +1 -1
- package/dist/web/assets/{chunk-FMBD7UC4-u5Y2P6IX.js → chunk-FMBD7UC4-BCRPUxDF.js} +1 -1
- package/dist/web/assets/{chunk-ND2GUHAM-B8rFKkTV.js → chunk-ND2GUHAM-CuvyDjTR.js} +1 -1
- package/dist/web/assets/{chunk-QZHKN3VN-EQsKtuD-.js → chunk-QZHKN3VN-BU5vAS78.js} +1 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-Bju1GfNu.js +1 -0
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-Bju1GfNu.js +1 -0
- package/dist/web/assets/client-C0oH7-8r.js +2 -0
- package/dist/web/assets/connection-BhO2nh7P.js +1 -0
- package/dist/web/assets/{cose-bilkent-S5V4N54A-D6dr5mIW.js → cose-bilkent-S5V4N54A-CXrvsA1a.js} +1 -1
- package/dist/web/assets/{dagre-BM42HDAG-Dnyhc4Hn.js → dagre-BM42HDAG-TaAea3Rt.js} +1 -1
- package/dist/web/assets/{diagram-2AECGRRQ-CYXkWdne.js → diagram-2AECGRRQ-CdEH4jGt.js} +1 -1
- package/dist/web/assets/{diagram-5GNKFQAL-DPwBf5Ag.js → diagram-5GNKFQAL-A0jZ_p-T.js} +1 -1
- package/dist/web/assets/{diagram-KO2AKTUF-DNeLYZ8X.js → diagram-KO2AKTUF-miHWORz3.js} +1 -1
- package/dist/web/assets/{diagram-LMA3HP47-zU8RsQTX.js → diagram-LMA3HP47-BlUIwEIg.js} +1 -1
- package/dist/web/assets/{diagram-OG6HWLK6-Cf9Mm94H.js → diagram-OG6HWLK6-DwDzMhEg.js} +1 -1
- package/dist/web/assets/{erDiagram-TEJ5UH35-Ch4CeiUI.js → erDiagram-TEJ5UH35-BJr5w62i.js} +1 -1
- package/dist/web/assets/export-BlxaZKEe.js +2 -0
- package/dist/web/assets/{flowDiagram-I6XJVG4X-Csn6WqEH.js → flowDiagram-I6XJVG4X-BP7KSFjx.js} +1 -1
- package/dist/web/assets/{ganttDiagram-6RSMTGT7-DsuBgEyu.js → ganttDiagram-6RSMTGT7-BstLBBof.js} +1 -1
- package/dist/web/assets/{gitGraphDiagram-PVQCEYII-CPA7jCxU.js → gitGraphDiagram-PVQCEYII-C57s7nZ-.js} +1 -1
- package/dist/web/assets/highlighted-body-OFNGDK62-BVb-7KsA.js +1 -0
- package/dist/web/assets/index-69qhvTvD.js +1 -0
- package/dist/web/assets/{index-BYUHmd8w.js → index-BDNM6yJI.js} +2 -2
- package/dist/web/assets/{index-BGgZxlEQ.js → index-BJF_gEDs.js} +2 -2
- package/dist/web/assets/index-BOwMP6BP.js +1 -0
- package/dist/web/assets/{index-C69a5Mcz.js → index-BZsyXCqm.js} +1 -1
- package/dist/web/assets/{index-C7EA7a_g.js → index-Bfl4JiNq.js} +2 -2
- package/dist/web/assets/index-BlD3AKX-.js +1 -0
- package/dist/web/assets/{index-CIymCfcP.js → index-BnvW0EvQ.js} +1 -1
- package/dist/web/assets/index-C4rmWyOm.js +1 -0
- package/dist/web/assets/index-CGLcb3HY.js +1 -0
- package/dist/web/assets/{index-kWBxPqIX.js → index-CPvOeQPX.js} +1 -1
- package/dist/web/assets/index-Cjbe0JKM.js +1 -0
- package/dist/web/assets/index-CmYoJWUm.js +1 -0
- package/dist/web/assets/index-CtUFrjKe.js +1 -0
- package/dist/web/assets/index-DDvDRMTK.js +1 -0
- package/dist/web/assets/index-DSpndwAR.css +1 -0
- package/dist/web/assets/index-D_JjTHxi.js +1 -0
- package/dist/web/assets/index-DbuwcnbT.js +1 -0
- package/dist/web/assets/index-DcXyS0nN.js +1 -0
- package/dist/web/assets/index-Dcl9ruKA.js +1 -0
- package/dist/web/assets/index-DgwALPNA.js +121 -0
- package/dist/web/assets/{index-DoN1FTEe.js → index-DkE8hRT1.js} +2 -2
- package/dist/web/assets/index-DsyRBZ4h.js +1 -0
- package/dist/web/assets/{index-29zav3JI.js → index-DuudNhLL.js} +4 -4
- package/dist/web/assets/index-Gc4F0b2f.js +1 -0
- package/dist/web/assets/index-HGqqwKoV.js +13 -0
- package/dist/web/assets/index-KchrJnno.js +3 -0
- package/dist/web/assets/{index-B0KNSyji.js → index-Tmi2BPYU.js} +1 -1
- package/dist/web/assets/index-Ya4GuDs0.js +1 -0
- package/dist/web/assets/index-_aDaKqLB.js +1 -0
- package/dist/web/assets/index-_qwOAotB.js +1 -0
- package/dist/web/assets/index-hnIkczza.js +7 -0
- package/dist/web/assets/{infoDiagram-5YYISTIA-D3Q__m62.js → infoDiagram-5YYISTIA-CifuVY6C.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-CcvCBuZ5.js → ishikawaDiagram-YF4QCWOH-Cd60vQUi.js} +1 -1
- package/dist/web/assets/{journeyDiagram-JHISSGLW-COZU4LNt.js → journeyDiagram-JHISSGLW-Cb3Xl_wl.js} +1 -1
- package/dist/web/assets/{kanban-definition-UN3LZRKU-BrXjBoAU.js → kanban-definition-UN3LZRKU-Ei6ThuZt.js} +1 -1
- package/dist/web/assets/{linear-BgP1STFi.js → linear-CDZJx-o2.js} +1 -1
- package/dist/web/assets/mermaid-GHXKKRXX-DFxyxD7G.js +331 -0
- package/dist/web/assets/{mindmap-definition-RKZ34NQL-CgjSrE5r.js → mindmap-definition-RKZ34NQL-B0ygxzkx.js} +1 -1
- package/dist/web/assets/navViewState-Ck_HK-TK.js +1 -0
- package/dist/web/assets/{pieDiagram-4H26LBE5-DTfe1sKA.js → pieDiagram-4H26LBE5-B2FdrvDv.js} +1 -1
- package/dist/web/assets/{quadrantDiagram-W4KKPZXB-D95hfh0q.js → quadrantDiagram-W4KKPZXB-CwpOTy3d.js} +1 -1
- package/dist/web/assets/{requirementDiagram-4Y6WPE33-DtSLi7Mh.js → requirementDiagram-4Y6WPE33-ExdZNzLQ.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-5OEKKPKP-gi_dJpcU.js → sankeyDiagram-5OEKKPKP-u0EZKD7D.js} +1 -1
- package/dist/web/assets/{sequenceDiagram-3UESZ5HK-DKQ9a72t.js → sequenceDiagram-3UESZ5HK-BXHMy5DY.js} +1 -1
- package/dist/web/assets/{spaces-B2Ccyh_T.js → spaces-C8n7xQPx.js} +1 -1
- package/dist/web/assets/{stateDiagram-AJRCARHV-Bz7tmSqa.js → stateDiagram-AJRCARHV-DMXx7ell.js} +1 -1
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-Bydq1_By.js +1 -0
- package/dist/web/assets/theme-BBnHttAf.js +1 -0
- package/dist/web/assets/{timeline-definition-PNZ67QCA-BfMXPwhV.js → timeline-definition-PNZ67QCA-DtqVG_4u.js} +1 -1
- package/dist/web/assets/{vennDiagram-CIIHVFJN-WLxW2KT5.js → vennDiagram-CIIHVFJN-Dom0ex8r.js} +1 -1
- package/dist/web/assets/{wardley-L42UT6IY-DiiqwIdq.js → wardley-L42UT6IY-C-RstmuQ.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-YWT4CUSO-DmCukWuw.js → wardleyDiagram-YWT4CUSO-C8CzNfdf.js} +1 -1
- package/dist/web/assets/{xychartDiagram-2RQKCTM6-Cfq1W2tT.js → xychartDiagram-2RQKCTM6-1AxVTyB6.js} +1 -1
- package/dist/web/index.html +2 -2
- package/native/auth-native/prebuilds/linux-arm64/auth-native.node +0 -0
- package/native/auth-native/prebuilds/linux-x64/auth-native.node +0 -0
- package/native/auth-native/prebuilds/win32-arm64/auth-native.node +0 -0
- package/native/auth-native/prebuilds/win32-x64/auth-native.node +0 -0
- package/package.json +1 -1
- package/dist/web/assets/AppErrorBoundary-DWpgwxFV.js +0 -1
- package/dist/web/assets/NavScopeBoundary-D8Lf1G0U.js +0 -1
- package/dist/web/assets/channel-BGdXootG.js +0 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-CPcnLy_H.js +0 -1
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-CPcnLy_H.js +0 -1
- package/dist/web/assets/client-DSIbyfoz.js +0 -2
- package/dist/web/assets/connection-DYZn9oPZ.js +0 -1
- package/dist/web/assets/export-Bq8ZECqX.js +0 -2
- package/dist/web/assets/highlighted-body-OFNGDK62-CDPBxM_E.js +0 -1
- package/dist/web/assets/index-AksnytJj.js +0 -1
- package/dist/web/assets/index-B8xhhYDh.css +0 -1
- package/dist/web/assets/index-BUrlrKap.js +0 -1
- package/dist/web/assets/index-B_5-HLed.js +0 -62
- package/dist/web/assets/index-BfmoxdpP.js +0 -1
- package/dist/web/assets/index-Bo3e-ohM.js +0 -3
- package/dist/web/assets/index-BrYV9gV_.js +0 -1
- package/dist/web/assets/index-C8XUtAvK.js +0 -1
- package/dist/web/assets/index-C9uil5my.js +0 -13
- package/dist/web/assets/index-CKpWHSp9.js +0 -1
- package/dist/web/assets/index-CLKBgQxV.js +0 -1
- package/dist/web/assets/index-CTyyUNWj.js +0 -7
- package/dist/web/assets/index-D7cg9qYZ.js +0 -1
- package/dist/web/assets/index-D7dg8R_q.js +0 -1
- package/dist/web/assets/index-DCSpedV_.js +0 -1
- package/dist/web/assets/index-DLbD0Nx5.js +0 -1
- package/dist/web/assets/index-DaEzbvvu.js +0 -1
- package/dist/web/assets/index-DhbcjMZF.js +0 -1
- package/dist/web/assets/index-Dw2h88mF.js +0 -1
- package/dist/web/assets/index-FcMtfmKv.js +0 -1
- package/dist/web/assets/index-XFq9Kgg0.js +0 -1
- package/dist/web/assets/index-iI2mM43w.js +0 -1
- package/dist/web/assets/index-oXOF7lko.js +0 -1
- package/dist/web/assets/locale-CANfezJ4.js +0 -17
- package/dist/web/assets/mermaid-GHXKKRXX-_JLagMll.js +0 -321
- package/dist/web/assets/navViewState-DS5LnMYc.js +0 -1
- package/dist/web/assets/settings-CcwMWXbp.js +0 -42
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-D6-wdUbw.js +0 -1
- package/dist/web/assets/theme-DlDhDxeD.js +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Agents and Sub-Agents
|
|
2
2
|
|
|
3
|
-
Every session
|
|
3
|
+
Every session is driven by a **main agent**, which follows your intent, plans steps, calls tools, and dispatches **sub-agents** for focused sub-tasks — exploring an unfamiliar codebase, reviewing several implementations in parallel, or planning a large refactor without filling the main context.
|
|
4
4
|
|
|
5
|
-
A sub-agent receives a task description
|
|
5
|
+
A sub-agent receives a task description, works in its own context, and returns its conclusions. It does not talk to you directly, and its intermediate reasoning and tool records stay out of the main agent's history.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
For what a profile is and where its file lives, start with [Agent profiles: concepts and design](./agent-profiles.md). This page is the field and behavior reference.
|
|
8
8
|
|
|
9
9
|
## Built-in Sub-Agents
|
|
10
10
|
|
|
@@ -13,96 +13,122 @@ Fresh installations include the main `agent` profile and two subagent profiles:
|
|
|
13
13
|
- **`general`**: The default subagent — a general-purpose assistant that can read and write files, execute commands, and search code, without dispatching more children.
|
|
14
14
|
- **`explore`**: Dedicated to read-only codebase exploration, searching, and summarizing.
|
|
15
15
|
|
|
16
|
-
Two more
|
|
16
|
+
Two more roles are available to create on request rather than preinstalled: `implementer` owns an engineering task through verification and handoff, and `reviewer` independently checks a decision or finished work as a read-only leaf. Ask for one in conversation (the GUI's first-run `/kiki-ops` conversation offers both) and the `kiki-profile` skill writes the role to `$KIKI_HOME/agents/<role>.md` (default `~/.kiki/agents/`), leaving an existing file alone. Both templates set `model_alias: inherit`, so the role follows whatever model the parent agent is using, and leave `thinking_effort` unset — you can pin either role to a model later in Settings.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
[`skip_builtin_profile_installation`](../configuration/config-files.md#top-level-fields) skips installing the named built-in templates under `agents/builtin/`, leaving copies that are already there. To hide installed profiles from discovery and dispatch, use `disabled_named_profiles` — the main `agent` binding stays available either way.
|
|
19
19
|
|
|
20
|
-
## How to
|
|
20
|
+
## How to invoke
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
The main agent dispatches sub-agents on its own as the work calls for it, and you can also ask for a specific one: "Use explore to map out the relevant files before making any changes."
|
|
23
23
|
|
|
24
|
-
Each dispatch
|
|
25
|
-
|
|
26
|
-
Sub-agents support running in the background: results are automatically returned to the main Agent upon completion, with no manual polling needed. You can also call back an existing sub-agent instance to continue the same task.
|
|
24
|
+
Each dispatch appears as an approval request unless it matches an allow rule or YOLO mode is active, so you can read the task description before it runs. A sub-agent can run in the background and returns its result to the main agent on completion; you can also resume an existing sub-agent to continue the same task.
|
|
27
25
|
|
|
28
26
|
## Named child agents
|
|
29
27
|
|
|
30
|
-
The
|
|
28
|
+
The main `agent` profile gets three child-agent tools with no experiment flag: `AgentRun`, `AgentList` and `AgentSend`. Built-in subagent profiles do not. Each caller sees only the children it created itself — a grandchild or another caller's child is not a valid target.
|
|
31
29
|
|
|
32
|
-
`AgentRun` launches a new child or continues an existing one. Every call
|
|
30
|
+
`AgentRun` launches a new child or continues an existing one. Every call needs `prompt` and a short 3–5 word `description` for the UI. A new launch can also set:
|
|
33
31
|
|
|
34
|
-
|
|
32
|
+
| Parameter | Notes |
|
|
33
|
+
| --- | --- |
|
|
34
|
+
| `profile` | Which subagent role to run. Omitted, an explicitly configured `[subagent].default_profile` applies; with no such key the built-in general-purpose subagent is used. An explicit blank value requires a target. |
|
|
35
|
+
| `profile_file` | A subagent role Markdown file, absolute or workspace-relative. It is a role definition rather than a shared prompt template, and cannot be combined with `profile`, `route` or `resume`. |
|
|
36
|
+
| `route` | A named route of the base profile. |
|
|
37
|
+
| `name` | A handle for addressing this child again: `^[a-z0-9_]+$`, not `root`, unique within the session. |
|
|
38
|
+
| `background` | Omitted, main runs it in the background and a subagent waits in the foreground. `true` and `false` force background and synchronous waiting respectively. |
|
|
39
|
+
| `model_alias`, `effort` | Omitted, the saved or default values are kept. |
|
|
35
40
|
|
|
36
|
-
|
|
41
|
+
To continue a direct child, set `resume` to its name or agent id; it rejects `name`, `profile`, `profile_file` and `route`. `allow_model_change` only matters on `resume` with an explicit `model_alias` that resolves to a different canonical model.
|
|
37
42
|
|
|
38
|
-
|
|
43
|
+
A new launch picks its model from the concrete `model_alias` parameter, then the effective profile, route or caller-lease pin, then an explicitly configured `[subagent].default_model`. With none of those it fails with `model.not_configured` and no child is created, and an unknown alias is an error. Effort resolves separately, from the tool call, the route, the caller lease, the profile, or the model itself — [the full order is below](#named-profile-routes-experimental). Omitted `model_alias` and `effort` on `resume` keep the saved binding; an alias resolving to the same canonical model is a no-op, and a different one needs `allow_model_change: true`.
|
|
39
44
|
|
|
40
|
-
`
|
|
45
|
+
`preferred_models`, `discouraged_models`, `preferred_efforts` and route or caller-lease pins are soft: a hard-permitted override runs with a structured advisory. `allowed_models`, `deny_models` and `allowed_efforts` are hard in every scope. Machine `[subagent].deny_models`, unsupported model capabilities, route identity, a missing model-change confirmation and executor or thread restrictions are hard errors, and an external executor that cannot change a resumed thread binding returns an error rather than recreating the thread or executor.
|
|
41
46
|
|
|
42
|
-
|
|
47
|
+
Agent tasks time out after 2 hours by default; set the global limit with `[subagent] timeout_ms` or `KIKI_SUBAGENT_TIMEOUT_MS` (`0` disables it). Print mode has no timeout, and there is no per-call timeout or provider-parameter passthrough.
|
|
43
48
|
|
|
44
|
-
`
|
|
49
|
+
Background launch needs `TaskList`, `TaskOutput` and `TaskStop`. With those disabled, an omitted `background` from the main agent is rejected before launch rather than turned into a foreground wait — enable the tools, or pass `background: false` for a genuine same-turn dependency. While main waits in the foreground, steer or **Send now** moves the child to the background without cancelling it, so the next safe step can read the new input and the completion still notifies the parent. Ordinary queued messages do not release that wait. A child is not cancelled just because the main turn stops; use `TaskStop` to cancel one explicitly. See the [`AgentRun` reference](../reference/tools.md#collaboration-tools).
|
|
45
50
|
|
|
46
|
-
|
|
51
|
+
For `AgentRun` model choices, a profile's menu is a candidate list rather than a closed set while `restrict_models_to_menu` is off (the default). When it is on, only the profile author's default `model_alias` and `model_profiles` entries are selectable, and an out-of-menu pick is rejected rather than replaced. See [Model menus and hard boundaries](./agent-profiles.md#model-menus-and-hard-boundaries).
|
|
47
52
|
|
|
48
|
-
|
|
53
|
+
`profile_file` supplies a role definition directly, bypassing preset registration and preset allow/deny matching. `allowed_subagents: []` still permits this path, while `can_spawn_subagents: false` blocks all new children. Absolute or workspace-relative paths work, and the real path after resolving links must stay inside an allowed directory.
|
|
49
54
|
|
|
50
|
-
|
|
55
|
+
`AgentList` returns direct children. By default it lists running children and children with no tracking task; pass `include_finished: true` to also get children whose latest background task has already finished or failed. At most 50 entries come back, running ones first.
|
|
51
56
|
|
|
52
|
-
|
|
57
|
+
`AgentSend` queues a mailbox message: a running child has it steered into its active turn at the next step boundary, and an idle, resumable child starts a new run with it, whose completion notifies the parent like any other agent task. Address the child by `name` or agent id.
|
|
53
58
|
|
|
54
|
-
|
|
59
|
+
`AgentNotify` goes the other way and is available only to subagents: it queues a fire-and-forget message in the parent agent's mailbox, read at the parent's next step boundary or next run. The main agent has no parent and never receives it. `[agents] notify_parent = false` in `config.toml` turns it off globally; it is on by default.
|
|
55
60
|
|
|
56
|
-
##
|
|
61
|
+
## Peer-thread communication
|
|
57
62
|
|
|
58
|
-
|
|
63
|
+
Peer-thread communication lets a main agent coordinate other Kiki sessions on the same local host, including sessions in other workspaces. It is separate from the child-agent tools above and is off by default. Once enabled, a session's main agent gets `ThreadList`, `ThreadRead`, `ThreadSend` and `ThreadWait`. Subagents do not get them by default; a subagent profile can name `ThreadList`, `ThreadRead` and `ThreadWait` in its `tools` list, while `ThreadSend` stays main-only because it sends under the parent session's peer identity. To create an independent session instead, main agents can use [`ThreadCreate`](../reference/tools.md#collaboration-tools) without enabling anything.
|
|
59
64
|
|
|
60
|
-
|
|
65
|
+
A thread reference identifies a host, workspace and session. `ThreadList` returns the references later calls need, `ThreadRead` reads completed main-agent turns without resuming a cold session, `ThreadSend` derives the source from the current main-agent session, and `ThreadWait` waits up to 60 seconds for activity from up to eight threads. Messages cannot cross hosts.
|
|
61
66
|
|
|
62
|
-
|
|
63
|
-
- **Multiple sub-agents can run in parallel** without interfering with each other.
|
|
67
|
+
A message is recorded as coming from a peer only when the source thread's own main agent calls `ThreadSend`. REST and the `global.threads` Klient facade take target-addressed input only and record it as user-origin, so an external client cannot claim a source thread.
|
|
64
68
|
|
|
65
|
-
|
|
69
|
+
Set `[thread_communication] enabled = true` in `config.toml` to opt in globally. Sending can resume a cold target session and consume model quota. A workspace can persist an enable or disable override, but it cannot turn the feature on while the global switch is off. See [Server API](../server/rest-api.md#session-leases-and-peer-threads) for those interfaces.
|
|
66
70
|
|
|
67
|
-
##
|
|
71
|
+
## Context Isolation and Resource Cost
|
|
72
|
+
|
|
73
|
+
A sub-agent sees only the task description it was given, never the main agent's conversation, and only its final result comes back. Two things follow from that: the main context stays readable during a long session, and several sub-agents can run in parallel without interfering.
|
|
74
|
+
|
|
75
|
+
Each sub-agent spends its own tokens, so a small task is cheaper to do in the main agent.
|
|
68
76
|
|
|
69
|
-
|
|
77
|
+
## Permission inheritance
|
|
70
78
|
|
|
71
|
-
|
|
79
|
+
Sub-agents inherit the main agent's permission decisions: an "always allow" rule you accepted through `/permission` or an approval dialog applies to everything that agent dispatches, so the same tool call is not re-approved each time. `AgentRun` itself is allowed by default, so the main agent can delegate repeatedly without interrupting you.
|
|
72
80
|
|
|
73
|
-
|
|
81
|
+
To keep a tool permanently out of sub-agents, tighten the matching permission rule on the main agent.
|
|
74
82
|
|
|
75
|
-
|
|
83
|
+
## Custom agents
|
|
84
|
+
|
|
85
|
+
Your own agents are Markdown files. The frontmatter declares the name, description and tool access; the body is the system prompt. Kiki discovers them next to the built-ins, and they can be dispatched as sub-agents or selected as the main agent at startup.
|
|
76
86
|
|
|
77
87
|
### Capability visibility
|
|
78
88
|
|
|
79
|
-
The GUI's main-agent selector
|
|
89
|
+
The GUI's main-agent selector lists the profiles effective for the current workspace or working directory. Main profiles carry `main: true`; a file that overrides a built-in inherits that value when it omits it, and an explicit `main: false` is kept. `SYSTEM.md` therefore stays a main-agent profile with no extra frontmatter, and hiding the default profile from subagent discovery does not remove its main binding or its file overrides. See [Agent file format](#agent-file-format) for the fields.
|
|
80
90
|
|
|
81
|
-
In **Settings → Agents**,
|
|
91
|
+
In **Settings → Agents**, pick a workspace to inspect its default main profile, the source in effect, and the subagent capabilities. File-backed profiles can be edited where they are shown; editing a legacy `SYSTEM.md` adds frontmatter and keeps the prompt body. A selected profile that later becomes unavailable stays visible with a diagnostic, so you can pick another.
|
|
82
92
|
|
|
83
93
|
### Profile reloads and live sessions
|
|
84
94
|
|
|
85
|
-
Agent files are watched and reloaded on change
|
|
95
|
+
Agent files are watched and reloaded on change, and a reload never breaks a live session: an agent already running or resumed keeps the prompt and constraint snapshot it was bound with, even if its profile is edited, made `private`, deleted or made invalid. Your edit therefore applies to **new** dispatches only, and dispatching to a private or deleted profile fails with an explicit error. A frozen dispatch list skips an invalid target instead of failing the whole turn. Restoring an old record whose profile is gone falls back to the default profile with a warning, after checking its model, effort and executor.
|
|
96
|
+
|
|
97
|
+
### Choosing the engine and its profile
|
|
98
|
+
|
|
99
|
+
The control at the left of the composer's status line answers one question — what runs this session — in one panel. Kiki itself is the first entry; each external engine follows, and under each engine sit that engine's own main profiles. The first row of every engine is that harness **as it is**: no Kiki profile, no Kiki prompt, no injected tools, and the harness's own model, effort and approval mode. Picking a profile under an engine takes both at once, so the two halves can never disagree.
|
|
100
|
+
|
|
101
|
+
The model control beside it stays separate on purpose. A model is a choice *within* the engine you picked, not a third axis of the same question, and on a bare engine it belongs to the harness: Kiki reports what the session resolved without offering to change it.
|
|
102
|
+
|
|
103
|
+
A new session applies its pick immediately. In a session that has already spoken, the change takes effect from your next message, and picking a different engine asks once first. The confirmation answers the two things you are actually unsure about: the new engine starts a context of its own — Kiki does not hand it the old conversation and does not resume the old engine's session — while the conversation itself stays in Kiki, complete and readable. A turn that is already running finishes on the current engine, and the chip marks the pick as pending until the next message carries it.
|
|
104
|
+
|
|
105
|
+
**What Kiki adds when an engine runs** in **Settings → AI → External engines** sets the defaults for that engine across every session that does not override them: which Kiki tool groups and hooks the harness can reach, whether it can dispatch Kiki subagents, and how the profile prompt is delivered. Leaving everything there off is the same as choosing the bare row in the composer, so a harness you already trust runs exactly as its own CLI would.
|
|
106
|
+
|
|
107
|
+
### Direct external execution
|
|
108
|
+
|
|
109
|
+
A harness chooses the execution program; a profile is optional customization, and a model is a choice within that harness. With the main-agent [REST execution selection](../server/rest-api.md#sessions), omit `profile` to run the external program directly. Without session overrides or [harness defaults](../configuration/config-files.md#external-harness-defaults), Kiki sends no profile prompt, cognition, shared fields, memory, hooks or MCP tools and does not set model, effort, approval mode or Codex sandbox policy. Native execution without a profile keeps its existing Kiki defaults.
|
|
110
|
+
|
|
111
|
+
Direct execution preserves the configured launch environment, home and working directory, but the program must resolve to the same executable and settings sources as the CLI you expect. An ACP adapter may launch an SDK-provided binary or a configured override instead of the CLI on PATH; omitting a profile does not make those programs identical. An unknown login observation alone does not prevent launch.
|
|
86
112
|
|
|
87
113
|
### External ACP profile delivery
|
|
88
114
|
|
|
89
|
-
For an outbound ACP (Agent Client Protocol) executor, Kiki sends the frozen profile as a system prompt only when that harness
|
|
115
|
+
For an outbound ACP (Agent Client Protocol) executor, Kiki sends the frozen profile as a system prompt only when that harness accepts the `session/new` extension `_meta.systemPromptOverride`. The built-in `grok-acp` executor enables this; other ACP executors get the profile in the first user-message preamble. Add `profile_delivery = "system_prompt_override"` to a custom harness's `[agent_executors.<id>]` entry in `config.toml` to opt it in — only for a harness that honours the extension, since Kiki then omits the preamble fallback.
|
|
90
116
|
|
|
91
|
-
The override applies when a **new remote session** is created, not on `session/resume` or `session/load
|
|
117
|
+
The override applies when a **new remote session** is created, not on `session/resume` or `session/load`, and an existing remote session keeps whichever mode it started with. Legacy profile-only dispatches include a bounded conversation handoff when a remote session must be recreated. The main-agent `execution` path does not send old Kiki history on a generation change or reconnect fallback. Because a system-prompt override can replace a harness's default system prompt, opt in only when that replacement suits the harness.
|
|
92
118
|
|
|
93
|
-
|
|
119
|
+
For legacy profile-only bindings, the built-in `kimi-acp` executor forwards configured MCP servers to Kimi Code; the `execution` path does not automatically forward workspace MCP. Kimi CLI versions from `0.37.0` up to, but not including, `0.39.0` reject ACP stdio MCP servers, so preflight warns that MCP tools will fail and recommends upgrading to `0.39.0` or newer. The warning does not block forwarding, and an undetectable version is forwarded without it.
|
|
94
120
|
|
|
95
121
|
### External main-agent delegation
|
|
96
122
|
|
|
97
|
-
An external executor can run as the main agent. To let it dispatch Kiki subagents, add `allow_kiki_subagents: true` to its profile and bind that profile to the main agent. The
|
|
123
|
+
An external executor can run as the main agent. To let it dispatch Kiki subagents, add `allow_kiki_subagents: true` to its profile and bind that profile to the main agent. The main-agent `execution` path can also set it in session overrides or [harness defaults](../configuration/config-files.md#external-harness-defaults); an omitted profile field inherits those defaults. Without an explicit value it is `false`, and it does not enable delegation from external child agents.
|
|
98
124
|
|
|
99
|
-
Kiki attaches its MCP tools (the bridge through which a harness calls Kiki) to the **existing session**, without creating a separate seat session. The harness must support local stdio MCP
|
|
125
|
+
Kiki attaches its MCP tools (the bridge through which a harness calls Kiki) to the **existing session**, without creating a separate seat session. The harness must support local stdio MCP and have `kiki` on its path. The profile's spawn switch, preset permissions and preferences, model constraints and parent-notification policy still apply. Rebind the main profile after changing the flag — an existing binding keeps its frozen snapshot — and the bridge is revoked by disabling delegation or closing the executor.
|
|
100
126
|
|
|
101
|
-
|
|
127
|
+
A child's completion is queued back to the same main agent without blocking the child: if the main agent is busy, delivery waits for its turn to settle; if it is idle, the receipt wakes it. Parent notifications use the same conversation and remain subject to `allow_parent_notify` and the configured notification policy.
|
|
102
128
|
|
|
103
129
|
Codex app-server MCP tool calls can require a separate vendor approval, mapped to Kiki's persistent approval interaction. Manual or auto mode (`on-request`) lets you answer it. In Full access (YOLO), Kiki pre-approves only its attached `kiki-harness` MCP server at the Codex layer; Kiki's own capability and execution policies still govern those calls. Other MCP servers keep their approval policy, and the workspace-write sandbox is not widened.
|
|
104
130
|
|
|
105
|
-
|
|
131
|
+
What works with an external harness depends on the capabilities it negotiated. ACP historical forks use `session/fork` when available; an exact assistant-message position additionally needs the AIR fork-point extension supported by the Claude, Codex and DeepSeek adapters, and a position it cannot express starts a new remote session with a bounded conversation handoff. Codex and DeepSeek ACP form questions use Kiki's persistent question interaction, and complex forms or URL-mode requests they cannot express are declined. Grok's plan approval uses the persistent plan-review interaction.
|
|
106
132
|
|
|
107
133
|
### Kiki context in external main agents
|
|
108
134
|
|
|
@@ -114,7 +140,7 @@ allow_kiki_subagents: true
|
|
|
114
140
|
kiki_context: [memory, board, cron, threads, history, hooks]
|
|
115
141
|
```
|
|
116
142
|
|
|
117
|
-
|
|
143
|
+
In legacy profile-only bindings, an absent list turns every group off. In the main-agent `execution` path, an omitted profile field inherits [harness defaults](../configuration/config-files.md#external-harness-defaults), and session overrides take priority; `[]` explicitly disables everything. Rebind the execution after editing it. Tools are registered once when the bridge starts, so a group you enable later is not added to a harness that is already running. The bound profile's tool policy and feature settings still apply. Only external main agents can acquire this bridge.
|
|
118
144
|
|
|
119
145
|
| Group | MCP tools |
|
|
120
146
|
| --- | --- |
|
|
@@ -125,26 +151,24 @@ The list defaults to absent (all context groups off); `[]` explicitly disables e
|
|
|
125
151
|
| `history` | `kiki_history_search`, `kiki_history_read` |
|
|
126
152
|
| `hooks` | Message-context injection; no extra model-callable tool |
|
|
127
153
|
|
|
128
|
-
|
|
154
|
+
These tools use native Kiki parameters and execution policies, including approval, persona visibility, workspace access, memory review and Plan mode restrictions. Calls are attributed to the existing main agent — not to a user write, and not to a new seat session. The bridge token cannot reach ordinary REST endpoints or select a different caller session, and the native read tools advertise MCP read-only annotations. Vendor approval stays a separate layer from Kiki approval, except for the Codex Full access pre-approval above.
|
|
129
155
|
|
|
130
|
-
`hooks` sends memory summaries and undelivered reminders
|
|
156
|
+
`hooks` sends memory summaries and undelivered reminders and working notes as messages, rather than by rewriting the system prompt or the tool schema. Identical content is deduplicated for the bridge's lifetime, and hook content is recorded in the Kiki transcript with a `hook_result` origin. Kiki writes only temporary process or session configuration and does not edit the harness's global hook settings.
|
|
131
157
|
|
|
132
158
|
| Harness | Injection |
|
|
133
159
|
| --- | --- |
|
|
134
160
|
| Claude ACP | Temporary command-hook settings through `session/new` metadata; `SessionStart` and `UserPromptSubmit` use `additionalContext`. |
|
|
135
161
|
| Codex app-server / ACP | Temporary `hooks.json` definitions become per-process/session configuration with trust pinned only to those commands; `SessionStart` and `UserPromptSubmit` use `additionalContext`. |
|
|
136
|
-
| Antigravity | Isolated `GEMINI_HOME` with `PreInvocation.injectSteps
|
|
137
|
-
| Grok ACP | Native session-local ACP `Stop` callbacks inject `additionalContext
|
|
162
|
+
| Antigravity | Isolated `GEMINI_HOME` with `PreInvocation.injectSteps`. |
|
|
163
|
+
| Grok ACP | Native session-local ACP `Stop` callbacks inject `additionalContext`. Session-start and prompt-submit hooks cannot inject context, so Kiki keeps its message preamble before tools. |
|
|
138
164
|
|
|
139
|
-
Claude and Codex `PreCompact` hooks prepare an auditable handoff snapshot
|
|
165
|
+
Claude and Codex `PreCompact` hooks prepare an auditable handoff snapshot rather than injecting it, and the state summaries are restored at Claude's compact `SessionStart` or Codex's next `UserPromptSubmit`.
|
|
140
166
|
|
|
141
167
|
### Rebuilding a session context
|
|
142
168
|
|
|
143
|
-
After editing prompt sources, open the profile selector in the session composer and choose **Rebuild context**.
|
|
169
|
+
After editing prompt sources, open the profile selector in the session composer and choose **Rebuild context**. Kiki reloads the current profile, prompt-field overrides, Agent Skills, `AGENTS.md` instructions and plugin prompt or session-start injections from disk, reconciles the other runtime context injections, and uses the rebuilt snapshot for later requests. Conversation messages are preserved. The action is unavailable while a turn is running.
|
|
144
170
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
The session panel reflects the current agent's tool directory, including [Plan mode's read-only research restriction](../reference/tools.md#plan-mode) and launch refusal reasons. It does not check external provider health. If a selected model, profile, or thinking effort becomes unavailable, choose a valid value before sending; a loading state or catalog error alone does not invalidate a saved choice.
|
|
171
|
+
**Dispatch capabilities** — next to the new-session workspace selector, or in a session's right rail — shows subagent profiles, routes, executors, and where the default model and thinking effort come from. Default-configuration validity and permission to launch are shown separately, and the panel reflects the current agent's tool directory, including [Plan mode's read-only research restriction](../reference/tools.md#plan-mode) and the reasons a launch would be refused. It does not check external provider health. If a model, profile or effort becomes unavailable, pick a valid value before sending; a loading state or catalog error alone does not invalidate a saved choice.
|
|
148
172
|
|
|
149
173
|
### Agent Locations
|
|
150
174
|
|
|
@@ -154,7 +178,7 @@ Kiki discovers agent files by scope; more specific scopes take higher priority:
|
|
|
154
178
|
- `$KIKI_HOME/agents/` (default: `~/.kiki/agents/`)
|
|
155
179
|
- `~/.agents/agents/`
|
|
156
180
|
|
|
157
|
-
The Kiki-specific user agent directory moves with `KIKI_HOME`, while the generic `~/.agents/agents/`
|
|
181
|
+
The Kiki-specific user agent directory moves with `KIKI_HOME`, while the generic `~/.agents/agents/` stays under the real OS home so other tools can share it.
|
|
158
182
|
|
|
159
183
|
**Project level** (project root = the nearest directory containing `.git`, searching upward from the working directory):
|
|
160
184
|
- `.kiki/agents/`
|
|
@@ -166,14 +190,14 @@ The Kiki-specific user agent directory moves with `KIKI_HOME`, while the generic
|
|
|
166
190
|
extra_agent_dirs = ["~/team-agents", ".agents/team-agents"]
|
|
167
191
|
```
|
|
168
192
|
|
|
169
|
-
Agent Markdown files under the user, project
|
|
193
|
+
Agent Markdown files under the user, project and `extra_agent_dirs` roots are watched, and after roughly 200 ms additions, edits and deletions reload automatically — a running session can dispatch a newly added role without `/reload` or a restart. `$KIKI_HOME/SYSTEM.md` is watched the same way. An `AgentRun` tool instance keeps a frozen snapshot of the role descriptions it displays, so that list can look stale while dispatch resolution already uses the reloaded profiles.
|
|
170
194
|
|
|
171
195
|
**Plugin level**: directories declared in an enabled plugin's manifest `agents` field (when omitted, the `agents/` directory under the plugin root is picked up automatically); see [Plugin Agents](./plugins.md#plugin-agents). Plugin definitions have lower priority than the user files, including installed built-in copies.
|
|
172
196
|
|
|
173
|
-
**Built-in copies** are installed under `$KIKI_HOME/agents/builtin/` and loaded in the user scope
|
|
197
|
+
**Built-in copies** are installed under `$KIKI_HOME/agents/builtin/` and loaded in the user scope after ordinary files in both user directories, so a same-name user definition always wins without `override: true`, whatever the filename order or install time. A duplicate-name diagnostic names both paths. A file loaded through `--agent-file` outranks every directory scope and applies to that launch only; `$KIKI_HOME/SYSTEM.md` separately overrides the default main agent's system prompt, as covered below.
|
|
174
198
|
|
|
175
199
|
::: warning Trust model
|
|
176
|
-
Agent files are prompt configuration, and project-level files come from the repository itself — including
|
|
200
|
+
Agent files are prompt configuration, and project-level files come from the repository itself — including one you have just cloned and do not trust yet. A project file named `agent.md` can replace the **default main agent's whole system prompt**, and `general.md` can replace the default subagent type, with no `override: true` needed. Unlike `AGENTS.md` content, which is scoped instructions subordinate to system policy and your current request, such a file *is* the system prompt. Review `.kiki/agents/` and `.agents/agents/` in an unfamiliar repository before running Kiki inside it.
|
|
177
201
|
:::
|
|
178
202
|
|
|
179
203
|
### Agent File Format
|
|
@@ -200,7 +224,7 @@ disallowedTools:
|
|
|
200
224
|
You are a strict code reviewer. Read the diff, then report findings grouped by severity…
|
|
201
225
|
```
|
|
202
226
|
|
|
203
|
-
|
|
227
|
+
Model-list rejection and advisories below describe **subagent bindings**. For a session's main agent your selection wins over profile rules: a hard violation only warns, and recommendations do not warn at all. A `main: true` profile dispatched through `AgentRun` still follows the subagent rules. See [Model menus and hard boundaries](./agent-profiles.md#model-menus-and-hard-boundaries).
|
|
204
228
|
|
|
205
229
|
| Field | Required | Description |
|
|
206
230
|
| --- | --- | --- |
|
|
@@ -241,13 +265,13 @@ The model-list rejection and advisory behavior below describes **subagent bindin
|
|
|
241
265
|
| `spawn_constraints` | no | Rules inherited by descendants: hard `allowed_models`, `deny_models`, `allowed_efforts`, and `disallowed_tools`; soft `preferred_models`, `discouraged_models`, and `preferred_efforts`. Allowsets intersect and denials accumulate along the tree; pins cannot widen hard rules |
|
|
242
266
|
| `private` | no | Hide this profile from dispatch and selection lists (`AgentRun`, Settings pickers). A private profile stays registered: agents already running or resumed on it keep working from their bound snapshot, while any **new** dispatch to it fails with an explicit "profile is private" error. Use it to retire a role without breaking live sessions |
|
|
243
267
|
|
|
244
|
-
Use `preferred_subagents: [explore]`
|
|
268
|
+
Use `preferred_subagents: [explore]` for a recommendation rather than a closed role list. Across a base profile, a route and a caller lease, allowed sets intersect, denials accumulate, `false` stays closed, and the nearest explicit preference list replaces the earlier one. A `"*"` can share an `allowed_subagents` list with names and source or lease mappings: it leaves this layer open while keeping those mappings. Repeated bare names are ignored, and two different mappings for one alias are an error.
|
|
245
269
|
|
|
246
|
-
`profile_file`
|
|
270
|
+
`profile_file` supplies a new role definition without registering it in the preset catalog, and the file's `name` does not make it a same-name preset — preset allow/deny lists and same-name caller leases do not apply to it, and the caller's preset list is not copied into its downstream rules. The file's own rules, inherited model and tool constraints and workspace path checks still apply. Use `can_spawn_subagents: false` for a complete leaf rather than `allowed_subagents: []`.
|
|
247
271
|
|
|
248
|
-
|
|
272
|
+
The old author fields `subagents` and `subagent_policy`, and the host settings `main_dispatch_policy` and `subagent_dispatch_policy`, have been removed. Move advice-only role names to `preferred_subagents`, real preset boundaries to `allowed_subagents` / `deny_subagents`, and a former leaf to `can_spawn_subagents: false`; source and lease mappings stay under `allowed_subagents`. Existing bindings are upgraded without changing their role, model, prompt or source snapshot, and a structured edit keeps the fields you did not mention — `null` removes a local declaration, `[]` writes an explicit empty list.
|
|
249
273
|
|
|
250
|
-
`model_profiles` is a YAML list of mappings
|
|
274
|
+
`model_profiles` is a YAML list of mappings, so every entry needs an `alias` — a bare string or mapping at the top level is invalid. Every other field is optional, and a matching entry's `auto_compact` overrides the profile's top-level value (both in integer tokens, never a percentage). Example:
|
|
251
275
|
|
|
252
276
|
```yaml
|
|
253
277
|
model_profiles:
|
|
@@ -266,11 +290,11 @@ model_profiles:
|
|
|
266
290
|
temperature: 0.2
|
|
267
291
|
```
|
|
268
292
|
|
|
269
|
-
|
|
293
|
+
`model_profiles` is matched by canonical model identity. Resolve the model alias configuration, including its `overrides`, first; then apply model alias → top-level profile → matching `model_profiles` entry. `request_params` merge by key and the last explicit `service_tier` wins. Treat `context_budget` and `max_completion_tokens` as caps: the smallest declared value across layers applies, within the model's capacity and output limit. Omitting a cap adds no restriction. Only top-level `thinking_effort` requires the selected model to match the profile's default `model_alias`; other profile parameters do not.
|
|
270
294
|
|
|
271
|
-
|
|
295
|
+
For per-model prompt text, `model_profiles.prompt_mode` and `prompt` extend the role body, while the model cognition overlay (`[models."<alias>".cognition]`) extends the model's system prompt.
|
|
272
296
|
|
|
273
|
-
For subagent bindings, `allowed_models`, `deny_models
|
|
297
|
+
For subagent bindings, `allowed_models`, `deny_models` and `allowed_efforts` are hard everywhere they appear: in the profile, `spawn_constraints`, a caller lease and matching `model_profiles` entries. Allowsets intersect and denials accumulate, and a violation returns `profile.constraint_violation` naming the rule source, the allowed and denied values, the effective value and where the binding value came from. An advisory, a pin, a manual model or effort change and `resume` cannot widen them. Machine `[subagent].deny_models` is one more hard boundary, route sidecars cannot declare model hard lists, and an external executor is rechecked against its effective model ID.
|
|
274
298
|
|
|
275
299
|
```yaml
|
|
276
300
|
model_alias: fast-model
|
|
@@ -282,9 +306,9 @@ preferred_efforts: [high]
|
|
|
282
306
|
discouraged_models: [review-model]
|
|
283
307
|
```
|
|
284
308
|
|
|
285
|
-
Here `review-model`
|
|
309
|
+
Here `review-model` stays executable with an advisory, and `heavy-model` is rejected. Lists never select a model — use a `model_alias` pin, a dispatch parameter or an explicit `[subagent].default_model`.
|
|
286
310
|
|
|
287
|
-
|
|
311
|
+
When the default and per-model recipes already form the complete permitted set, make that menu the contract instead of duplicating it as a hard list:
|
|
288
312
|
|
|
289
313
|
```yaml
|
|
290
314
|
model_alias: fast-model
|
|
@@ -296,21 +320,21 @@ model_profiles:
|
|
|
296
320
|
preferred_models: [fast-model]
|
|
297
321
|
```
|
|
298
322
|
|
|
299
|
-
This permits the
|
|
323
|
+
This permits the default `fast-model` and the menu entry `review-model`, and nothing else; other hard rules may narrow them further. Keep the switch off for a recommendation-only menu and use `preferred_*` / `discouraged_models` there. Use `allowed_models` / `deny_models` for a budget, compliance, deployment or descendant-tree boundary of their own. See [When to enable it](./agent-profiles.md#when-to-enable-it) for the three-scenario rule.
|
|
300
324
|
|
|
301
|
-
|
|
325
|
+
`allowed_models`, `deny_models` and `allowed_efforts` enforce their literal hard meaning everywhere; there is no legacy soft mode. If one of your lists was only advice, rename it to `preferred_models`, `discouraged_models` or `preferred_efforts` in every scope where it appears, and keep real boundaries as they are. A saved binding outside the hard rules is rejected on resume — pick a permitted value or revise the rule, then retry.
|
|
302
326
|
|
|
303
|
-
|
|
327
|
+
Tool names match exactly and case-sensitively; entries starting with `mcp__` match MCP tools as globs. Three shapes match nothing and produce a warning when the profile takes effect: a wildcard outside an `mcp__` pattern (a bare `*` in `disallowedTools` disables nothing), an `mcp__` literal that is not a full `mcp__<server>__<tool>` name (`mcp__github` matches nothing — use `mcp__github__*` for the whole server), and a name no registered or built-in tool has, usually a typo such as `read` for `Read`.
|
|
304
328
|
|
|
305
|
-
The body is the agent's system prompt,
|
|
329
|
+
The body is the agent's system prompt, rendered as a template each time the prompt is built: `${var}` placeholders substitute live context values, an unknown variable stays verbatim, a bare `$` is never special, and a variable with no value renders as an empty string. `${parent_prompt}` (alias `${base_prompt}`) embeds the implicit parent for this file: the effective default system prompt in an agent file, the built-in default inside `SYSTEM.md`, or the base profile in a route. `${builtin_prompt}` is always the built-in default, even when `SYSTEM.md` exists. If the file replaces the default prompt but should still honor instructions from enabled plugins, place `${plugin_sections}` where those belong. The full variable list is in the SYSTEM.md section below.
|
|
306
330
|
|
|
307
|
-
Frontmatter keys are closed:
|
|
331
|
+
Frontmatter keys are closed: an unrecognized field makes the file fail to load with a diagnostic naming the key, so remove or migrate it (Claude Code's `model` and OpenCode's `mode`, for instance). The comma-separated `tools` form is accepted and a missing `name` falls back to the file name, so a minimal file with just a `description` and a body loads.
|
|
308
332
|
|
|
309
333
|
### Named profile routes (experimental)
|
|
310
334
|
|
|
311
|
-
A named route specializes an existing
|
|
335
|
+
A named route specializes an existing agent without creating a new permission identity. Enable discovery at startup with `[experimental] agent-profile-routes = true` in `config.toml`, or set `KIKI_EXPERIMENTAL_AGENT_PROFILE_ROUTES=1`.
|
|
312
336
|
|
|
313
|
-
Keep the base profile at `agents/<role>.md
|
|
337
|
+
Keep the base profile at `agents/<role>.md` and put routes under `agents/.routes/<role>/<route>.md`, which gives the canonical id `<role>.<route>`. Route segments are kebab-case. For example, `agents/.routes/reviewer/ui-k3.md` defines `reviewer.ui-k3`:
|
|
314
338
|
|
|
315
339
|
```markdown
|
|
316
340
|
---
|
|
@@ -332,33 +356,33 @@ request_params:
|
|
|
332
356
|
Focus on interaction regressions, accessibility, and visual consistency.
|
|
333
357
|
```
|
|
334
358
|
|
|
335
|
-
|
|
359
|
+
Required: `id`, `profile`, `description`, `prompt_mode`. Optional: `whenToUse`, `model_alias`, `thinking_effort`, `service_tier`, `request_params`, `tools`, `disallowedTools`, `can_spawn_subagents`, `allowed_subagents`, `preferred_subagents`, `deny_subagents`. Route frontmatter is strict, and an unknown field — including agent-file-only ones such as `model_profiles`, `allowed_models` and `deny_models` — skips that one sidecar with a coded diagnostic while the base profile and sibling routes still load. The same happens for a path, id or profile mismatch, a duplicate id in one source, or incompatible model selectors.
|
|
336
360
|
|
|
337
|
-
`prompt_mode` always preserves the base prompt: `inherit` requires an empty body
|
|
361
|
+
`prompt_mode` always preserves the base prompt: `inherit` requires an empty body, `prepend` and `append` require a non-empty body and reject `${parent_prompt}` / `${base_prompt}`, and `wrap` requires `${parent_prompt}` or `${base_prompt}` exactly once. There is no unguarded replace mode.
|
|
338
362
|
|
|
339
|
-
A route's `tools` and `disallowedTools` replace the
|
|
363
|
+
A route's `tools` and `disallowedTools` replace the base fields, its `allowed_subagents` intersects the base set, `deny_subagents` accumulates, and `can_spawn_subagents: false` cannot be reopened; the nearest explicit `preferred_subagents` replaces the earlier preference, and an omitted field inherits. `allowed_subagents: []` closes preset selection only. Caller checks use the base role, so a route cannot introduce a preset role the caller could not dispatch.
|
|
340
364
|
|
|
341
|
-
An omitted request field inherits the base value
|
|
365
|
+
An omitted request field inherits the base value: `service_tier: null` clears the tier, `request_params: null` clears the map, and a mapping overlays scalar keys. A route-declared `model_alias` or `thinking_effort` is the route default, and `AgentRun` may override either only within the hard model and effort lists. With no override, a missing route model or an effort the provider cannot perform is a hard capability error.
|
|
342
366
|
|
|
343
|
-
|
|
367
|
+
`AgentRun` lists route entries filtered through the caller's base-role allowlist, showing the route id, base role, description, model and effort defaults and the overridden field names — never the prompt body. Pass `route: reviewer.ui-k3`; omit `profile` to derive `reviewer`, or pass that matching base explicitly. A mismatch is a coded error, and there is no automatic ranking or silent fallback.
|
|
344
368
|
|
|
345
|
-
Resume never reselects or switches a route
|
|
369
|
+
Resume never reselects or switches a route: the journal stores the canonical base role and route id with the rendered prompt, tool policy, denylist, subagent restriction, model and effort locks, service tier and request parameters. A routed agent therefore resumes from its snapshot even if the flag is later disabled or the sidecar changes; those changes affect only new dispatches.
|
|
346
370
|
|
|
347
|
-
A
|
|
371
|
+
A new child picks its model from the concrete `model_alias` parameter, then the pin on the effective profile, route or caller lease, then an explicitly configured `[subagent].default_model`; with none of them the spawn fails with `model.not_configured` and no child is created, and the caller's model is not a silent fallback. Set `model_alias: inherit` in a profile, route or caller lease to bind the caller's resolved model explicitly — `AgentRun` itself rejects `model_alias: "inherit"`, so pass a concrete name or omit the parameter. With configured inheritance the caller's effort follows too, unless a tool `effort` or an applicable `thinking_effort` pin takes priority; otherwise effort resolves as tool `effort` → the route's locked effort, or the caller lease's when the route pins none → matching `model_profiles` effort → profile `thinking_effort` when the bound model matches the profile pin → the bound model's own default. When none supplies an effort, a model known not to support thinking uses `off`; a thinking model without a resolvable default still needs an explicit effort. Unknown capabilities do not imply `off`, and an unknown alias is an error wherever it came from.
|
|
348
372
|
|
|
349
|
-
On `
|
|
373
|
+
On `resume`, omitting both `model_alias` and `effort` keeps the saved binding, and an alias resolving to the same canonical model is a no-op. Changing only `effort` applies it to the next idle run. Changing `model_alias` to a different canonical model needs `allow_model_change: true`, and with `effort` also omitted the target model's own default is re-resolved rather than carried over. Profile, lease, model-profile and inherited hard rules are checked at resume admission, and a rejection leaves the saved binding unchanged; an effort the provider cannot honor, a machine model denial and executor thread-binding restrictions are hard errors too.
|
|
350
374
|
|
|
351
|
-
Omit `model_alias` and `effort` to use the
|
|
375
|
+
Omit `model_alias` and `effort` to use the target's defaults for a new child. The model catalog lists hard-permitted configured models and marks the preferences coming from the effective profile, lease, route and model-profile entries; a model listed for another target is neither preferred nor allowed here. Pair `preferred_models` with a default `model_alias` to publish a preferred pool, and keep `model_profiles` for per-model defaults and guidance. A route's `service_tier`, including `service_tier: null`, does not clear a configured model-level tier.
|
|
352
376
|
|
|
353
|
-
|
|
377
|
+
`allowed_models`, `deny_models` and `allowed_efforts` are always hard, whatever the scope. `preferred_models`, `discouraged_models`, `preferred_efforts`, route defaults and caller-lease pins are soft: a deviation is kept in the binding and summarized in the parent `AgentRun` result. See the [configuration reference](../configuration/config-files.md#subagent).
|
|
354
378
|
|
|
355
|
-
|
|
379
|
+
An invalid file found in a directory is skipped with a warning and does not affect the others. A file passed via `--agent-file` must be valid, or the CLI reports the error and exits.
|
|
356
380
|
|
|
357
381
|
::: warning Note
|
|
358
|
-
`tools` and `disallowedTools` shape the
|
|
382
|
+
`tools` and `disallowedTools` shape what the model is shown and are enforced again before execution. Preset allow/deny rules also filter the `AgentRun` catalog and are checked again before dispatch, and `can_spawn_subagents: false` blocks new Markdown-file children while still allowing an existing child to be resumed. Permission rules remain a separate control for operations that need approval.
|
|
359
383
|
:::
|
|
360
384
|
|
|
361
|
-
|
|
385
|
+
A dispatched custom agent gets a short handoff notice prepended: its last message is the complete deliverable. An independent host invocation (MCP / SDK) gets a different notice, because there is no parent agent; a main-agent bind gets none. Put `${delegation_context}` in the body to place the notice yourself, or set `delegation_notice: off` (or `[agents.delegation] sub = false` / `independent = false` in `config.toml`) to skip it. Override `delegation.sub.notice` or `delegation.independent.notice` through [`PromptOverrides`](../configuration/config-files.md#prompt) to change its text; the boolean gates always win over a text override.
|
|
362
386
|
|
|
363
387
|
### Selecting the Main Agent
|
|
364
388
|
|
|
@@ -367,9 +391,9 @@ Two CLI flags select which agent drives a new session, in both print mode (`kiki
|
|
|
367
391
|
- **`--agent <name>`**: Start the session with the named agent as the main Agent. The name can refer to a built-in agent or to any discovered file; an unknown name fails with an error listing the available agents.
|
|
368
392
|
- **`--agent-file <path>`**: Load one agent file at the highest priority for this launch and start with it. The flag accepts exactly one file: it cannot be repeated, and it cannot be combined with `--agent`.
|
|
369
393
|
|
|
370
|
-
Both flags only
|
|
394
|
+
Both flags apply only when starting a new session — neither can be combined with `--session`/`--continue`. The agent is bound at creation, and resuming restores it automatically, so no flag is needed or allowed there.
|
|
371
395
|
|
|
372
|
-
In print mode
|
|
396
|
+
In print mode an explicit `--model` beats the profile's `model_alias`. Without `--model`, the profile pin wins and `default_model` applies only when the profile sets no model, so a pinned profile works without a global default. Subagents do not use that main-agent default; they can use their own `[subagent].default_model`. A main-agent profile cannot pin `model_alias: inherit`, because it has no caller to follow.
|
|
373
397
|
|
|
374
398
|
For example:
|
|
375
399
|
|
|
@@ -378,22 +402,22 @@ kiki --agent reviewer
|
|
|
378
402
|
kiki -p --agent reviewer "Review the changes on this branch"
|
|
379
403
|
```
|
|
380
404
|
|
|
381
|
-
These
|
|
405
|
+
These flags select the profile for a new session only; the GUI can request a main-profile switch when you submit the next prompt. A session created later in the same TUI process (with `/new`, for example) starts with the default agent. Your main-agent model choice takes priority over profile rules: recommendations do not warn and hard violations only show a non-blocking warning.
|
|
382
406
|
|
|
383
|
-
|
|
407
|
+
When you customize the main agent, reference `${parent_prompt}` or `${base_prompt}` in the body so the environment, workspace-instruction, Skill and plugin injections already in the effective default prompt stay in effect. `${builtin_prompt}` is the stock default even when `SYSTEM.md` exists, and `${plugin_sections}` keeps just the plugin-contributed instructions. A body with none of the three owns the whole prompt, which suits a self-contained sub-agent.
|
|
384
408
|
|
|
385
409
|
### Overriding the main agent's system prompt with SYSTEM.md
|
|
386
410
|
|
|
387
|
-
To
|
|
411
|
+
To replace the default main agent permanently — without passing `--agent` or `--agent-file` on every launch — write `$KIKI_HOME/SYSTEM.md` (default: `~/.kiki/SYSTEM.md`; it moves with `KIKI_HOME`). It takes effect in every launch mode, including interactive TUI sessions. A missing or empty file does nothing, and a file that fails to parse produces a path-specific diagnostic while the last good version of that file keeps working, so you can repair it and reload rather than losing the override. Malformed YAML after an opening `---` is never treated as a plain prompt. Removing the file drops the override.
|
|
388
412
|
|
|
389
|
-
How
|
|
413
|
+
How it is parsed depends on the first line:
|
|
390
414
|
|
|
391
|
-
- **Legacy body.** The file does not start with `---` followed by a YAML mapping. Only the prompt is replaced; description, tools
|
|
392
|
-
- **Upgraded profile.** The file starts with `---` and that fence parses as a YAML mapping. It loads as a normal agent file named `agent`, with `override` forced on. Omitted tool fields and child-role permissions inherit the built-in defaults
|
|
415
|
+
- **Legacy body.** The file does not start with `---` followed by a YAML mapping. Only the prompt is replaced; description, tools and the sub-agent allowlist keep the built-in defaults.
|
|
416
|
+
- **Upgraded profile.** The file starts with `---` and that fence parses as a YAML mapping. It loads as a normal agent file named `agent`, with `override` forced on. Omitted tool fields and child-role permissions inherit the built-in defaults; declared preset permissions narrow them, and explicit recommendations replace inherited ones.
|
|
393
417
|
|
|
394
|
-
Explicit intent still outranks it: a project-scoped same-name agent file declaring `override: true` and any file passed via `--agent-file` take precedence,
|
|
418
|
+
Explicit intent still outranks it: a project-scoped same-name agent file declaring `override: true` and any file passed via `--agent-file` take precedence, `--agent` bypasses it entirely, and within the user scope SYSTEM.md wins over a same-name file in `agents/`.
|
|
395
419
|
|
|
396
|
-
An upgraded `SYSTEM.md` may declare `prompt_overrides` in its frontmatter. With `system_prompt_mode: inherit`, leave the body empty and Kiki keeps the built-in `agent` prompt while applying only those fields. A
|
|
420
|
+
An upgraded `SYSTEM.md` may declare `prompt_overrides` in its frontmatter. With `system_prompt_mode: inherit`, leave the body empty and Kiki keeps the built-in `agent` prompt while applying only those fields. A replacement body stays authoritative and shadows built-in `system.*` section overrides, while `system.shared` and the delegation notice stay outside it. The complete format and precedence are under [`prompt`](../configuration/config-files.md#prompt).
|
|
397
421
|
|
|
398
422
|
Like the body of a regular agent file, SYSTEM.md is rendered as a template each time the prompt is built — `${var}` placeholders in the body are substituted from the live context:
|
|
399
423
|
|
|
@@ -413,7 +437,7 @@ Like the body of a regular agent file, SYSTEM.md is rendered as a template each
|
|
|
413
437
|
| `${delegation_context}` | Position-based handoff notice; empty for the main agent |
|
|
414
438
|
| `${plugin_sections}` | A complete Plugin Instructions block contributed by enabled plugins; empty when no enabled plugin contributes instructions |
|
|
415
439
|
|
|
416
|
-
|
|
440
|
+
Four pre-composed blocks — `${windows_notes}`, `${additional_dirs_section}`, `${skills_section}` and `${plugin_sections}` — render the matching built-in prompt section, or an empty string when it does not apply. The built-in default prompt already includes `${plugin_sections}`, so do not add it again when `${base_prompt}` expands to that prompt. The variables are enough to rebuild the skeleton of the built-in prompt:
|
|
417
441
|
|
|
418
442
|
```markdown
|
|
419
443
|
You are Kiki, running at ${cwd} on ${os}.
|
|
@@ -427,20 +451,18 @@ ${plugin_sections}
|
|
|
427
451
|
|
|
428
452
|
## Instruction Files
|
|
429
453
|
|
|
430
|
-
`AGENTS.md` supplies instructions within each file's stated directory scope
|
|
431
|
-
|
|
432
|
-
Kiki loads `$KIKI_HOME/AGENTS.md` (default: `~/.kiki/AGENTS.md`) together with the workspace-root `AGENTS.md`. A root `.kiki/AGENTS.md` replaces the user-level file; the root `AGENTS.md` still applies. At session start, applicable files along the path from the project root to the working directory are included too. Filename matching is case-insensitive. Files above the project boundary, `~/.agents/AGENTS.md`, and the legacy `.kimi-code/AGENTS.md` path are not discovered.
|
|
454
|
+
`AGENTS.md` supplies instructions within each file's stated directory scope, and a more specific file wins when two conflict. These stay subordinate to system policy and your current request: they cannot change tool schemas, permissions or host controls.
|
|
433
455
|
|
|
434
|
-
|
|
456
|
+
Kiki loads `$KIKI_HOME/AGENTS.md` (default: `~/.kiki/AGENTS.md`) together with the workspace-root `AGENTS.md`; a root `.kiki/AGENTS.md` replaces the user-level file while the root `AGENTS.md` still applies. At session start, applicable files along the path from the project root to the working directory are included too. Filename matching is case-insensitive. Files above the project boundary, `~/.agents/AGENTS.md` and the legacy `.kimi-code/AGENTS.md` path are not discovered.
|
|
435
457
|
|
|
436
|
-
|
|
458
|
+
When a permitted file tool reaches a different directory, Kiki checks that directory's ancestors for `AGENTS.md` and `.kiki/AGENTS.md`. The first write that would have missed those rules returns a retryable result without changing anything, so the agent can read the supplied rules and retry under the same permission policy — no extra approval. Rules already delivered in full, by the runtime snapshot or a complete successful `Read`, are not sent again just because another tool visits the directory; a truncated read does not count. The initial directory listing is a one-level sample, and the agent uses `Glob` to explore further.
|
|
437
459
|
|
|
438
|
-
## Storage
|
|
460
|
+
## Storage in the session directory
|
|
439
461
|
|
|
440
|
-
Sub-agent runtime state is persisted to the `agents/` subdirectory of the current session directory. Each sub-agent instance has its own directory
|
|
462
|
+
Sub-agent runtime state is persisted to the `agents/` subdirectory of the current session directory. Each sub-agent instance has its own directory containing a `wire.jsonl` file with its prompts, message history and final state in chronological order, and background sub-agents also expose their lifecycle status under a `tasks/` subdirectory.
|
|
441
463
|
|
|
442
464
|
::: warning Note
|
|
443
|
-
Session directories, wire files
|
|
465
|
+
Session directories, wire files and task records can contain prompts, command output, repository paths, tool return values or traces of credentials. Redact them before putting any of it in a public repository, an issue or a chat log.
|
|
444
466
|
:::
|
|
445
467
|
|
|
446
468
|
## Next steps
|