# Grok Bot

> Import Grok Bot conversations, read cached weekly usage, and inspect observed connectors and Bots.

Grok Bot is a separate source from Grok Build, Grok chat, and Cursor.

```sh
hansard import --source grok-bot --since all
```

Hansard reads local Grok Bot transcript replicas and recorded Bot titles.
The watcher observes new replica saves. Each capture preserves earlier
records, even after the app removes them from its rolling cache.

Local replicas and cloud history use the same account and Bot identity.
Reimporting local replicas merges earlier duplicate copies when their
complete records establish one conversation. Hansard retains the earlier
evidence in the surviving conversation. Ambiguous copies stay separate.

Grok Bot keeps at most 200 records per local replica. A local import cannot
recover conversations that never reached that cache. Hansard labels this
history as incomplete.

The importer preserves messages, structured cards, recorded tools, errors,
approvals, and agent relationships. Models appear only when the source records
them. File, image, audio, and MCP app references do not include original bytes.
Private forms, credentials, authentication fields, and URL queries are excluded.

Set `HANSARD_GROK_BOT_DIR` to use a different Grok Bot user-data directory.
The default is the platform's Electron user-data directory for Grok Bot.

## Cloud history

Turn on **Grok Bot cloud history** under **Settings → Imports → Cloud agents**
to request older conversations from Grok Bot's own service. This source starts
off and refreshes every six hours when enabled. It reads the active Grok Bot
sign-in only when an import runs. Hansard never refreshes tokens or changes
Grok Bot settings.

On macOS, Keychain may request access to Grok Bot Safe Storage. The request
names `security`, the macOS tool that reads the item for Hansard. Choose
**Always Allow** to keep the request from coming back. Hansard waits two
minutes for an answer, then stops waiting and ends its `security` process.
Other imports keep running while a request waits. After an allowed request,
the running watcher keeps the sign-in in memory. It asks again only after Grok
Bot saves a new sign-in or the watcher restarts. Hansard writes the sign-in
nowhere.

If the request is denied, dismissed, or not answered, Hansard does not ask
again until the next scheduled refresh six hours later or a retry of the
import. The Grok Bot cloud history row in **Settings → Imports → Cloud agents**
then explains the request.

```sh
hansard import --sources grok-bot-cloud --since all
```

The importer traverses history pages, checks for changes before saving, and
backs off after failures. It retains earlier archived records. A truncated Bot
inventory remains incomplete. Native cloud retrieval still requires verification
with Grok Bot 0.72.1. Encrypted sign-in on Windows and Linux is not supported yet.

## Usage and plugins

Accounts reads Grok Bot's cached weekly percentage, reset time, and plan label.
Expired readings show as stale. These readings remain separate from Grok Build.

Skills and plugins lists cached connector logos and Bots. Cloud history also
saves connector settings and template metadata. **Observed in cache** does not
mean that a connector is signed in. Local MCP installation and cloud skill
content remain unavailable.
