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 launchesaider --read .aider.hindsight-memory.md …so the memory is in context. If you runaider -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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ac58ed2d5be2c8e54f7309cdfbe5372a13cd625e6c1db9f3a080bfe953ccbb1
|
|
| MD5 |
ed491f7db1254096be9f18ff11d249df
|
|
| BLAKE2b-256 |
db415a420509585552f21c9797428e3c5756b692469ad659104dd75d505523aa
|
Provenance
The following attestation bundles were made for hindsight_aider-0.1.1.tar.gz:
Publisher:
release-integration.yml on vectorize-io/hindsight
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hindsight_aider-0.1.1.tar.gz -
Subject digest:
3ac58ed2d5be2c8e54f7309cdfbe5372a13cd625e6c1db9f3a080bfe953ccbb1 - Sigstore transparency entry: 2022927653
- Sigstore integration time:
-
Permalink:
vectorize-io/hindsight@a6b0f82124e3d54e848c88e4e2e136772a76f5ce -
Branch / Tag:
refs/tags/integrations/aider/v0.1.1 - Owner: https://github.com/vectorize-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-integration.yml@a6b0f82124e3d54e848c88e4e2e136772a76f5ce -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97e0b8d22c80988263da6c54108142533a087497d9d82d24350ea4cac358f69d
|
|
| MD5 |
3a764884cd466c25cf47ac9c46ddcec0
|
|
| BLAKE2b-256 |
b98fd4199b152392bbe92807caf988858b0d32c96dc11150bc15f2eba0fc9292
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hindsight_aider-0.1.1-py3-none-any.whl -
Subject digest:
97e0b8d22c80988263da6c54108142533a087497d9d82d24350ea4cac358f69d - Sigstore transparency entry: 2022927935
- Sigstore integration time:
-
Permalink:
vectorize-io/hindsight@a6b0f82124e3d54e848c88e4e2e136772a76f5ce -
Branch / Tag:
refs/tags/integrations/aider/v0.1.1 - Owner: https://github.com/vectorize-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-integration.yml@a6b0f82124e3d54e848c88e4e2e136772a76f5ce -
Trigger Event:
push
-
Statement type: