kiki-agent 0.4.2 → 0.5.1
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 +3 -3
- package/dist/cpu-worker.mjs +52744 -0
- package/dist/docs/en/configuration/config-files.md +121 -46
- package/dist/docs/en/configuration/data-locations.md +34 -7
- package/dist/docs/en/configuration/env-vars.md +37 -9
- package/dist/docs/en/configuration/overrides.md +20 -9
- package/dist/docs/en/configuration/providers.md +114 -9
- package/dist/docs/en/customization/agent-profiles.md +1 -1
- package/dist/docs/en/customization/agents-and-subagents.md +55 -12
- package/dist/docs/en/customization/hooks.md +3 -3
- package/dist/docs/en/customization/personas.md +36 -2
- package/dist/docs/en/customization/plugins.md +56 -3
- package/dist/docs/en/customization/prompt-fields.md +65 -5
- package/dist/docs/en/customization/recipes.md +77 -0
- package/dist/docs/en/customization/skins.md +2 -2
- package/dist/docs/en/customization/themes.md +1 -1
- package/dist/docs/en/features/agent-workflows.md +8 -8
- package/dist/docs/en/features/browser-and-computer.md +40 -0
- package/dist/docs/en/features/daily.md +13 -13
- package/dist/docs/en/features/ecosystem.md +6 -6
- package/dist/docs/en/features/extend.md +11 -10
- package/dist/docs/en/features/freedom.md +9 -9
- package/dist/docs/en/features/index.md +58 -28
- package/dist/docs/en/features/long-work.md +18 -14
- package/dist/docs/en/features/look.md +6 -6
- package/dist/docs/en/features/people.md +6 -6
- package/dist/docs/en/features/phone.md +13 -3
- package/dist/docs/en/features/spaces.md +12 -12
- package/dist/docs/en/features/workbench.md +8 -8
- package/dist/docs/en/getting-started/desktop-app.md +4 -8
- package/dist/docs/en/getting-started/first-launch.md +1 -1
- package/dist/docs/en/guides/goals.md +4 -2
- package/dist/docs/en/guides/interface.md +32 -10
- package/dist/docs/en/guides/memory.md +64 -10
- package/dist/docs/en/guides/sessions.md +21 -9
- package/dist/docs/en/guides/settings.md +64 -40
- package/dist/docs/en/index.md +3 -1
- package/dist/docs/en/reference/command.md +90 -31
- package/dist/docs/en/reference/model-vocabulary.md +2 -2
- package/dist/docs/en/reference/slash-commands.md +1 -1
- package/dist/docs/en/reference/tools.md +65 -20
- package/dist/docs/en/server/acp.md +9 -3
- package/dist/docs/en/server/local-server.md +19 -27
- package/dist/docs/en/server/mcp.md +9 -5
- package/dist/docs/en/server/rest-api.md +350 -22
- package/dist/docs/en/server/script-tools.md +268 -0
- package/dist/docs/zh/configuration/config-files.md +121 -46
- package/dist/docs/zh/configuration/data-locations.md +34 -7
- package/dist/docs/zh/configuration/env-vars.md +37 -9
- package/dist/docs/zh/configuration/overrides.md +20 -9
- package/dist/docs/zh/configuration/providers.md +114 -9
- package/dist/docs/zh/customization/agent-profiles.md +1 -1
- package/dist/docs/zh/customization/agents-and-subagents.md +55 -12
- package/dist/docs/zh/customization/hooks.md +3 -3
- package/dist/docs/zh/customization/personas.md +36 -2
- package/dist/docs/zh/customization/plugins.md +56 -3
- package/dist/docs/zh/customization/prompt-fields.md +65 -5
- package/dist/docs/zh/customization/recipes.md +77 -0
- package/dist/docs/zh/customization/skins.md +2 -2
- package/dist/docs/zh/customization/themes.md +1 -1
- package/dist/docs/zh/features/agent-workflows.md +10 -10
- package/dist/docs/zh/features/browser-and-computer.md +40 -0
- package/dist/docs/zh/features/daily.md +13 -13
- package/dist/docs/zh/features/ecosystem.md +6 -6
- package/dist/docs/zh/features/extend.md +10 -9
- package/dist/docs/zh/features/freedom.md +9 -9
- package/dist/docs/zh/features/index.md +58 -28
- package/dist/docs/zh/features/long-work.md +17 -13
- package/dist/docs/zh/features/look.md +6 -6
- package/dist/docs/zh/features/people.md +5 -5
- package/dist/docs/zh/features/phone.md +13 -3
- package/dist/docs/zh/features/spaces.md +12 -12
- package/dist/docs/zh/features/workbench.md +8 -8
- package/dist/docs/zh/getting-started/desktop-app.md +4 -8
- package/dist/docs/zh/getting-started/first-launch.md +1 -1
- package/dist/docs/zh/guides/goals.md +4 -2
- package/dist/docs/zh/guides/interface.md +32 -10
- package/dist/docs/zh/guides/memory.md +64 -10
- package/dist/docs/zh/guides/sessions.md +21 -9
- package/dist/docs/zh/guides/settings.md +64 -40
- package/dist/docs/zh/index.md +4 -2
- package/dist/docs/zh/reference/command.md +90 -31
- package/dist/docs/zh/reference/model-vocabulary.md +2 -2
- package/dist/docs/zh/reference/slash-commands.md +1 -1
- package/dist/docs/zh/reference/tools.md +65 -20
- package/dist/docs/zh/server/acp.md +9 -3
- package/dist/docs/zh/server/local-server.md +19 -27
- package/dist/docs/zh/server/mcp.md +9 -5
- package/dist/docs/zh/server/rest-api.md +338 -21
- package/dist/docs/zh/server/script-tools.md +268 -0
- package/dist/external-harness/agy-cli-acp.mjs +168 -162
- package/dist/external-harness/agy-hook-registration.mjs +69 -30
- package/dist/external-harness/agy-mcp-plugin.mjs +19 -0
- package/dist/external-harness/agy-permission-hook.mjs +29 -2
- package/dist/hostRunner.mjs +112 -3
- package/dist/mailbox-worker.mjs +403 -0
- package/dist/main.mjs +2 -2
- package/dist/memory-worker.mjs +1008 -0
- package/dist/native/windows-process-helper.exe +0 -0
- package/dist/query-store-worker.mjs +487 -0
- package/dist/sqlite-indexer.mjs +255 -403
- package/dist/sqlite-query-worker.mjs +261 -249
- package/dist/usage-parser-worker.mjs +3977 -9
- package/dist/usage-read-model-worker.mjs +761 -0
- package/dist/web/assets/AppErrorBoundary-B5Fc4f6-.js +1 -0
- package/dist/web/assets/NavScopeBoundary-C7MnGQio.js +1 -0
- package/dist/web/assets/{arc-DYDCMlOS.js → arc-DGB9OVgQ.js} +1 -1
- package/dist/web/assets/{architectureDiagram-3BPJPVTR-C9Y7T0O2.js → architectureDiagram-3BPJPVTR-glnQCMub.js} +1 -1
- package/dist/web/assets/{blockDiagram-GPEHLZMM-CdUrp-tD.js → blockDiagram-GPEHLZMM-bM0tnGby.js} +1 -1
- package/dist/web/assets/{c4Diagram-AAUBKEIU-PrwvB9IJ.js → c4Diagram-AAUBKEIU-DMf_rTtt.js} +1 -1
- package/dist/web/assets/channel-Cj8SKJ38.js +1 -0
- package/dist/web/assets/{chunk-2J33WTMH-BL56g_Es.js → chunk-2J33WTMH-mTccJ3tW.js} +1 -1
- package/dist/web/assets/{chunk-4BX2VUAB-DvJD5M9M.js → chunk-4BX2VUAB-DhqPYMjY.js} +1 -1
- package/dist/web/assets/{chunk-55IACEB6-C8f-nzvx.js → chunk-55IACEB6-BujrYRoO.js} +1 -1
- package/dist/web/assets/{chunk-727SXJPM-DOGkWKkV.js → chunk-727SXJPM-ciMmSI4G.js} +1 -1
- package/dist/web/assets/{chunk-AQP2D5EJ-fFOuz7g6.js → chunk-AQP2D5EJ-CZW9pKTc.js} +1 -1
- package/dist/web/assets/{chunk-FMBD7UC4-BpeXZ9LM.js → chunk-FMBD7UC4-hdALNnnU.js} +1 -1
- package/dist/web/assets/{chunk-ND2GUHAM-CRUh76fb.js → chunk-ND2GUHAM-CgKyqUdb.js} +1 -1
- package/dist/web/assets/{chunk-QZHKN3VN-uNfxaPk0.js → chunk-QZHKN3VN-B2mmUz_E.js} +1 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-f8V9p-dD.js +1 -0
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-f8V9p-dD.js +1 -0
- package/dist/web/assets/client-ClWQBErG.js +3 -0
- package/dist/web/assets/connection-C0J3BPgk.js +1 -0
- package/dist/web/assets/{cose-bilkent-S5V4N54A-BNkxG-qX.js → cose-bilkent-S5V4N54A-UV3uPjkK.js} +1 -1
- package/dist/web/assets/{dagre-BM42HDAG-BerioUei.js → dagre-BM42HDAG-Zjy-gQ6C.js} +1 -1
- package/dist/web/assets/{diagram-2AECGRRQ-Czv2SR07.js → diagram-2AECGRRQ-DL-kilIf.js} +1 -1
- package/dist/web/assets/{diagram-5GNKFQAL-Uzi1weGK.js → diagram-5GNKFQAL-CjB_xR5B.js} +1 -1
- package/dist/web/assets/{diagram-KO2AKTUF-W36h_ff3.js → diagram-KO2AKTUF-CjN4i3b9.js} +1 -1
- package/dist/web/assets/{diagram-LMA3HP47-FG4dDk52.js → diagram-LMA3HP47-CPCAMndo.js} +1 -1
- package/dist/web/assets/{diagram-OG6HWLK6-CQoEjIAY.js → diagram-OG6HWLK6-DVeBWBKd.js} +1 -1
- package/dist/web/assets/{erDiagram-TEJ5UH35-Ck06KVyZ.js → erDiagram-TEJ5UH35-CHKzBHrr.js} +1 -1
- package/dist/web/assets/export-CXoWon32.js +2 -0
- package/dist/web/assets/{flowDiagram-I6XJVG4X-C5hgxdFZ.js → flowDiagram-I6XJVG4X-C5rQa2pq.js} +1 -1
- package/dist/web/assets/{ganttDiagram-6RSMTGT7-BS52Pw5_.js → ganttDiagram-6RSMTGT7-BrLjEsNJ.js} +1 -1
- package/dist/web/assets/{gitGraphDiagram-PVQCEYII-DLlQKZHs.js → gitGraphDiagram-PVQCEYII-3DRR5VZj.js} +1 -1
- package/dist/web/assets/highlighted-body-OFNGDK62-Bdj5SJfv.js +1 -0
- package/dist/web/assets/index-2Vx5mHRn.js +1 -0
- package/dist/web/assets/index-B1UXw2C9.js +1 -0
- package/dist/web/assets/{index-CM-nNfuV.js → index-BJxtlf4P.js} +4 -4
- package/dist/web/assets/{index-DKIysLbI.js → index-BY7jPurv.js} +1 -1
- package/dist/web/assets/index-Bq79v-Sa.js +1 -0
- package/dist/web/assets/index-BqD3iTIl.js +1 -0
- package/dist/web/assets/index-Br3AlBrQ.js +1 -0
- package/dist/web/assets/{index-Ca607_hK.js → index-BvRBCpc6.js} +2 -2
- package/dist/web/assets/index-BxYCSNg_.js +3 -0
- package/dist/web/assets/{index-B2Pu0Iuu.js → index-C62wjCF_.js} +1 -1
- package/dist/web/assets/index-CBvwNH_H.js +1 -0
- package/dist/web/assets/{index-BNch_a4L.js → index-CG9e6lgq.js} +1 -1
- package/dist/web/assets/{index-ByiwExpV.js → index-CPSWYh_R.js} +2 -2
- package/dist/web/assets/index-CS4xJLZV.js +1 -0
- package/dist/web/assets/index-CjvqtF2I.js +1 -0
- package/dist/web/assets/index-CprdjRRk.js +13 -0
- package/dist/web/assets/{index-Bg99yVX_.js → index-CypTtrCB.js} +1 -1
- package/dist/web/assets/{index-BwcG86o3.js → index-DDJQGcUL.js} +1 -1
- package/dist/web/assets/index-DLWzxUOO.js +1 -0
- package/dist/web/assets/index-DQxkxZmn.js +7 -0
- package/dist/web/assets/index-DRo5Y_9p.js +1 -0
- package/dist/web/assets/index-De_LkTZx.js +1 -0
- package/dist/web/assets/{index-CZX3qUe2.js → index-DfUpwUTM.js} +2 -2
- package/dist/web/assets/{index-BLU8_Um7.js → index-Dkbz748K.js} +2 -2
- package/dist/web/assets/index-DmwFFSkV.js +1 -0
- package/dist/web/assets/index-DpcWEDhW.js +1 -0
- package/dist/web/assets/index-Dqq1RDP4.js +1 -0
- package/dist/web/assets/index-H1uMvIoa.css +1 -0
- package/dist/web/assets/index-ICHWJ2SM.js +1 -0
- package/dist/web/assets/index-O5fSd569.js +229 -0
- package/dist/web/assets/index-odjtqLLS.js +1 -0
- package/dist/web/assets/index-v_yAQ0Am.js +1 -0
- package/dist/web/assets/{infoDiagram-5YYISTIA-CD4XJGFm.js → infoDiagram-5YYISTIA-CCwV4Z0v.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-fu5E3_CT.js → ishikawaDiagram-YF4QCWOH-BwwZcGyZ.js} +1 -1
- package/dist/web/assets/{journeyDiagram-JHISSGLW-CXcnKBfJ.js → journeyDiagram-JHISSGLW-Dc6WqniQ.js} +1 -1
- package/dist/web/assets/{kanban-definition-UN3LZRKU-BawKH6Pl.js → kanban-definition-UN3LZRKU-DVUqULOS.js} +1 -1
- package/dist/web/assets/{linear-BplJuXph.js → linear-d6rWsNOU.js} +1 -1
- package/dist/web/assets/memoryAdvisor-DBQXJB1o.js +1 -0
- package/dist/web/assets/mermaid-GHXKKRXX-Ik6SkVDT.js +642 -0
- package/dist/web/assets/{mindmap-definition-RKZ34NQL-DA1SE2uy.js → mindmap-definition-RKZ34NQL-_JHAkhHL.js} +1 -1
- package/dist/web/assets/navViewState-DaCMIYWA.js +1 -0
- package/dist/web/assets/{pieDiagram-4H26LBE5-6i021QeX.js → pieDiagram-4H26LBE5-BlhlygGy.js} +1 -1
- package/dist/web/assets/{quadrantDiagram-W4KKPZXB-CcKSZDMT.js → quadrantDiagram-W4KKPZXB-jn6R_C0S.js} +1 -1
- package/dist/web/assets/{requirementDiagram-4Y6WPE33-lYVuWRuD.js → requirementDiagram-4Y6WPE33-B9fXCHBr.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-5OEKKPKP-4Zfb4_h4.js → sankeyDiagram-5OEKKPKP-fPJwIxkl.js} +1 -1
- package/dist/web/assets/{sequenceDiagram-3UESZ5HK-DqltKmlY.js → sequenceDiagram-3UESZ5HK-1v1DTNGt.js} +1 -1
- package/dist/web/assets/{spaces-CjuXbmxF.js → spaces-CvL2DRZM.js} +1 -1
- package/dist/web/assets/{stateDiagram-AJRCARHV-HFdhqxzx.js → stateDiagram-AJRCARHV-CEc_PLov.js} +1 -1
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-iAMctzaT.js +1 -0
- package/dist/web/assets/theme-LRSmy8mD.js +1 -0
- package/dist/web/assets/{timeline-definition-PNZ67QCA-HNRxaB3t.js → timeline-definition-PNZ67QCA-CEjhuitj.js} +1 -1
- package/dist/web/assets/{vennDiagram-CIIHVFJN-DwsCTyaD.js → vennDiagram-CIIHVFJN-CActt9h9.js} +1 -1
- package/dist/web/assets/{wardley-L42UT6IY-BWW2wtVO.js → wardley-L42UT6IY-Bp3q2izt.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-YWT4CUSO-C-ktKm7v.js → wardleyDiagram-YWT4CUSO-C_zutiQ2.js} +1 -1
- package/dist/web/assets/{xychartDiagram-2RQKCTM6-48AxNW9k.js → xychartDiagram-2RQKCTM6-CRafvv33.js} +1 -1
- package/dist/web/icons/apple-touch-icon.png +0 -0
- package/dist/web/icons/icon-192.png +0 -0
- package/dist/web/icons/icon-512.png +0 -0
- package/dist/web/icons/maskable-512.png +0 -0
- package/dist/web/index.html +12 -2
- package/dist/web/manifest.webmanifest +16 -0
- 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 +23 -4
- package/dist/search-worker.mjs +0 -14177
- package/dist/web/assets/AppErrorBoundary-DiGMUg4r.js +0 -1
- package/dist/web/assets/LifeMark-CL6-HWDu.js +0 -1
- package/dist/web/assets/NavScopeBoundary-CFCnvZR0.js +0 -1
- package/dist/web/assets/channel-Bj_gZ_Lv.js +0 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-ssCwe2R4.js +0 -1
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-ssCwe2R4.js +0 -1
- package/dist/web/assets/client-DGj93bGT.js +0 -3
- package/dist/web/assets/connection-Bpf-EjrL.js +0 -1
- package/dist/web/assets/export-T_izwEkQ.js +0 -2
- package/dist/web/assets/highlighted-body-OFNGDK62-Btm6MuZ4.js +0 -1
- package/dist/web/assets/index-5_yzg61S.js +0 -1
- package/dist/web/assets/index-B-6LiYTY.js +0 -1
- package/dist/web/assets/index-B4iu4SJW.js +0 -1
- package/dist/web/assets/index-B9MlqF7J.js +0 -1
- package/dist/web/assets/index-BECSk4If.js +0 -1
- package/dist/web/assets/index-BFcyN2Zw.js +0 -1
- package/dist/web/assets/index-BIebkSEI.css +0 -1
- package/dist/web/assets/index-BMWid2q9.js +0 -1
- package/dist/web/assets/index-BeMvPEXs.js +0 -1
- package/dist/web/assets/index-Bezli3SF.js +0 -1
- package/dist/web/assets/index-BkPV0psm.js +0 -1
- package/dist/web/assets/index-CG8uIlD7.js +0 -1
- package/dist/web/assets/index-CJ92kLtO.js +0 -1
- package/dist/web/assets/index-CRDDqofN.js +0 -1
- package/dist/web/assets/index-Cd62y0wD.js +0 -1
- package/dist/web/assets/index-CgcJPsK6.js +0 -3
- package/dist/web/assets/index-Cy8C_eFR.js +0 -7
- package/dist/web/assets/index-D8z7lcQn.js +0 -166
- package/dist/web/assets/index-D_oPSlBL.js +0 -1
- package/dist/web/assets/index-Dceu0bqY.js +0 -1
- package/dist/web/assets/index-eUyF-8Sq.js +0 -1
- package/dist/web/assets/index-hG2s2Spn.js +0 -13
- package/dist/web/assets/mermaid-GHXKKRXX-BO9hkP3Z.js +0 -621
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-Dx28QuZF.js +0 -1
- package/dist/web/assets/theme-beWE_6f8.js +0 -1
|
@@ -112,7 +112,7 @@ A hook supplements permission rules; it is not an operating-system sandbox and c
|
|
|
112
112
|
This flashes a notification in the terminal title bar when a background task completes (macOS needs `terminal-notifier` installed):
|
|
113
113
|
|
|
114
114
|
```toml
|
|
115
|
-
# Written in ~/.kiki/config.toml
|
|
115
|
+
# Written in <home>/config.toml (default: ~/.kiki/config.toml)
|
|
116
116
|
[[hooks]]
|
|
117
117
|
event = "Notification" # Trigger: when a background task status changes
|
|
118
118
|
matcher = "task\\.completed" # Only care about "completed" notifications
|
|
@@ -123,7 +123,7 @@ Save the config, start a new session, and a notification will appear the next ti
|
|
|
123
123
|
|
|
124
124
|
## Legacy rule fields
|
|
125
125
|
|
|
126
|
-
Each legacy rule is one entry in the `[[hooks]]` array in `~/.kiki/config.toml
|
|
126
|
+
Each legacy rule is one entry in the `[[hooks]]` array in the current `<home>/config.toml` (default `~/.kiki/config.toml`):
|
|
127
127
|
|
|
128
128
|
| Field | Type | Required | Description |
|
|
129
129
|
| --- | --- | --- | --- |
|
|
@@ -221,7 +221,7 @@ The following hook checks the command content before the Agent calls the `Bash`
|
|
|
221
221
|
[[hooks]]
|
|
222
222
|
event = "PreToolUse"
|
|
223
223
|
matcher = "Bash"
|
|
224
|
-
command = "node
|
|
224
|
+
command = "node \"$KIKI_HOME/hooks/block-dangerous-bash.mjs\""
|
|
225
225
|
timeout = 5
|
|
226
226
|
```
|
|
227
227
|
|
|
@@ -55,9 +55,43 @@ max_handoffs_per_hour = 30
|
|
|
55
55
|
room_budget = 12
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
A session's `delivery` is either `reply` or `message`.
|
|
58
|
+
A session's `delivery` is either `reply` or `message`. New persona sessions use message mode when the persona omits `delivery`; an explicit session choice takes priority, and an existing session keeps its saved choice. Sessions without a persona, and personas with explicit `reply`, answer directly. The persona editor saves the delivery mode it shows, including an explicit `reply`.
|
|
59
59
|
|
|
60
|
-
`SendMessage`
|
|
60
|
+
In the message view, a completed turn's last complete ordinary reply also appears when that turn has not called the native `SendMessage` tool. Calling it suppresses this fallback even if the send fails, is cancelled, or is still pending. When a call sends a `messages` batch, each message grows in its own row while streaming and keeps its own delivery result. Long replies and sent messages load the rest of their text automatically. Failed turns keep a failure indicator. Switch to the process view to read ordinary text that is not shown as a message, including unfinished replies. This display fallback does not send to a room, another persona, or an IM channel; those destinations still need an actual delivery.
|
|
61
|
+
|
|
62
|
+
When `SendMessage` confirms delivery to the user, its result tells the model to end the turn without another closing message if the request is complete and no work remains. Progress updates still allow required tools and pending work to continue. A native-executor turn that ends in ordinary text instead receives guidance in the next model request when the tool is available; it does not add a request to the completed turn or resend its answer.
|
|
63
|
+
|
|
64
|
+
The shipped `agent` profile exposes `SendMessage` in message mode and omits it in reply mode. A custom profile with an explicit `tools` allowlist must include it; delivery mode does not bypass profile permissions. The tool table is frozen for a turn, so a delivery change applies to the next one.
|
|
65
|
+
|
|
66
|
+
`SendMessage` addresses the user or another persona with `to: "@Name"`; use the persona ID when names collide. A handoff can wake a closed conversation and counts toward the hourly limit, though retrying the same delivery key does not consume another slot. Attachments are immutable copies from the session workspace, its additional directories or the persona's own area, not arbitrary filesystem paths. Set an attachment's `kind` to request `image`, `audio`, `voice`, or `video` delivery; omitting it preserves ordinary `file` delivery. A message can contain attachments without text:
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"attachments": [
|
|
71
|
+
{ "path": "output/voice.ogg", "kind": "voice", "mime_type": "audio/ogg" }
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Connect conversation channels
|
|
77
|
+
|
|
78
|
+
A user-directed `SendMessage` uses the Kiki in-app channel, named `internal`, and the conversation's enabled IM bindings. The in-app channel stays on when an IM binding is added. HTTP clients can inspect the channels with `rest.imSessions.channelViews(sessionId)`.
|
|
79
|
+
|
|
80
|
+
Each attachment must be supported by at least one enabled channel. Otherwise the send fails with `media_unsupported`; with no enabled destination, it fails with `no_destination`. If only some channels support an attachment, Kiki sends it to those channels and tells the others which media were skipped. The receipt's `channels` list identifies each destination as `delivered`, `unsupported`, `failed`, or `unknown`; a delivered channel can also list skipped types in `unsupported`. Do not automatically resend an `unknown` outcome: the platform may already have accepted it.
|
|
81
|
+
|
|
82
|
+
Voice is an explicit intent, not permission to fall back to a file. The in-app channel plays audio and voice in its audio player. Discord, Slack, and Matrix accept ordinary `audio` but do not support outgoing native `voice`; Discord and Slack upload audio as attachments, while Matrix uses `m.audio`. Matrix connections support only unencrypted rooms and refuse plaintext sends into encrypted rooms.
|
|
83
|
+
|
|
84
|
+
HTTP clients configure these connections through `rest.imSessions.setupCatalog()` and `setup(...)`. The catalog supplies each platform's required fields and actual capabilities:
|
|
85
|
+
|
|
86
|
+
| Platform | Required fields | Setup route |
|
|
87
|
+
| --- | --- | --- |
|
|
88
|
+
| Discord | `bot_token` | `discord_install` builds a bot invitation from `application_id`; enable Message Content Intent in the developer portal. |
|
|
89
|
+
| Slack | `bot_token`, `app_token` | `slack_manifest` creates a Socket Mode app; OAuth can supply the bot token, but an app-level `xapp` token is still required. |
|
|
90
|
+
| Matrix | `homeserver`, `access_token` | `matrix_discover` reads login methods; `matrix_sso_begin` / `matrix_sso_complete` or `matrix_password` can obtain and save a token. |
|
|
91
|
+
|
|
92
|
+
Call `setup({ action: "save", provider_kind, fields })` to save credentials without starting a listener. Then use the returned `provider_instance_id` with `check` and `listen(id, true)`, send the bot a platform message, and confirm the resulting discovery against the intended session or persona. Existing Telegram, Feishu, OneBot, and WeChat connections keep their configuration and binding flow. The [REST API guide](../server/rest-api.md) covers connection authentication; the HTTP endpoints for these operations are `GET` / `POST /api/im/sessions/setup` and `GET /api/im/sessions/targets/{sessionId}/channels`.
|
|
93
|
+
|
|
94
|
+
After confirming a binding, call `rest.imSessions.testBinding(bindingId)` to send a fixed, clearly marked test message to that binding's chat without starting a model reply. It uses the existing connection and requires the binding to be enabled and connected. The HTTP equivalent is `POST /api/im/sessions/bindings/{bindingId}/test` with `{}`; custom text and targets are rejected. The result contains `binding_id`, `status`, `message_ids`, and an optional `detail`. A `delivered` result confirms platform acceptance, not that someone read the message; for `failed`, fix the reported cause before trying again. If the status is `unknown`, check the chat before manually retrying.
|
|
61
95
|
|
|
62
96
|
## Discuss in a room
|
|
63
97
|
|
|
@@ -71,6 +71,7 @@ You are approving the source, not the exact bytes: Kiki fingerprints the plugin
|
|
|
71
71
|
|
|
72
72
|
- **Local edits take effect in the conversation you are already in.** Install once with `/plugins install --trust <path>`, enable global use with `/plugins enable <id>` (a fresh CLI install leaves global use off), then after editing your source run `/plugins install <path>` again with the same path: the managed copy is replaced, the plugin stays enabled, and the tool is available to that conversation as soon as the command returns. No `/plugins reload`, `/reload` or `/new` is needed, and the consented source does not ask for `--trust` again.
|
|
73
73
|
- **An update waits for that plugin's in-flight work.** Running calls finish on the old version and calls arriving during the switch wait and run on the new one. Other plugins keep running untouched, and a call already resolved against an older tool definition asks for a retry instead of running against changed rules.
|
|
74
|
+
- **A package preview does not hold up installed tools or Skills.** It reads the complete package, including dependency files. Disconnecting the preview request cancels its remaining download, extraction and fingerprint work; installation still requires a completed preview.
|
|
74
75
|
- **`/plugins reload` is the global re-read**, of `installed.json` and every managed copy. It never copies from your source directories, so it is not how you pick up a source edit; system-prompt sections and plugin Skills rebuild on their own documented timing (see [System-prompt instructions](#system-prompt-instructions) and [Plugin agents](#plugin-agents)).
|
|
75
76
|
- **Local installs are copied** to `$KIKI_HOME/plugins/managed/<id>/`, and the CLI always runs from that copy. Edit the source and reinstall — editing the managed copy by hand has no update path and a later reinstall overwrites it.
|
|
76
77
|
- **Removing a plugin deletes only the installation record.** The managed copy and your source files stay on disk.
|
|
@@ -80,9 +81,9 @@ You are approving the source, not the exact bytes: Kiki fingerprints the plugin
|
|
|
80
81
|
|
|
81
82
|
Install one copy of a plugin, then choose where it is used. The GUI install preview offers global use, use in one workspace, or installation for later. Installing for later leaves it off by default and does not start its App background service. The same preview and one-time consent apply to every choice.
|
|
82
83
|
|
|
83
|
-
In **Settings → Workspaces**, open a workspace to set its plugin defaults. In a conversation, the right rail
|
|
84
|
+
In **Settings → Workspaces**, open a workspace to set its plugin defaults. In a conversation, open **Capability controls → Plugins** in the right rail to change plugin use for that session only; **Capability inventory → Tools** shows the plugin's tools rather than its usage switch. Selecting an installed plugin from the composer's **+** menu or plugin picker also enables it only for that session, without sending a message. Before your first message, those choices stay with the new-conversation draft and apply before that message starts; a failed application keeps the draft for retry. Other sessions and workspace defaults stay unchanged. This capability is available by default; an explicit `[experimental] plugin_workspace_usage = false` or `KIKI_EXPERIMENTAL_PLUGIN_WORKSPACE_USAGE=0` keeps the selection surface off.
|
|
84
85
|
|
|
85
|
-
The most specific selection wins: session, then workspace, then global default. **Restore default** removes the local override. An explicitly globally disabled or invalid plugin cannot be enabled locally; restore its master switch in Plugin settings first. Profile tool restrictions still apply.
|
|
86
|
+
The most specific selection wins: session, then workspace, then global default. **Restore default** removes the local override. An explicitly globally disabled or invalid plugin cannot be enabled locally; restore its master switch in Plugin settings first. Profile tool restrictions still apply. The shipped default main profile allows tools from enabled plugins; custom profiles and subagent profiles still use their own tool lists.
|
|
86
87
|
|
|
87
88
|
Turning a plugin off removes its tools, Skills, commands, plugin agents, hooks and panel access from that scope. Calls already admitted may finish. Plugin instructions update at the next safe step; a completed selection does not rewrite an already sent request or past messages. **Applying** indicates that catalog or runtime changes are still being applied. A failed application restores the previous selection and shows the error.
|
|
88
89
|
|
|
@@ -152,7 +153,7 @@ Reading results and output-layer model history are stored separately. The defaul
|
|
|
152
153
|
|
|
153
154
|
## Media Sources
|
|
154
155
|
|
|
155
|
-
Install and enable **Kiki Media** (`kiki-media`) once, then open **Capabilities → Extensions & tools → Plugins → Media sources**.
|
|
156
|
+
Install and enable **Kiki Media** (`kiki-media`) once, then open **Capabilities → Extensions & tools → Plugins → Media sources**. It includes OpenAI, Google, Ark, xAI, MiniMax, StepFun, Novita, Agnes, NewAPI and ComfyUI sources for images, video and speech; you do not need a separate package for each vendor. Your own local commands can join the same list as script sources.
|
|
156
157
|
|
|
157
158
|
The unified package needs a Kiki host with grouped media sources and script-source management. If your build has no **Add script source** action or rejects unknown manifest fields, update the host first. The package's plugin-engine requirement `>=0.4.0` is a protocol version, not a CLI release number; the [package README](https://github.com/X-T-E-R/kiki-plugins/tree/main/plugins/official/kiki-media#configure-a-source) gives the host contract.
|
|
158
159
|
|
|
@@ -160,6 +161,8 @@ The unified package needs a Kiki host with grouped media sources and script-sour
|
|
|
160
161
|
|
|
161
162
|
Media generation has no experimental master switch. Install and enable the plugin, configure an enabled source, then request a generation. Opening the list or saving settings does not start a job; the source's access requirements, charges and script authorization still apply.
|
|
162
163
|
|
|
164
|
+
The plugin ships the `media-image`, `media-video` and `media-tts` skills; the agent uses its `generate` tool for images, video and speech. Independent generations can run in parallel. Each source handles eight simultaneous submit or poll requests by default; change this with **Maximum concurrent provider requests** in that source's settings.
|
|
165
|
+
|
|
163
166
|
### The list
|
|
164
167
|
|
|
165
168
|
Each row identifies a source and its owning package, with its configuration and enabled state. Open a source marked **Needs setup** to fill in missing settings. A disabled or removed source stays visible so you can restore it; a package that did not load must be repaired before its sources can generate. A blocked job is kept rather than discarded.
|
|
@@ -445,6 +448,56 @@ Supported fields:
|
|
|
445
448
|
|
|
446
449
|
Unsupported runtime fields such as `tools`, `apps`, `inject`, and `configFile` appear as diagnostics and are ignored.
|
|
447
450
|
|
|
451
|
+
### Chat channels and message delivery
|
|
452
|
+
|
|
453
|
+
Plugins can connect a platform account to Kiki's existing session bindings and send messages from an admitted tool call. Declare executable contributions in `x-kiki`, then register the same definitions from `entry.mjs`. The SDK contracts are exported from `@kiki/plugin-sdk/im` and `@kiki/plugin-sdk/messages`.
|
|
454
|
+
|
|
455
|
+
A plugin that uses another installed plugin declares its required version range, for example `"dependencies": { "kiki-media": "^1.0.0" }` inside `x-kiki`. Kiki checks that each dependency is installed, enabled and version-compatible before activation or execution. Install or enable a missing dependency yourself; Kiki does not do so automatically. Plugins without `dependencies` keep their existing behavior.
|
|
456
|
+
|
|
457
|
+
For chat connections, declare `x-kiki.imAdapters` and call `api.registerImAdapter(definition, adapter)`. Each definition represents one configured account and has `schemaVersion: 1`, a local `id`, `label`, independent `inbound` and `outbound` booleans, `maxInboundBytes`, and a `mediaCapabilities` array. Kiki assigns `plugin:<pluginId>/<adapterId>` as the provider and instance ID. Inbound definitions also require `listenerRealm`, the real protocol or message-source namespace. Use `qq-onebot` with the actual QQ self ID as `start()`'s `listenerAccountId`; QQ official API connections use `qq-official` with the app ID. `accountId` remains the plugin's stable binding identity and may keep an existing prefix. When `listenerAccountId` is omitted, Kiki uses `accountId` for listener ownership. An already-running listener retains a source/account claim; a conflicting new listener stops and reports `account_in_use`. Output-only connections do not claim inbound ownership.
|
|
458
|
+
|
|
459
|
+
`start({ signal, settings, instanceId, offset, messageLimits, emit, report })` returns `{ accountId, listenerAccountId?, targets? }`. Emit only after startup completes. Output-only adapters can return `targets` for the user to confirm without fabricating an inbound event. Disabling, reloading or removing the plugin closes its own connections and keeps the user's listening preference and bindings for later re-enabling. The user confirms each destination; group bindings default to the original sender and can explicitly use `binding_scope: "topic"` or `"chat"`. A shared group session preserves each message's real sender, and does not let another member answer the original sender's pending approval or question.
|
|
460
|
+
|
|
461
|
+
For one platform message containing text and several attachments, finish normalization and media downloads before calling `await emit({ kind: "message", eventId, sourceMessageId, identity, parts, ...metadata })` once. Put the real mention, quote and sender metadata on that envelope. Each ordered part has `kind: "text" | "image" | "file" | "audio" | "video"`, optional `text`, and hydrated `media: { name, mediaType, bytes }` when available. `sourceMessageId` is required and `operation` is omitted or `"create"`; edits and retractions use the existing single-event form. Kiki admits all parts before one prompt and keeps their order. Existing single-kind events keep their per-event behavior; Kiki does not guess when a series of them is complete.
|
|
462
|
+
|
|
463
|
+
Read the frozen `context.messageLimits` object supplied to `start()`; managed plugins need no runtime SDK import to obtain it. Its keys are `parts: 256`, `mediaBytes: 33554432`, `textChars: 1048576`, `serializedChars: 67108864`, and `chunkChars: 4194304`. A complete message has 1–256 parts, at most 32 MiB of decoded media in total, and at most 1,048,576 UTF-16 code units across all part text. `definition.maxInboundBytes` still limits **each attachment**, up to 8 MiB, so two 8 MiB images fit together. The serialized envelope, including base64, escaped text and metadata, is limited to 67,108,864 UTF-16 code units. The runner automatically frames it in 4,194,304-code-unit chunks; ordinary RPC lines retain their 16,777,216-code-unit limit. Do not implement framing in the plugin.
|
|
464
|
+
|
|
465
|
+
If an attachment is known to have no usable download URL, keep its non-text `kind` and put its name, reason and any available ASR transcript in nonempty `text`, without `media`. Kiki renders that part in place as explicitly unavailable external text and creates no media bytes for it. A real download failure or cancellation must emit nothing for that source message; retry the whole source with the same root `eventId`. Exceeding a message budget rejects `emit()` as a whole. A part marked `tooLarge: true` also rejects the entire `emit()` without submitting or saving an earlier prefix. Stop or unload discards incomplete transport frames and rejects queued emissions from the retired connection.
|
|
466
|
+
|
|
467
|
+
After startup, use optional `await context.report?.({ status: "failed", sourceId, code })` to make receive failures visible under **Settings → Notifications → IM**. `code` is `hydrate_failed`, `download_failed`, `message_too_large` or `admission_failed`; `sourceId` is an opaque, non-content token of 1–64 ASCII letters, digits, `_` or `-`, stable across source retries. Reports accept no message text, URLs, credentials, error objects or stacks, and are limited to 1,024 UTF-8 bytes. Kiki binds the account and instance from the active connection and retains the newest 32 source/code diagnostics for snapshot refreshes and same-account reconnects within that Host. Older Hosts omit `report`; existing adapters need no changes.
|
|
468
|
+
|
|
469
|
+
After the same complete source succeeds, report `status: "recovered"` with its matching `sourceId` and `code`. This clears only that diagnostic, preserving other sources and connection errors. Do not report cancellation or stop as a failure, advance a source cursor after failed hydration or admission, or emit a diagnostic as a chat message. Report acknowledgement confirms diagnostic retention, not message delivery. A Host replacement starts a new diagnostic lifetime; an adapter retry must report any continuing failure again.
|
|
470
|
+
|
|
471
|
+
Keep `eventId` for event deduplication and send the platform's real message ID separately as `sourceMessageId`. Inbound `mentioned`, `mentionIds`, `replyToMessageId`, optional `isSelf` and epoch-millisecond `timestamp` reach the session's message metadata. Emit `operation: "edit"` or `"retract"` with the real target `sourceMessageId`; these update the received history without starting another model turn. Do not infer self identity from a display name. The model receives real sender facts and selected background beside the current body, marked as untrusted external data rather than instructions or authorization. Outbound text carries `replyToMessageId` for a quote, `messageId` for an edit, and `mentionIds` for platform mentions. Declare `supportsReply`, `supportsEdit` and `supportsMentions` only when implemented; unsupported requests return a channel receipt instead of silently dropping those fields. Platform passive-reply tokens stay inside the adapter.
|
|
472
|
+
|
|
473
|
+
New explicit topic/chat group bindings retain ordinary messages quietly and wake on a real mention or reply to a known self message. The user can choose a literal prefix, every-message wake, or record-only mode through [`group_policy`](../server/rest-api.md#im-account-and-channel-bindings). Older sender-scoped bindings keep their every-message behavior. Mention/reply wake requires real adapter metadata; built-in transports that do not expose it can use a configured prefix or `wake: "always"`. [ReadMessageHistory](../reference/tools.md#im-chat-history) reads the retained journal through the current session's admitted binding.
|
|
474
|
+
|
|
475
|
+
For optional platform backfill, declare `supportsHistory: true` and implement `readHistory({ chatId, topicId, cursor?, limit }, context)`. `limit` is 1–50; the cursor is an opaque adapter token. Return `{ status: "unsupported", detail? }` or `{ status: "ok", messages, order, nextCursor?, coverage, end }`. Each message has its real `sourceMessageId`, `identity` and media/text `kind`, with optional `text`, `operation`, `isSelf`, `timestamp`, mention/reply fields and up to four path-free media descriptors `{ kind, name, mediaType }`. `order` is `chronological` or `reverse_chronological`; `coverage` is `complete`, `partial` or `unknown`; `end` is `reached`, `more` or `unknown`. A short or empty page does not establish an end. Kiki validates every returned chat/topic and the requested limit. Platform reads require an enabled inbound connection and an explicit chat/topic binding; unsupported adapters keep working without a history method.
|
|
476
|
+
|
|
477
|
+
Inside a plugin tool, `context.messages.send()` follows the same main-agent, capability, tool-deny and approval checks as `SendMessage`, then uses the thread's enabled bound outputs. For example:
|
|
478
|
+
|
|
479
|
+
```js
|
|
480
|
+
const receipt = await context.messages.send({
|
|
481
|
+
request_id: "report-1",
|
|
482
|
+
messages: [
|
|
483
|
+
{ text: "First message\nwith a line break" },
|
|
484
|
+
{ text: "Second message", attachments: [{ file_id: artifact.file_id, kind: "voice" }] }
|
|
485
|
+
]
|
|
486
|
+
});
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
Pass a completed `context.media.generate()` artifact's `file_id` to send generated output already stored in this session. An admitted tool can compose a pure TTS request from its own text and voice arguments without declaring `mediaInputs`. A tool declaring `mediaInputs: true` must keep the exact admitted request in `args.request`; image and video requests still require that admission. Ordinary attachment `path` inputs still require a workspace, additional-directory or Bot-directory path; generated files elsewhere in the home directory do not become generally readable.
|
|
490
|
+
|
|
491
|
+
Use either single-message `text`/`attachments`/`reply_to`/`mention_ids` or an explicit `messages` array, never both. A newline stays inside one message. Outer `to`, `channel` and `channels` select destinations for every item. Batch results contain ordered `messages` receipts with stable `index`, `message_id`, channel outcomes and attachment references; cancellation stops unlaunched items. An explicit `request_id` is scoped to the plugin, session and agent across tool calls and restarts: the same payload reuses its receipt, and changed content conflicts. An interrupted admitted request remains unknown and is not sent again; use a new ID only after checking its delivery. Without an ID, deduplication is local to that tool call's send sequence.
|
|
492
|
+
|
|
493
|
+
`minSendIntervalMs` sets the Host's per-target sending interval. Adapters may report `{ status: "failed", errorKind: "rate_limited", retryAfterMs }` only when the platform explicitly rejected the send without accepting it. Kiki retries that result at most twice; delivered results with no message IDs, partial deliveries and unknown outcomes are not retried. Built-in channels also use the Host's target pacing; a platform rate limit without an exact retry delay remains a failed receipt.
|
|
494
|
+
|
|
495
|
+
### Native tool concurrency
|
|
496
|
+
|
|
497
|
+
For a tool whose independent calls can safely overlap, set `"concurrencySafe": true` in its `x-kiki.tools` definition and in the identical definition passed to `api.registerTool`. Omit it or set it to `false` to retain the existing scheduling behavior.
|
|
498
|
+
|
|
499
|
+
This declaration changes scheduling only: broad `accesses: [{ "kind": "all" }]` no longer makes independent calls mutually exclusive. Permissions and approvals still use the original `accesses`. Declared file writes retain their read/write ordering, and an unknown `Bash` command remains a barrier. The plugin must handle shared state safely and enforce its own provider limits.
|
|
500
|
+
|
|
448
501
|
### Native tool results
|
|
449
502
|
|
|
450
503
|
Native tools declared under `x-kiki.tools` can return text and PNG, JPEG or WebP images as base64 data URLs. Large results are saved automatically as session attachments: text keeps a preview with the complete original's path and `kimi-file://` reference, and images remain available through the session attachment reference. Ask the agent to use `Read` to page through the original text or `ReadMediaFile` to inspect the original image. Plugin authors can keep the usual return format; they do not need to split the result themselves.
|
|
@@ -8,6 +8,10 @@ Prompt field overrides replace named pieces of the built-in prompt — system se
|
|
|
8
8
|
|
|
9
9
|
Useful built-in field ids include `system.language`, `system.reply_style`, `system.coding`, `system.shared`, `tool.web-search.description`, `tool.web-search.guidance`, `delegation.sub.notice` and `delegation.independent.notice`. System fields replace sections of the built-in prompt, except `system.shared`, which is the one shared outer addition and is appended once when non-empty. A tool `description` replaces its static description; a tool `guidance` is appended under the existing `User-configured guidance:` label.
|
|
10
10
|
|
|
11
|
+
Kiki's built-in collaboration guidance works without a Recipe. It asks agents to give one owner a complete outcome, inspect and incorporate returned work before accepting it, and send the inputs a recipient still needs for its next action. Model, route and tool requirements are applied through `AgentRun` parameters and the chosen role rather than repeated in the subagent's instructions. It does not impose a message quota on user-requested discussion. Reply language follows the user or task brief, including an explicit reply-language requirement; internal steering, reminders and quoted documents do not by themselves switch it. Customize this guidance through `system.delegation_brief_hygiene`, `delegation.sub.notice`, or the `description` and `guidance` fields for `tool.agent-run`, `tool.agent-send` and `tool.thread-send`.
|
|
12
|
+
|
|
13
|
+
These defaults keep existing profile and Recipe overrides, delegation-notice off choices, and role and tool limits intact. A custom replacement profile still controls its own body. External executors receive the text through their selected profile or configured `executor_prompt` composition; [direct external execution](./agents-and-subagents.md#direct-external-execution) without those additions stays bare.
|
|
14
|
+
|
|
11
15
|
## Where overrides live
|
|
12
16
|
|
|
13
17
|
Every override surface uses the same format — optional `files` (strict TOML files relative to the Kiki home) and inline `fields`:
|
|
@@ -23,7 +27,7 @@ Every override surface uses the same format — optional `files` (strict TOML fi
|
|
|
23
27
|
|
|
24
28
|
Precedence from low to high follows the table order; a missing key inherits the lower value. The complete format, `${name}` variable substitution rules, and validation failures are documented in [`prompt`](../configuration/config-files.md#prompt).
|
|
25
29
|
|
|
26
|
-
An existing agent keeps its bound prompt fields, custom variables and cognition text when it resumes, even if their source files have changed or been deleted. Edits apply to new bindings; choose [Rebuild context](./agents-and-subagents.md#rebuilding-a-session-context) to adopt them in an existing session. An explicit model change selects the target model's prompt inputs; `new_window` alone does not reload prompt sources. Current tool permissions and hard model constraints still apply.
|
|
30
|
+
An existing agent keeps its bound prompt fields, custom variables and cognition text when it resumes, even if their source files have changed or been deleted. Edits apply to new bindings; choose [Rebuild context](./agents-and-subagents.md#rebuilding-a-session-context) to adopt them in an existing session. An explicit model change selects the target model's prompt inputs; `context_mode: "fresh"`, `context_mode: "compact"`, or legacy `new_window` alone does not reload prompt sources. Current tool permissions and hard model constraints still apply.
|
|
27
31
|
|
|
28
32
|
Older records reuse their saved system prompt and recover inline fields from the saved profile where possible. If a record never saved a required shared field, tool override, steering cue or anchor and its original inputs cannot be reconstructed, recovery names the missing inputs. Rebuild the context to use current sources rather than rolling back your installed prompts.
|
|
29
33
|
|
|
@@ -44,7 +48,7 @@ If your config still carries the old `prompt.shared` and `prompt.tools` keys, mo
|
|
|
44
48
|
|
|
45
49
|
## Recipe model presets
|
|
46
50
|
|
|
47
|
-
A Recipe packages model tuning
|
|
51
|
+
A Recipe packages reusable model tuning and selectable prompt text: prompt fields, system/steering/anchor text, and model settings. Recipes are enabled by default. Use the [model editor](../guides/settings.md#models-and-recipes) or `global.recipes` in the [client SDK](../server/sdk.md). An explicit `KIKI_EXPERIMENTAL_RECIPES=false` or `[experimental] recipes = false` on the server keeps them disabled; remove that override to use the default.
|
|
48
52
|
|
|
49
53
|
Create an absolute-path package directory containing `recipe.toml`. Prompt files must be Markdown paths inside that directory:
|
|
50
54
|
|
|
@@ -54,10 +58,16 @@ id = "example"
|
|
|
54
58
|
name = "Example"
|
|
55
59
|
version = "1.0.0"
|
|
56
60
|
|
|
61
|
+
[options.research]
|
|
62
|
+
name = "Research guidance"
|
|
63
|
+
description = "Include source-checking guidance"
|
|
64
|
+
default = true
|
|
65
|
+
|
|
57
66
|
[model.parameters]
|
|
58
67
|
temperature = 0.35
|
|
59
68
|
|
|
60
69
|
[prompts]
|
|
70
|
+
system = { text = "Cite sources when making factual claims.", when = "research" }
|
|
61
71
|
steering = { text = "Keep the current goal in focus." }
|
|
62
72
|
steering_on_turn = true
|
|
63
73
|
steering_on_input = true
|
|
@@ -67,7 +77,11 @@ steering_interval_steps = 0
|
|
|
67
77
|
"system.reply_style" = "Answer concisely and directly."
|
|
68
78
|
```
|
|
69
79
|
|
|
70
|
-
`
|
|
80
|
+
An `[options.<id>]` table requires `name` and boolean `default`; `description` is optional. Option ids use the same regular expression as Recipe ids: `^[a-z0-9][a-z0-9._-]*$`.
|
|
81
|
+
|
|
82
|
+
A source in `system`, `steering`, `anchor.content`, or the `custom.steering` source under `steering_sources.<source>` may be one `{ text = "..." }` or `{ file = "..." }`, or an array of those sources. Each source may use either `when = "<option-id>"` or `unless = "<option-id>"`, but not both. A gate that names an undeclared option is an error, and `off` cannot be gated. Filtering every source leaves the declared slot empty; an `extends` child does not fall back to the parent for that slot.
|
|
83
|
+
|
|
84
|
+
`prompts.fields` accepts every registered, writable prompt field and uses its normal variable and empty-value validation. Options affect prompt text only; they do not affect model settings, hooks, permissions or fields. `model` uses the existing [per-model configuration](../configuration/config-files.md#models) syntax and validation for tuning settings, including parameters, usage budgets and behavior. It cannot change provider routing, credentials, request identity or permissions. Parameters and behavior remain shared across agent positions; existing main/independent usage budgets retain their separate meanings.
|
|
71
85
|
|
|
72
86
|
A package may also carry [script hooks](./hooks.md#recipe-script-hooks). Inspect `preview.hooks` and obtain the user's explicit installation consent before sending `consent: true` for a script-bearing package; never set it automatically from `consent_required`. The hook-free example below needs no script confirmation.
|
|
73
87
|
|
|
@@ -87,6 +101,10 @@ A model's `recipe` can also reference a local file or package directory, such as
|
|
|
87
101
|
|
|
88
102
|
A profile can reference the same installed package, or a local Recipe file, without changing the global model. Add `recipe: installation:<installed-id>` (or just the installation id) to its Markdown frontmatter; the id is returned by `install`. A local file or package directory also works: `recipe: ./focus/recipe.toml`, or an absolute path. A profile's relative path resolves from the profile file and is read at bind time.
|
|
89
103
|
|
|
104
|
+
Select text options with `recipe_options = { research = true }` for the model's Recipe, or with `recipe_options:` in profile frontmatter for the profile's Recipe. Each layer applies its selections only to that layer's Recipe package. An omitted selection uses the option's `default`; an unknown selected id leaves text unchanged and reports a configuration diagnostic. In the GUI, the existing model editor and the existing profile editor for a profile with a declared Recipe show these options as checkboxes.
|
|
105
|
+
|
|
106
|
+
Inspect effective option values without changing a binding with `GET /api/recipes/{id}?recipe_options=<URL-encoded JSON boolean map>` in REST or `klient.global.recipes.get(id, values)` in the klient API.
|
|
107
|
+
|
|
90
108
|
The file is not installed, and binding does not download a URL. Save through the existing profile Markdown editor or edit the profile file. Script hooks in a directly referenced file still require the existing installation consent; `hooks = "off"` contributes no scripts.
|
|
91
109
|
|
|
92
110
|
```markdown
|
|
@@ -95,6 +113,8 @@ name: reviewer
|
|
|
95
113
|
description: Review changes
|
|
96
114
|
model_alias: example-model
|
|
97
115
|
recipe: installation:YOUR_INSTALLED_ID
|
|
116
|
+
recipe_options:
|
|
117
|
+
research: true
|
|
98
118
|
request_params:
|
|
99
119
|
temperature: 0.2
|
|
100
120
|
---
|
|
@@ -105,11 +125,17 @@ A child space reads installed Recipes from its base home by default; a local ent
|
|
|
105
125
|
|
|
106
126
|
Recipes contribute only their declared values. Model settings resolve from the saved model, then the model Recipe, local model `overrides`, the profile Recipe, explicit profile parameters, and matching `model_profiles` parameters. Context and output caps still take the smallest applicable limit. Prompt fields resolve from global, saved model fields, model Recipe fields, profile Recipe fields, profile fields, then matching profile-model or caller-lease fields. Uncovered cognition slots and ordinary model-profile prompt text continue to apply; the role, persona, workspace instructions, host context and permissions keep their existing authority.
|
|
107
127
|
|
|
108
|
-
Set `recipe: off` on a model or profile to disable that layer's Recipe, including an inherited model selection. For model API updates, pass the current `base_revision`; `recipe: null` clears the local selection instead. Saved manual values and the other layer's Recipe remain intact. New bindings freeze each referenced package revision, expanded text and effective model settings, including inherited parameters
|
|
128
|
+
Set `recipe: off` on a model or profile to disable that layer's Recipe, including an inherited model selection. For model API updates, pass the current `base_revision`; `recipe: null` clears the local selection instead. Saved manual values and the other layer's Recipe remain intact. New bindings freeze each referenced package revision, selected option values, expanded text and effective model settings, including inherited parameters; option values and patch content are part of the revision, so the result is reproducible.
|
|
129
|
+
|
|
130
|
+
To check a session's profile Recipe, click **Recipe** beside the model in the composer. **Effective prompts** lists the bound package and revision. Under **Per-turn user reminder**, expand `recipe.profile.steering` to see **Steering applied**, the full frozen text and its sources. A steering-only Recipe sends a user message after the task prompt; it does not add that text to the system prompt.
|
|
131
|
+
|
|
132
|
+
Existing bindings and cold restores keep their snapshot. Older snapshots without a saved name show the installation id and revision unless the same package revision can supply a confirmed name. The displayed body still comes from the saved binding, even if the package changes or becomes unavailable. To adopt changed option values, rebuild the context or create a new binding; hot reload alone does not change an existing binding immediately.
|
|
133
|
+
|
|
134
|
+
If a Recipe reference cannot be resolved, the profile editor shows the unavailable reference, and a failed binding reports the profile, reference and reason. Correct the installation id or profile-relative path, then bind again or rebuild the existing context. A failed bind or rebuild keeps the previous binding; inspecting its diagnostics does not replace it.
|
|
109
135
|
|
|
110
136
|
### Inherit or customize
|
|
111
137
|
|
|
112
|
-
A package can declare one parent with `extends = { source = "https://example.com/presets/recipe.toml" }` before its tables. Missing slots inherit; each text source or source array replaces its parent atomically. Model settings merge by declared leaf, and arrays replace as a whole. Root `model = "off"` clears inherited Recipe settings and returns to saved model settings. A prompt slot such as `steering = "off"` removes that package's inherited slot; a field value of `false` removes that inherited Recipe field. Other model or profile layers can still supply a value.
|
|
138
|
+
A package can declare one parent with `extends = { source = "https://example.com/presets/recipe.toml" }` before its tables. Missing slots inherit; each text source or source array replaces its parent atomically. Model settings merge by declared leaf, and arrays replace as a whole. Root `model = "off"` clears inherited Recipe settings and returns to saved model settings. A prompt slot such as `steering = "off"` removes that package's inherited slot; a field value of `false` removes that inherited Recipe field. Other model or profile layers can still supply a value. Before evaluating any `when` or `unless`, option definitions merge by id. A child definition with the same id replaces the parent's complete definition, including `name`, `default`, `description`, `prepend`, `append` and `patch`; parent gates are evaluated against the merged option table. Option order after `extends` is parent options first, followed by new child ids; an override keeps the parent's position.
|
|
113
139
|
|
|
114
140
|
`prompts` is the common branch used by subagents. A `[prompts.main]` or `[prompts.independent]` table selects a whole position-specific branch; it does not implicitly fill missing slots from common. Set `main = "same"` or `independent = "same"` inside `[prompts]` to explicitly use common, or use `"off"` to disable the whole branch. Text slots accept `{ text = "..." }`, `{ file = "prompt.md" }`, or an array of those sources. An anchor uses `{ content = { text = "..." }, steps = 1, scope = "session" }`; `scope` also accepts `"turn"`.
|
|
115
141
|
|
|
@@ -128,6 +154,40 @@ custom = { steering = { file = "task-cue.md" }, steering_interval_steps = 2 }
|
|
|
128
154
|
|
|
129
155
|
A custom Recipe body accepts the normal text/file/array forms or `"off"`; the latter suppresses lower-layer custom text. Off and inherit modes keep any saved custom draft.
|
|
130
156
|
|
|
157
|
+
### Option insertions and section patches
|
|
158
|
+
|
|
159
|
+
Options can add prompt text without replacing a declared slot. The option-level `prepend` and `append` forms are whole-slot shorthands: they insert before or after the entire slot, so a prepend can appear before a heading rather than targeting a section body. For example:
|
|
160
|
+
|
|
161
|
+
```toml
|
|
162
|
+
[options.citations]
|
|
163
|
+
name = "Citations"
|
|
164
|
+
default = false
|
|
165
|
+
append.main.steering = { text = "Cite sources" }
|
|
166
|
+
prepend.common.system = { file = "preface.md" }
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
`prepend` and `append` use `common`, `main` or `independent` branches. Their slots are `system`, `steering`, `anchor` (the anchor's `content`) and `steering_sources.<source>` (the custom steering body). Each insertion slot accepts one `{ text = "..." }` or `{ file = "..." }`, or an array of those sources. After inheritance is merged, each insertion expands to a source gated by `when = "<option-id>"` and is inserted before or after the actual declared slot; a single declared source is treated as an array before insertion.
|
|
170
|
+
|
|
171
|
+
For section-aware edits, add patch entries to an option:
|
|
172
|
+
|
|
173
|
+
```toml
|
|
174
|
+
[options.cite]
|
|
175
|
+
name = "Citations"
|
|
176
|
+
default = false
|
|
177
|
+
|
|
178
|
+
[[options.cite.patch]]
|
|
179
|
+
slot = "main.system"
|
|
180
|
+
section = "Sources"
|
|
181
|
+
action = "append"
|
|
182
|
+
content = { text = "Cite sources." }
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
`slot` uses the same `branch.slot` syntax as `prepend` and `append`; `section` is optional. Without `section`, only `action = "prepend"` or `action = "append"` is allowed, and the entry becomes a `when = "<option-id>"` source. With `section`, Kiki first gates and concatenates the complete slot text, then applies enabled options' patches in option declaration order and each option's patch-array order. Only enabled options apply.
|
|
186
|
+
|
|
187
|
+
A section matches heading text exactly at any heading level and runs from that heading to before the next heading at the same or a higher level. Lines beginning with `#` inside a fenced code block are not headings. Section-level `prepend` and `append` add content at the section body head or tail; `before` and `after` insert content before or after the whole section; `replace` replaces the whole section and requires content with its own heading; `remove` deletes the whole section and cannot have content. Every action except `remove` requires `content`, and inserted blocks are separated by a blank line. Unedited text is preserved byte-for-byte, including the trailing newline when the final section is untouched.
|
|
188
|
+
|
|
189
|
+
After `extends` is merged, the target slot must be declared and must not be `off`; an invalid slot key, missing or disabled target, or `content` carrying `when` or `unless` is an error. If an enabled patch cannot find its section or finds it more than once, evaluation fails with the option id and section in the diagnostic. Insertions cannot use `when` or `unless` themselves.
|
|
190
|
+
|
|
131
191
|
`global.recipes.fork` creates either an independent `copy` or an `extend` child; `saveLocal` edits the resulting local package with an `expected_revision` guard. Installed packages lock the complete dependency chain and work offline. `follow` checks updates daily; `pinned` keeps the accepted revision. Invalid updates leave the whole last accepted revision active. HTTPS ZIP sources require `sha256`; an inherited ZIP source can supply it in `extends`. Preview and install accept the same inspected snapshot, with no second source download at install time.
|
|
132
192
|
|
|
133
193
|
To share a local customization, save any draft first, then call `global.recipes.export(installation_id)`. It returns `{ name, revision, files }`: a suggested ZIP filename, the accepted source revision, and a relative file map. ZIP the files client-side; inherited text, model settings and cadence are materialized without a parent installation reference, so another Kiki home can preview and install the package independently. Export does not create an installation, change a model, modify source files or upload anything. Importing the package creates its own revision; the export's `revision` identifies what was accepted in the sender's home.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Recipes
|
|
2
|
+
|
|
3
|
+
A Recipe packages reusable prompt text, model settings and optional script hooks. Install it once, then select it on a model or [agent profile](./prompt-fields.md#recipe-model-presets). Each binding keeps its own option choices.
|
|
4
|
+
|
|
5
|
+
## Install and select
|
|
6
|
+
|
|
7
|
+
In **Settings → Models & agents → Models & providers**, open a model's editor and choose **Choose a Recipe**. You can select an installed package, browse a configured Recipe market, or import a source.
|
|
8
|
+
|
|
9
|
+
1. Preview the source URL or an absolute path on the server. A local source can be a directory or `recipe.toml` file; an HTTPS ZIP requires its SHA-256 checksum.
|
|
10
|
+
2. Review the expanded prompts, model settings and any script files. A package with new scripts requires explicit consent to install them.
|
|
11
|
+
3. Choose **Install only** to keep the package without changing the model, or **Install and apply** to also save the model binding and its current drafts.
|
|
12
|
+
4. For an already installed package, select its options and choose **Apply to model**. Merely reading or selecting a package leaves the saved binding unchanged.
|
|
13
|
+
|
|
14
|
+
If installation succeeds but applying to the model fails, keep the installation and retry **Apply to model** after correcting the reported problem. **Restore manual settings** removes the model's Recipe reference while retaining its saved manual values and any separate profile Recipe.
|
|
15
|
+
|
|
16
|
+
## Choose options and inspect the result
|
|
17
|
+
|
|
18
|
+
An option has an id, a name, an optional description and a boolean default. Options can include or remove text, insert text into a prompt slot, or patch a named Markdown section. The full [option and patch syntax](./prompt-fields.md#option-insertions-and-section-patches) belongs to the package manifest.
|
|
19
|
+
|
|
20
|
+
Select options on the model or profile that uses the package. Omitted choices use the package defaults; two models can use the same installation with different choices. An option removed by an update produces a diagnostic and is ignored; review the binding's choices before saving again.
|
|
21
|
+
|
|
22
|
+
To inspect a choice without saving it, use `klient.global.recipes.get(id, values)` or `GET /api/recipes/{id}?recipe_options=<URL-encoded JSON boolean map>`. The response's `resolved.option_values` contains the effective choices, and `resolved.branches` contains the expanded prompt text.
|
|
23
|
+
|
|
24
|
+
For example, with an already connected [Klient](../server/sdk.md), apply a previewed package to one model:
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
const recipes = klient.global.recipes;
|
|
28
|
+
const preview = await recipes.preview({ source: { locator: "/path/to/recipe" } });
|
|
29
|
+
const installed = await recipes.install({ preview_id: preview.preview_id });
|
|
30
|
+
const values = { research: true };
|
|
31
|
+
const effective = await recipes.get(installed.installation_id, values);
|
|
32
|
+
const model = await klient.global.kosong.readModel("example-model");
|
|
33
|
+
await klient.global.kosong.updateModel(model.id, {
|
|
34
|
+
recipe: installed.installation_id,
|
|
35
|
+
recipe_options: values,
|
|
36
|
+
base_revision: model.revision,
|
|
37
|
+
});
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Review `preview.hooks` before installing a package with scripts; pass `consent: true` only after that approval. For several models, read and update each alias with its own `base_revision`. If a model changed in between, refresh that model and retry its save; already successful model saves remain in place.
|
|
41
|
+
|
|
42
|
+
New bindings freeze the package revision, selected options, expanded text and model settings. An existing or restored conversation keeps that snapshot. Start a new binding or [rebuild the context while idle](./agents-and-subagents.md#rebuilding-a-session-context) to adopt changed options or package content.
|
|
43
|
+
|
|
44
|
+
## Browse installed packages
|
|
45
|
+
|
|
46
|
+
**Settings → Models & agents → Recipes** (`/settings/recipes`) manages packages without opening a model. The list shows each package's version, update rule, any failed update, and the models that use it. Open a package to read it (`?recipe=<installation id>`), then choose **Edit this Recipe** (`&view=edit`); a package installed from a source offers **Customize this Recipe**, which copies or extends it first. Nothing on this page binds a model. **Remove** names the models that still use the package and switches them back to their own saved settings. The page also installs from a link or path and manages Recipe markets. In a model's Recipe tab, **Open in the Recipe library** jumps to the bound package.
|
|
47
|
+
|
|
48
|
+
If a save is refused because the package was saved elsewhere first, the editor keeps your edits and offers **Load the newer version**. Your changed files keep your words, untouched files take the newer copy, and the next save uses the newer revision.
|
|
49
|
+
|
|
50
|
+
The [Recipe API](../server/rest-api.md#recipes-and-markets) exposes `global.recipes.list()` and `GET /api/recipes`. Each entry includes its installation id, display name, version, accepted revision, source locator, update mode and health. `copied_from` records a fork's source; market entries associate a package with their source URL.
|
|
51
|
+
|
|
52
|
+
The optional directory fields support model pickers and management lists:
|
|
53
|
+
|
|
54
|
+
| Field | Meaning |
|
|
55
|
+
| --- | --- |
|
|
56
|
+
| `used_by` | Current effective model aliases using this installation, including inherited model references; omitted when none use it |
|
|
57
|
+
| `options` | Option definitions and defaults from the accepted revision; omitted when none are declared or that revision is unavailable |
|
|
58
|
+
| `update_available` | A successful update check found another revision |
|
|
59
|
+
| `last_error` | The update or revision-read failure to resolve |
|
|
60
|
+
|
|
61
|
+
`GET /api/models` and `klient.global.kosong.listModels()` also return each model's `recipe` and explicit `recipe_options`. A `recipe` reference may start with `installation:`; remove that prefix when joining it to the directory's `installation_id`. For a selected-options summary, combine the model's choices with each option's default. An unbound model or a model set to `off` omits both fields.
|
|
62
|
+
|
|
63
|
+
Directory reads use accepted local snapshots and do not fetch package sources. If a revision cannot be read or validated, its entry remains visible with `health: "unavailable"` and a diagnostic. Repair its installation or remove it; other packages remain usable.
|
|
64
|
+
|
|
65
|
+
## Update, customize and share
|
|
66
|
+
|
|
67
|
+
An installed package locks its dependency chain and remains usable offline. **Follow** (`follow`) checks for updates daily and adopts a valid revision when no new script consent is needed. **Pinned** (`pinned`) keeps the accepted revision and is skipped by update checks. An explicit check reports availability without replacing the current revision. Invalid updates retain the complete last accepted package.
|
|
68
|
+
|
|
69
|
+
Use **Copy and edit** for an independent local package, or **Extend from this** to retain a parent reference. Edit **Prompt words** or **Source files**, then choose **Save Recipe**. Saving the package does not select it on another model. API edits use `expected_revision`; on a conflict, reload before editing again. Inherited installations are read-only in a child space, so copy or extend them there before saving.
|
|
70
|
+
|
|
71
|
+
Save author drafts before **Download as ZIP**. The export includes accepted inherited content so another home can import it independently. The API returns `{ name, revision, files }`; the caller creates the ZIP from that relative file map. Export does not upload the package.
|
|
72
|
+
|
|
73
|
+
## Markets and removal
|
|
74
|
+
|
|
75
|
+
Recipe markets are HTTPS catalogs configured under `recipes.markets`. Each market has an `id`, `name`, `url` and `enabled` choice. Disabling a market keeps installed packages. A failed catalog fetch can return its cached entries with `offline: true`; the diagnostic names the source to repair. Plugin markets and Recipe markets have separate catalogs and installation operations.
|
|
76
|
+
|
|
77
|
+
Before removing an installation, inspect its `used_by` model aliases. Removal is rejected while those models still reference it, unless you explicitly pass `disable_models: true`; this writes `recipe: "off"` on the affected models and preserves their other settings. Profile references are separate and are not included in `used_by`; switch or remove those references before deleting a package they need. Existing frozen bindings retain their accepted snapshot.
|
|
@@ -36,7 +36,7 @@ Settings → Appearance → Background puts a picture or a short video behind th
|
|
|
36
36
|
- **Panel opacity** and **Panel blur**: how much the sidebar, page sheets, headers and composer surfaces let the picture through, within the scope you chose.
|
|
37
37
|
- **Separate for light and dark**: off by default. Turn it on to pick a different background for each theme.
|
|
38
38
|
|
|
39
|
-
Readability assist adds a local wash behind conversation and settings text without raising your **Panel opacity** setting. Page sheets, headers and the composer follow that setting; menus
|
|
39
|
+
Readability assist adds a local wash behind conversation and settings text without raising your **Panel opacity** setting. Page sheets, headers and the composer follow that setting; menus and dialogs keep solid backgrounds. Since an approval request is answered in the composer card, it follows that setting too. A busy picture can still make text hard to read at low opacity, so raise **Panel opacity** when you need more separation.
|
|
40
40
|
|
|
41
41
|
Video plays muted and on a loop. It holds on its first frame — or the pack's poster — while the window is hidden or not focused, when reduced motion is on, and when the battery is low and you are unplugged. Kiki warns about videos above 1440p or 40 MB: they cost a lot of memory and you cannot see the difference behind the panels.
|
|
42
42
|
|
|
@@ -54,7 +54,7 @@ After adding a file, press **Reload skins** in Appearance. No restart needed.
|
|
|
54
54
|
::: warning Which machine's folder?
|
|
55
55
|
The themes folder is read on the machine running the Kiki server, since that is the only filesystem it can see.
|
|
56
56
|
|
|
57
|
-
- **Desktop app** —
|
|
57
|
+
- **Desktop app** — the current Space's `<home>/themes/` (default `~/.kiki/themes/`).
|
|
58
58
|
- **Browser connected to a remote server** — the folder belongs to that server, not to the device you are browsing from. Built-in skins work either way, because they ship inside the app.
|
|
59
59
|
:::
|
|
60
60
|
|
|
@@ -36,7 +36,7 @@ A custom theme can override any token below. The `dark` and `light` columns are
|
|
|
36
36
|
|
|
37
37
|
## Let the skill write it
|
|
38
38
|
|
|
39
|
-
You do not have to write the JSON by hand. Run `/kiki-ops` and describe the theme you want — the skill picks the colors, writes the file under `~/.kiki/themes
|
|
39
|
+
You do not have to write the JSON by hand. Run `/kiki-ops` and describe the theme you want — the skill picks the colors, writes the file under the current `<home>/themes/` (default `~/.kiki/themes/`), checks the hex values, and tells you how to apply it.
|
|
40
40
|
|
|
41
41
|
- `/kiki-ops Create a warm dark theme with amber accents.`
|
|
42
42
|
- `/kiki-ops Make a light theme based on Solarized, but keep errors easy to see.`
|
|
@@ -8,7 +8,7 @@ An **agent** is the thing that actually does the work: it reads files, runs comm
|
|
|
8
8
|
|
|
9
9
|
This page explains what an agent is, how the main agent and subagents differ, and how to choose and combine profiles. The full field reference lives in [Agents and Sub-Agents](/en/customization/agents-and-subagents) and [Agent profiles: concepts and design](/en/customization/agent-profiles).
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Main agent & subagents
|
|
12
12
|
|
|
13
13
|
You talk to one agent per session: the **main agent**. It receives your messages, plans, calls tools, and produces the replies you see. When a piece of work is worth isolating, the main agent dispatches a **subagent** to handle it — a coding change that needs exploring first, several implementations to review in parallel, a large refactor to plan without loading the main context.
|
|
14
14
|
|
|
@@ -18,7 +18,7 @@ A dispatch tree in which a lead session has spawned several subagents, each with
|
|
|
18
18
|
|
|
19
19
|
Each subagent spends model tokens of its own, so handing over a task the main agent could finish in one step is pure extra cost. Whether the remaining work is separable enough to hand off is the main agent's own judgment, and naming a role yourself overrides it.
|
|
20
20
|
|
|
21
|
-
###
|
|
21
|
+
### Main agent binding
|
|
22
22
|
|
|
23
23
|
A profile is not a main agent or a subagent by itself. Which one it is depends on how it is bound:
|
|
24
24
|
|
|
@@ -32,13 +32,13 @@ The `main: true` frontmatter flag marks a profile as a *candidate* for the sessi
|
|
|
32
32
|
|
|
33
33
|
The session's main agent runs on the model you pick for the session, which overrides whatever its profile pins. A subagent resolves its own model separately, in order: an explicit `model_alias` on the dispatch, then the pin or model menu of the profile it runs as, then `[subagent].default_model`. A profile left without a pin and no default configured fails the dispatch with `model.not_configured` rather than silently inheriting the caller's model — except for the templates that set `model_alias: inherit` on purpose. So the model you choose in the menu governs the agent you are talking to, and what a profile pins governs every agent dispatched as that role.
|
|
34
34
|
|
|
35
|
-
###
|
|
35
|
+
### Model overrides
|
|
36
36
|
|
|
37
37
|
When the same model serves both roles, you do not define it twice. A model is defined once — its alias, provider, credentials, context window, and supported efforts — and the roles share the usual operating settings such as default effort, service tier, when the context compresses, and the context budget. The main agent can override just the ones that should differ, and anything it leaves unset is inherited; a subagent simply uses the shared values.
|
|
38
38
|
|
|
39
39
|
So a single model can be set to a high effort for the agent you talk to and the default elsewhere, or compress at a tighter point for the main agent while subagents keep the shared trigger. Everything not named stays shared, and an explicitly chosen model or effort in a session still wins. Prompt fields follow the same split between shared, main, and independent: parameters are inherited field by field, while the old prompt identity blocks still replace as a whole. See [`models` in the config reference](/en/configuration/config-files#models) and [Model menus and hard boundaries](/en/customization/agent-profiles#model-menus-and-hard-boundaries) for the exact rules.
|
|
40
40
|
|
|
41
|
-
## One file
|
|
41
|
+
## One file per role
|
|
42
42
|
|
|
43
43
|
The **frontmatter** carries the configuration — the name, the description the dispatcher reads, the model and thinking effort, the tool allowlist, and which subagents the role may itself dispatch. The **body** is the system prompt the agent starts from. Nothing else is required: a profile is plain text you can read, diff, and keep in version control.
|
|
44
44
|
|
|
@@ -48,7 +48,7 @@ Fresh installs ship three roles you can use immediately: the main `agent` that d
|
|
|
48
48
|
|
|
49
49
|
The Settings \> Agents list, with main agents and subagents grouped and each role's model, effort, and permitted child agents on its row\.
|
|
50
50
|
|
|
51
|
-
##
|
|
51
|
+
## Shipped & custom roles
|
|
52
52
|
|
|
53
53
|
Two more ship as templates, because most work divides into the same two shapes:
|
|
54
54
|
|
|
@@ -63,7 +63,7 @@ The agent editor: instructions, description, when to use it, model, effort, engi
|
|
|
63
63
|
|
|
64
64
|
Writing your own pays off when a kind of work recurs and has house rules: a reviewer that must cite file and line, a tester that always runs the suite before reporting, an implementer that must not touch generated files. Starting from a copy of a role that already works, or from a shipped template, beats starting blank.
|
|
65
65
|
|
|
66
|
-
##
|
|
66
|
+
## Dispatch & model rules
|
|
67
67
|
|
|
68
68
|
You rarely pick a profile by hand. The main agent dispatches on the `description` and `whenToUse` each profile declares, so those two lines decide the work — write them for the dispatcher, not for yourself. You can still steer: ask for a role by name ("use `explore` to map the files first"). Whether a dispatch stops for your approval depends on the session's [permission mode](/en/guides/interaction#permission-modes) — under `manual` each one is a request you read and accept or reject, while `auto` and `yolo` let routine dispatches proceed.
|
|
69
69
|
|
|
@@ -79,7 +79,7 @@ A profile is execution configuration: tools, permissions, model, effort, and the
|
|
|
79
79
|
|
|
80
80
|
- [Agents and Sub-Agents](/en/customization/agents-and-subagents) — the field reference and dispatch contract
|
|
81
81
|
- [Agent profiles: concepts and design](/en/customization/agent-profiles) — where profiles live and when changes take effect
|
|
82
|
-
- [
|
|
83
|
-
- [
|
|
82
|
+
- [Subagents & Multi-Model](/en/features/workbench) — what the main session does with a dispatched tree
|
|
83
|
+
- [Models, Prompts & Permissions](/en/features/freedom) — prompt overrides, connections, permission modes, and hooks
|
|
84
84
|
|
|
85
85
|
[Online version with images](https://x-t-e-r.github.io/kiki/en/features/agent-workflows.html)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Browser & Computer Control
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Browser & Computer Control
|
|
6
|
+
|
|
7
|
+
When work moves beyond local text files into live web pages, signed-in dashboards, or desktop software that has no CLI or API, you can set up and enable browser and computer control under **Settings → Capabilities → Browser & computer** (and matching plugins).
|
|
8
|
+
|
|
9
|
+
Kiki's browser driver, any independent browser it starts, and computer control run on the Kiki server machine, while you can also attach to an existing local or remote browser. For the full settings walkthrough, see [Browser control](/en/guides/settings#browser-control) and [Computer control](/en/guides/settings#computer-control).
|
|
10
|
+
|
|
11
|
+
## Browser control {#browser-control}
|
|
12
|
+
|
|
13
|
+
Once you complete the component setup and allow the browsers an agent may use under **Settings → Capabilities → Browser & computer → Browser control**, agents can open pages, read snapshots, click elements, fill forms, and take screenshots through the [browser tools](/en/reference/tools#browser-tools), attaching screenshots or recordings back to the timeline. Connections start only when a task requests them.
|
|
14
|
+
|
|
15
|
+
**Add browser** opens a side panel: pick a route first, then finish that route's own setup in the same panel. You can connect the kind of browser that fits the job:
|
|
16
|
+
|
|
17
|
+
- **Your everyday signed-in browser (Kimi / Codex browser extensions)**: use the **Kimi Browser Extension** or **Codex / ChatGPT browser extension** to drive the browser you already use, keeping your existing sign-ins and cookies for internal dashboards, social research, form filling, and cross-site collection. For the Kimi extension, Kiki installs the plugin and local bridge, and you add and approve the extension from your browser's store. For the Codex extension, you first install the Codex or ChatGPT desktop app and its browser extension, authorize it by the official instructions, and then connect it in Kiki.
|
|
18
|
+
- **Kiki-managed independent browser**: Kiki starts and manages a separate browser and sign-in profile on the server without copying your everyday cookies. It is suited for automated verification, stateless browsing, or tasks that need an isolated account. It runs headless by default, with an option to show the browser window.
|
|
19
|
+
- **Ego Lite**: if you install Ego Lite yourself and finish its setup window, Kiki can check its readiness and connect it so agents can run page automation scripts with screenshots attached directly to the timeline.
|
|
20
|
+
- **Existing or remote browsers (CDP)**: under **Add browser → Configure manually**, attach directly to any local or remote browser that already exposes a CDP address without launching a new browser instance.
|
|
21
|
+
|
|
22
|
+
### Browser permissions
|
|
23
|
+
|
|
24
|
+
Each browser source has an enable switch for that integration method (turning a source off stops discovery, connection, and tool calls for it while preserving your checked browsers), and each browser in the connection list has its own allow switch on its row. An agent can use only the browsers you switch on, and switching one off revokes that access immediately. You can allow several browsers at once and pick **Set as default** in a row's **⋯** menu to make it the browser for new sessions; with no default, each call names its browser explicitly.
|
|
25
|
+
|
|
26
|
+
See [Settings pages: Browser control](/en/guides/settings#browser-control) for route setup and readiness checks, and [Built-in Tools: Browser Tools](/en/reference/tools#browser-tools) for tool parameters.
|
|
27
|
+
|
|
28
|
+
## Computer control {#computer-control}
|
|
29
|
+
|
|
30
|
+
For desktop apps without a CLI or API, cross-app data entry, or visual UI walkthroughs, Kiki provides two desktop control paths. Neither installs or connects to your desktop automatically; both require your manual installation and approval before use:
|
|
31
|
+
|
|
32
|
+
- **Built-in computer control ([Settings → Capabilities → Browser & computer → Computer control](/en/guides/settings#computer-control))**: downloads and verifies a pinned open-source executor on the Kiki server and registers a desktop control connection. **Model usage preference** defaults to **Avoid** (models prefer existing CLI, API, MCP, short-script, and browser tools unless you or your rules explicitly ask for desktop control) and can be switched to **Prefer** for interactive desktop tasks. The session's main agent can use the desktop tools under your permission rules, while subagents require an explicit opt-in.
|
|
33
|
+
- **[Kimi Computer Use plugin](/en/customization/plugins#kimi-computer-use)**: an official desktop plugin installed from a direct URL for clicking, dragging, scrolling, and typing in desktop apps. On macOS it runs silently in the background without taking over your mouse once you grant Accessibility and Screen Recording permissions in System Settings; on Windows (WinCU) it runs in an interactive desktop session without extra OS permission prompts, briefly activating the target window and using your real mouse and keyboard while acting.
|
|
34
|
+
|
|
35
|
+
## Next steps
|
|
36
|
+
|
|
37
|
+
- [Settings pages: Browser control](/en/guides/settings#browser-control) and [Computer control](/en/guides/settings#computer-control): route setup and status checks
|
|
38
|
+
- [Built-in Tools: Browser Tools](/en/reference/tools#browser-tools): snapshots, tab management, and script execution
|
|
39
|
+
- [Plugins: Kimi Browser Extension](/en/customization/plugins#kimi-browser-extension) and [Kimi Computer Use](/en/customization/plugins#kimi-computer-use): extension and desktop plugin installation
|
|
40
|
+
- [Plugins, Skills, MCP & Search](/en/features/extend): local document extraction, Office files, structured data, and web retrieval
|