Local-first history for AI coding agents

Keep supported agent runs in one searchable archive.

Agentrails captures provider-visible prompts, messages, tool activity, corrections, and outputs through approved local sources. It encrypts the original payload and builds a separate redacted search index on your machine. No browser scraping and no hosted Agentrails account.

  • Open source under Apache-2.0
  • Desktop app and CLI
  • Local capture and search available in v0.1
  • Automatic cloud backup not enabled yet
Agentrails desktop · DashboardOpen 4K Agentrails desktop dashboard showing archive totals, provider status, and recent threads

Actual desktop renderer with synthetic archive data. The complete 4K frame is shown without cropping.

v0.1 status

Know what works before you install.

The local archive is usable now. Cloud connection setup is also available, but linking a bucket does not start archive transfer.

AvailableCapture and import

Approved hooks, documented local history, and files you select.

AvailableLocal archive and search

Encrypted raw captures plus a separate redacted SQLite index.

AvailableReview, verify, and export

Desktop and CLI access with Markdown, JSONL, and portable ZIP exports.

AvailablePrivate bucket verification

OS-protected credentials and a temporary write, read, compare, delete probe.

Not enabledAutomatic cloud backup

No archive data uploads automatically in v0.1.

Not enabledClean-device restore

Recovery keys, encrypted manifests, retries, and restore tests must ship first.

The final answer is only half the value.

The path matters when you need to explain a code change, repeat a successful fix, or find where an agent went wrong. Agentrails keeps provider-visible events in order, records where they came from, and labels coverage as captured, partial, or unavailable.

01

Capture approved sources

Receive completed work through documented hooks, reconcile supported local history on a schedule, and import files only when you choose them.

No browser sessions, cookies, or private endpoints.
02

Protect the source material

Agentrails keeps immutable raw captures separate from the search index. Raw payloads are compressed and encrypted with AES-256-GCM.

The original evidence remains available for verification.
03

Search the visible history

A redacted local SQLite index covers prompts, assistant messages, tool activity, corrections, terminal output, and other events exposed by the provider.

Coverage labels state what was captured and what was unavailable.
04

Review and export

Open a thread in the desktop app or CLI, verify archive integrity, and export a portable copy as Markdown, JSONL, or ZIP.

Exports happen only when you request them.

Read a complete thread in one place.

The desktop app keeps messages and provider-visible events in their captured order. Open a thread, inspect event content, and export the thread without moving the rest of the archive.

Messages
User and assistant content
Agent activity
Tool calls, results, files, terminal output
Coverage
Captured, partial, or unavailable
Exports
Markdown, JSONL, and portable ZIP
Agentrails desktop · Thread detailOpen 4K Agentrails desktop thread detail showing messages and provider-visible events

Actual desktop renderer with synthetic event content. Open the image for the full-resolution view.

One archive for the agents you already use.

Codex CLI, Claude Code, Cursor, Gemini CLI, Windsurf, and Copilot CLI can feed the same archive through approved hooks or documented local history. Other supported agents enter through exports you select. Agentrails never scrapes a signed-in provider account.

Live hooks and local sync

Use hooks for completed work and scheduled reconciliation for supported local history.

Codex CLIHooks and documented local session reconciliation
Claude CodeCompletion hooks and documented project history
CursorOfficial user hooks and transcript snapshots
Gemini CLIHooks and documented project session files
Windsurf CascadeFull-conversation transcript hooks
GitHub Copilot CLIPersonal CLI hooks and transcript-backed completion

User-selected imports

Import official exports and documented history files without giving Agentrails provider account credentials.

  • ChatGPT account export
  • Claude account export
  • OpenCode
  • Cline
  • Aider
  • Continue
  • Roo Code history
Read the provider documentation

Run the same archive from the command line.

The CLI uses the same archive core and provider state as the desktop app. It works on a workstation or headless machine and supports JSON output for scripts.

Install from npmnpm install --global @agentrails/cliRequires Node.js 22.13 or newer.
Terminal showing Agentrails CLI help and version output

Rendered from the real agentrails help and version output at 3840 × 2160.

agentrails init

Create the local archive and encryption key.

agentrails providers list

Inspect available and connected providers.

agentrails sync

Reconcile documented local history and drain the queue.

agentrails search <query>

Search the redacted index with optional filters.

agentrails verify

Check raw objects, artifacts, and event integrity.

agentrails export <thread-id>

Write Markdown, JSONL, or portable ZIP.

The raw archive and search index stay separate.

Search needs readable normalized text. Evidence needs an unchanged source record. Agentrails stores them as separate layers with different jobs and security properties.

Read the full privacy model

Raw capture layer

Immutable payloads are gzip-compressed and encrypted with AES-256-GCM before entering the local archive.

  • Original provider-visible payload
  • Integrity hashes and source references
  • Owner-readable local key file in v0.1

Search layer

Normalized events are redacted before entering the local SQLite full-text index.

  • Thread and event search
  • Provider, surface, and kind filters
  • Local plaintext protected by filesystem permissions

Connect your bucket now. Backup stays off.

Pick any S3-compatible provider. The desktop app protects its credentials with operating-system storage and verifies the private bucket with a temporary write, read, compare, and delete check. No Agentrails account or Agentrails-hosted storage sits in the middle.

  • Cloudflare R2
  • Amazon S3
  • Backblaze B2
  • Wasabi
  • DigitalOcean Spaces
  • MinIO
  • Custom S3

Keep the traces your agents leave behind.

Install the CLI from npm or run the desktop app from source. Connect one approved agent source, confirm the first capture, and search it locally. S3-compatible bucket setup is optional in v0.1 and does not upload your archive.

Common questions

Short answers to the important limits.

Agentrails is explicit about coverage and storage because a partial trace and a complete account history are not the same thing.

Does Agentrails record everything an agent knows?

No. It stores only the messages and events exposed by an approved hook, documented history file, SDK event, or export. Hidden provider context remains unavailable, and every archived thread carries coverage details.

Does it need an Agentrails account?

No. Capture, encryption, search, review, integrity checks, and exports run locally. S3-compatible storage uses a bucket and credentials that you create with your chosen provider.

What is encrypted and what stays readable?

Original raw captures and stored attachment bytes use AES-256-GCM. The redacted SQLite search index, pending queue, provider state, and user-created exports remain local plaintext protected by filesystem permissions.

Can Agentrails upload my archive today?

No. The desktop app can protect credentials and verify bucket access, but automatic backup and clean-device restore are disabled in v0.1. Local capture and search do not require cloud storage.