Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .facts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
- label: kagi assistant --contract-file accepts a small JSON contract file with required top-level string keys and rejects assistant replies that do not satisfy it
command: cargo test --test integration-cli assistant_contract_file_rejects_missing_required_key -- --exact
tags: [implemented]
- label: kagi assistant thread get accepts Assistant chat URLs and surfaces Kagi error.json stream details for inaccessible migrated chats
command: cargo test api::tests::assistant_thread_get_migration_regression -- --exact
tags: [spec, assistant-thread-migration, implemented]

## errors
- label: runtime command failures can opt into JSON stderr with --error-format json or KAGI_ERROR_FORMAT=json
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ Before `1.0.0`, breaking changes may still ship in minor releases.

## [Unreleased]

### Fixed

- Assistant `thread list`, `thread get`, `thread export`, and `thread delete` now use Kagi's current Assistant conversation API, so new `assistant.kagi.com/chat/<uuid>` chats work instead of failing on missing legacy stream frames.

## [0.14.1]

### Fixed
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,10 @@ list or export Assistant threads:
```bash
kagi assistant thread list
kagi assistant thread export <THREAD_ID>
kagi assistant thread get https://assistant.kagi.com/chat/<THREAD_ID>
```

`kagi assistant thread list` automatically follows Kagi's pagination cursor so large chat histories are returned in one response.
`kagi assistant thread list` automatically follows Kagi's pagination cursor so large chat histories are returned in one response. Thread get/export/delete commands also accept Kagi Assistant chat URLs.

manage custom assistants:

Expand Down
1 change: 1 addition & 0 deletions docs/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ kagi assistant thread list

# Get one thread as JSON
kagi assistant thread get "<thread-id>"
kagi assistant thread get "https://assistant.kagi.com/chat/<thread-id>"

# Export thread
kagi assistant thread export "<thread-id>" --format markdown > thread.md
Expand Down
11 changes: 6 additions & 5 deletions docs/commands/assistant.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -193,31 +193,32 @@ List Assistant threads for the current account.
kagi assistant thread list | jq -r '.threads[].id'
```

### `kagi assistant thread get <THREAD_ID>`
### `kagi assistant thread get <THREAD_ID_OR_CHAT_URL>`

Fetch one thread with its messages.
Fetch one thread with its messages. This accepts either the thread ID or a Kagi Assistant chat URL.

```bash
kagi assistant thread get "$THREAD_ID"
kagi assistant thread get "https://assistant.kagi.com/chat/$THREAD_ID"
```

### `kagi assistant thread delete <THREAD_ID>`
### `kagi assistant thread delete <THREAD_ID_OR_CHAT_URL>`

Delete one thread.

```bash
kagi assistant thread delete "$THREAD_ID"
```

### `kagi assistant thread export <THREAD_ID>`
### `kagi assistant thread export <THREAD_ID_OR_CHAT_URL>`

Export one thread as markdown to stdout.

```bash
kagi assistant thread export "$THREAD_ID"
```

### `kagi assistant thread export <THREAD_ID> --format json`
### `kagi assistant thread export <THREAD_ID_OR_CHAT_URL> --format json`

Return the thread as structured JSON instead of markdown. This emits the same envelope shape as `thread get`.

Expand Down
Loading