mimirassets

package module
v0.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2026 License: MIT Imports: 5 Imported by: 0

README

Mimir

Private memory for coding agents

Mimir records what your coding agents attempted, which models and files were involved, what failed, and whether the work landed. The Worker, storage, and private dashboard run inside your Cloudflare account. Agents can search prior sessions before trying the same approach again.

Get started

Install the latest checksum-verified release. During installation, select the coding agent you use so Mimir can install its integration.

macOS and Linux:

curl -fsSL https://raw.githubusercontent.com/cloudboy-jh/mimir/master/install.sh | sh

Windows PowerShell:

irm https://raw.githubusercontent.com/cloudboy-jh/mimir/master/install.ps1 | iex

Default integration locations on macOS and Linux:

Harness Installed integration Activate
OpenCode ~/.config/opencode/plugins/mimir.ts Restart OpenCode
Pi ~/.pi/agent/extensions/mimir.ts Restart Pi
Oh My Pi ~/.omp/agent/extensions/mimir.ts Restart Oh My Pi
Hermes ~/.hermes/plugins/mimir/ Restart Hermes
Claude Code ~/.claude/skills/mimir/ (plugin manifest and hooks) /reload-plugins or restart
Codex ~/.agents/plugins/plugins/mimir/ (marketplace plugin and hooks) Restart Codex
Cursor ~/.cursor/hooks.json Open or continue an agent session

Configured agent homes and active profiles can change these paths; on Windows, Hermes defaults to %LOCALAPPDATA%\hermes\plugins\mimir\. Run mimir harness to inspect selected integrations. See integration details for ownership and path variations.

Want to look around first? mimir demo opens a local dashboard with synthetic sessions. It needs no Cloudflare account, connection, model credentials, Node.js, Bun, or Go. Demo changes reset on reload; it does not capture your work.

Capture your first session

A fresh deployment requires a Cloudflare account, an OpenRouter API key, Node.js 22 with npm, and network access to npm and Cloudflare. You do not need Bun, Go, or a source checkout.

mimir setup

Setup deploys the embedded Worker and dashboard, provisions D1 and R2, registers this machine, and stores the OpenRouter key as a Worker secret. It reads OPENROUTER_API_KEY first, reuses an existing Worker secret, or asks through a masked prompt. If the installer did not enroll your agent, run mimir install and select it; setup does not silently add integrations.

Apply the activation action above, then check the deployment and active integration:

mimir doctor --json

Resolve any failed checks using the reported action. In the activated agent, start a normal session and send a real prompt. Then find its ID and check that its capture was saved:

mimir list --json
mimir session status <id> --json

The status receipt is the authority for durable capture. A successful model response or a queued capture does not prove the exchange was saved. Do not use a paid model route merely to test deployment connectivity. See installation and first-session verification if you need the exact activation or recovery steps.

Open the private dashboard

Cloudflare Access is optional during setup, but required to use the deployed private dashboard in a browser. If you did not configure it during setup, run:

mimir access
mimir dashboard

The dashboard leads with sessions, outcomes, and capture state; requests are supporting evidence. It also shows harnesses, models, provider-reported cache reads and writes, and token usage.

Mimir private dashboard showing captured coding-agent sessions, outcomes, capture state, models, and token usage.

Use the memory

Ask an installed agent for recent sessions, prior decisions, or evidence. The mimir-use skill queries the machine-readable CLI and presents readable results instead of raw JSON. Pi and Oh My Pi expose the exact active session as MIMIR_SESSION_ID; OpenCode supplies native status and outcome tools. After meaningful work, the skill records an evidenced outcome before fetching the capture receipt.

You can also search and inspect sessions yourself:

mimir search "token validation" --json
mimir session get <id> --json
mimir session outcome <id> landed --reason "merged in PR 42"

Mimir keeps capture state (Empty, Pending, Saved, Failed, or Partial) separate from work outcome (Landed, Discarded, Abandoned, or Unresolved). A saved exchange does not mean the work landed. Sessions can retain independent Git patches across commits even when work was discarded or abandoned.

To recover supported local Pi or OpenCode history, run mimir import in a terminal. Use mimir backfill to repair gaps. Hermes history is not imported automatically, and the current import command does not support Hermes. See import and backfill commands.

What gets captured

A session is one episode of agent work, not a bag of disconnected requests. Mimir combines model exchanges, harness lifecycle events, and Git evidence so you can inspect the task, repository, models, files, errors, and result.

Path Evidence
OpenRouter traffic routed through Mimir Full redacted request and response, including streamed responses
Pi, Oh My Pi, OpenCode, Claude Code, Codex, and Cursor direct or subscription paths Bounded prompt and response reconstructions where supported; not provider transport archives
Hermes direct providers (including Codex and Nous) Bounded request/response reconstructions and supported tool interactions from Hermes hooks; not provider transport archives

x-mimir-session is the authoritative session boundary when available. Traffic without an exact ID uses bounded inactivity grouping. The Worker redacts before writing full exchanges and imported Git patches to R2; searchable metadata and R2 references live in D1. Redaction reduces accidental retention but cannot guarantee that every secret is removed. Local code recall stays in <repo>/.mimir/index.json and is not uploaded.

The agent harness captures full proxy exchanges, reconstructed direct-provider turns, and lifecycle events. The private Mimir Worker makes that evidence durable, while the separate CLI handles setup and search.

There is no Mimir account or hosted backend. Machine requests use per-machine bearer tokens; deployed dashboard APIs and redacted logs require verified Cloudflare Access JWTs. Mimir uses your account's shared Cloudflare allowances, not a dedicated free quota. See capture fidelity and Free plan units and session lifecycle and capture boundaries for the detailed guarantees.

More paths

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Bundle embed.FS

Bundle contains the production integrations, skills, Worker sources, and compiled dashboard shipped with the CLI. Tests, dashboard build inputs, Wrangler state, and dependency directories are deliberately not embedded.

View Source
var LogoPNG []byte

LogoPNG is the Mimir wordmark used by interactive setup.

Functions

This section is empty.

Types

type BundleFile

type BundleFile struct {
	Path   string `json:"path"`
	SHA256 string `json:"sha256"`
	Size   int64  `json:"size"`
}

BundleFile describes an embedded file. SHA256 is calculated from the bytes in the compiled bundle rather than from release metadata.

func BundleMetadata

func BundleMetadata() ([]BundleFile, error)

BundleMetadata returns stable, path-sorted metadata for every bundled file.

Directories

Path Synopsis
cmd
mimir command
internal
ui/bentotui
Package bentotui is Mimir's dependency-free terminal rendering system.
Package bentotui is Mimir's dependency-free terminal rendering system.
ui/lineoutput
Package lineoutput renders stable, append-only command transcripts.
Package lineoutput renders stable, append-only command transcripts.
ui/selector
Package selector provides a bounded, human-only terminal checklist.
Package selector provides a bounded, human-only terminal checklist.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL