Skip to main content

Aider integration for Hindsight - persistent long-term memory across pair-programming sessions

Project description

hindsight-aider

Persistent long-term memory for Aider, powered by Hindsight.

hindsight-aider is a drop-in wrapper for the aider command. It recalls relevant project memory before each session (injected into Aider's context via a read-only file) and retains the session transcript afterwards — so every Aider session starts with what you've learned before and saves what it learns for next time. Memory is scoped per git repo.

How it works

Aider has no MCP client or per-prompt hook, but it does load read-only context files and writes a chat-history file. The wrapper uses both:

  • Recall (before): queries Hindsight, writes the results to .aider.hindsight-memory.md, and launches aider --read .aider.hindsight-memory.md … so the memory is in context. If you run aider -m "fix the auth bug", that message is used as the recall query; otherwise a general project-context query.
  • Retain (after): when Aider exits, the wrapper reads the slice of the chat-history file written during the session and retains it to the repo's bank.

Recall is once per session (Aider can't be hooked mid-conversation), which fits its session-oriented workflow.

Install

pip install hindsight-aider          # also needs aider installed: pip install aider-chat
export HINDSIGHT_API_TOKEN=hsk_...    # omit for an open self-hosted server

Usage

Use it exactly like aider — all arguments pass straight through:

hindsight-aider                         # interactive, project memory loaded
hindsight-aider -m "add retry logic"    # one-shot; recall uses the message
hindsight-aider src/app.py tests/       # any aider args

Use Hindsight Cloud or a self-hosted server with HINDSIGHT_API_URL=http://localhost:8888.

Configuration

Settings come from ~/.hindsight/aider.json or environment variables:

Setting Env var Default
API URL HINDSIGHT_API_URL https://api.hindsight.vectorize.io
API token HINDSIGHT_API_TOKEN (none; required for Cloud)
Bank id HINDSIGHT_AIDER_BANK_ID (git repo name)
Auto-recall HINDSIGHT_AIDER_AUTO_RECALL true
Auto-retain HINDSIGHT_AIDER_AUTO_RETAIN true
Aider command HINDSIGHT_AIDER_COMMAND aider

The bank defaults to the git repo name so a project's memory is shared with the other Hindsight editor integrations on the same repo.

Development

uv sync
uv run pytest tests -v -m 'not requires_real_llm'   # deterministic suite
uv run pytest tests -v -m requires_real_llm          # gated live retain/recall

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hindsight_aider-0.1.1.tar.gz (93.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hindsight_aider-0.1.1-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file hindsight_aider-0.1.1.tar.gz.

File metadata

  • Download URL: hindsight_aider-0.1.1.tar.gz
  • Upload date:
  • Size: 93.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hindsight_aider-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3ac58ed2d5be2c8e54f7309cdfbe5372a13cd625e6c1db9f3a080bfe953ccbb1
MD5 ed491f7db1254096be9f18ff11d249df
BLAKE2b-256 db415a420509585552f21c9797428e3c5756b692469ad659104dd75d505523aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for hindsight_aider-0.1.1.tar.gz:

Publisher: release-integration.yml on vectorize-io/hindsight

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hindsight_aider-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: hindsight_aider-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hindsight_aider-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 97e0b8d22c80988263da6c54108142533a087497d9d82d24350ea4cac358f69d
MD5 3a764884cd466c25cf47ac9c46ddcec0
BLAKE2b-256 b98fd4199b152392bbe92807caf988858b0d32c96dc11150bc15f2eba0fc9292

See more details on using hashes here.

Provenance

The following attestation bundles were made for hindsight_aider-0.1.1-py3-none-any.whl:

Publisher: release-integration.yml on vectorize-io/hindsight

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page