Documentation Index
Fetch the complete documentation index at: https://kagi.micr.dev/llms.txt
Use this file to discover all available pages before exploring further.
kagi assistant
Prompt Kagi Assistant, continue an existing thread, use a saved assistant profile, and manage both Assistant threads and custom assistants from the terminal.

Synopsis
Authentication
Required:KAGI_SESSION_TOKEN
The Assistant feature uses Kagi’s authenticated web-product flow, not the paid public API token path.
Prompt Mode
Use prompt mode to start a new thread or continue an existing one:Prompt Arguments
<QUERY>
The prompt to send to Kagi Assistant.
--thread-id <THREAD_ID>
Continue an existing Assistant thread.
--assistant <ASSISTANT>
Use a saved assistant by exact name, profile id, or invoke-profile slug.
--format <FORMAT>
Output format for prompt mode.
Possible values:
json- pretty JSONpretty- terminal-friendly thread id, message id, and reply contentcompact- minified JSONmarkdown- only the assistant reply content
--no-color
Disable ANSI colors in --format pretty.
--model <MODEL>
Override the model slug for a single prompt.
--lens <LENS_ID>
Override the Assistant lens id for a single prompt.
This is the Assistant profile lens_id, not the search-command lens index used by kagi search --lens.
--web-access
--no-web-access
Force internet access on or off for a single prompt.
--personalized
--no-personalized
Force Kagi personalizations on or off for a single prompt.
Thread Subcommands
kagi assistant thread list
List Assistant threads for the current account.
kagi assistant thread get <THREAD_ID>
Fetch one thread with its messages.
kagi assistant thread delete <THREAD_ID>
Delete one thread.
kagi assistant thread export <THREAD_ID>
Export one thread as markdown to stdout.
kagi assistant thread export <THREAD_ID> --format json
Return the thread as structured JSON instead of markdown. This emits the same envelope shape as thread get.
Custom Assistant Subcommands
kagi assistant custom list
List built-in and custom assistants visible to the current account.
kagi assistant custom get <ID_OR_NAME>
Fetch one custom assistant definition by id or exact name.
kagi assistant custom create <NAME>
Create a custom assistant.
Supported options:
--bang-trigger <TRIGGER>- optional trigger without the leading!--web-access/--no-web-access--lens <LENS_ID>--personalized/--no-personalized--model <MODEL>--instructions <TEXT>
kagi assistant custom update <ID_OR_NAME>
Update a custom assistant by id or exact name.
kagi assistant custom delete <ID_OR_NAME>
Delete a custom assistant by id or exact name.
Output Contract
Prompt mode returns:thread list returns:
custom list returns an array of assistant summaries:
Examples
Start a thread, capture the id, continue it, then export it:Notes
- Prompt mode now supports
json,pretty,compact, andmarkdown. thread exportdefaults to markdown because that is the natural terminal transcript format.assistant custom listincludes built-in assistants as well as user-created ones.- File-upload Assistant flows are intentionally out of scope in this CLI today.
See Also
- search - search and snap-prefixed discovery
- lens - manage reusable search scopes
- auth-matrix - which commands require which token
- output-contract - JSON shapes and jq examples