psg_recall
Usage
Installation
Install latest from the GitHub repository:
$ pip install git+https://github.com/problemsolversguild/psg_recall.git
or from pypi
$ pip install psg_recall
Documentation
Documentation can be found hosted on this GitHub repository’s pages. Additionally you can find package manager specific guidelines on pypi.
How to use
psg_recall provides persistent memory storage at three levels:
- Global - Memories shared across all projects (stored in
~/.solveit_memory/) - Project - Memories for the current project directory (stored in
.memory/) - File - Memories tied to a specific file (stored in
.memory/{filename}_memory.txt)
from psg_recall.storage import remember, recall, recall_all, recall_history, forget
Storing memories
Use
remember()
to store a key-value pair. By default it stores at the project level:
# Store a project-level memory
remember("user_name", "Alice")
'Remembered (project): user_name'
# Store a global memory (available across all projects)
remember("api_preference", "openai", level="global")
'Remembered (global): api_preference'
# Store a file-specific memory (context specifies the filename)
remember("last_edit", "fixed bug on line 42", level="file", context="main.py")
'Remembered (file): last_edit'
Recalling memories
Use
recall()
to retrieve memories from a specific level. Returns None if the key
doesn’t exist:
# Recall a specific key from project level
recall(key="user_name")
'Alice'
# Recall all project-level memories
recall()
'user_name: Alice\nproject_goal: Build a chatbot for customer support\ntech_stack: The tools and programming languages being used are Python with FastAPI'
# Recall from global level
recall(level="global")
'api_preference: openai'
Recalling from all levels
Use
recall_all()
to get memories from global, project, and file levels combined:
# Get all memories across all levels
print(recall_all(context="main.py")) # include file context to also get file-level memories
=== GLOBAL ===
api_preference: openai
=== PROJECT ===
user_name: Alice
project_goal: Build a chatbot for customer support
tech_stack: The tools and programming languages being used are Python with FastAPI
=== FILE ===
last_edit: fixed bug on line 42
Forgetting memories
Use
forget()
to remove a key from memory. This also records the removal in history:
# Forget a project-level memory
forget("user_name")
'Forgot (project): user_name'
Viewing history
Use
recall_history()
to see past changes to memories, including timestamps and whether values
were remembered or forgotten:
# View all history for project level
print(recall_history())
2026-01-05 04:33:41 | remember | user_name | Alice
2026-01-05 04:33:41 | forget | user_name | Alice
2026-01-05 04:33:57 | remember | user_name | Alice
2026-01-05 04:33:57 | forget | user_name | Alice
2026-01-13 04:37:33 | user_name | remember | Alice
2026-01-13 04:41:06 | user_name | remember | Alice
2026-01-13 04:41:21 | user_name | remember | Alice
2026-01-13 04:41:21 | user_name | forget | Alice
# View history for a specific key
print(recall_history(key="user_name"))
2026-01-05 04:33:41 | remember | user_name | Alice
2026-01-05 04:33:41 | forget | user_name | Alice
2026-01-05 04:33:57 | remember | user_name | Alice
2026-01-05 04:33:57 | forget | user_name | Alice
2026-01-13 04:37:33 | user_name | remember | Alice
2026-01-13 04:41:06 | user_name | remember | Alice
2026-01-13 04:41:21 | user_name | remember | Alice
2026-01-13 04:41:21 | user_name | forget | Alice
<<<<<<< HEAD
Memory Index
The memory index automatically catalogs all memory files in your project, making it easy for you (or AI agents) to quickly understand what information is available and where to find it.
The index is completely automatic - it’s created and updated in the
background every time you
remember()
or
forget()
something. You never need to manually create or update it.
from psg_recall.storage import get_index
# Get the current index (auto-creates if needed)
index = get_index()
# Display what's available
print("Available Memory Files:")
for filename, info in index['files'].items():
print(f"\n {filename} ({info['type']} level)")
print(f" {info['summary']}")
print(f" Keys: {', '.join(info['sample_keys'][:3])}")
The index is stored in .memory/index.json and contains: - Summary
of what each memory file contains - Number of keys in each file -
Sample keys for quick reference - Topics extracted from key
names - File type (global, project, or file-level) - Last
modified timestamp
Disabling Auto-Index (Optional)
If you need to disable automatic indexing for performance-critical scenarios:
import os
os.environ['RECALL_DISABLE_INDEX'] = 'true'
Manual Rebuild
If you ever need to manually rebuild the index (e.g., for repair):
from psg_recall.storage import rebuild_index
rebuild_index()
=======
5af5484 (hopefully fixing issue with memory_tool)
Export
from nbdev import nbdev_export
from nbdev.quarto import nbdev_docs
nbdev_export()
nbdev_docs()
pandoc -o README.md
to: >-
commonmark+autolink_bare_uris+emoji+footnotes+gfm_auto_identifiers+pipe_tables+strikeout+task_lists+tex_math_dollars
output-file: index.html
standalone: true
default-image-extension: png
variables: {}
metadata
description: A library to help facilitate memory recall
title: psg_recall
Output created: _docs/README.md
[1/3] 00_recall.ipynb
[2/3] 01_storage.ipynb
[3/3] index.ipynb
Output created: _docs/index.html
Metadata
Release files for psg-recall 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| psg_recall-0.1.1.tar.gz | 17.5 kB | Without provenance | Details for psg_recall-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| psg_recall-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for psg_recall-0.1.1-py3-none-any.whl |
Total release size: 33.8 kB
Release files / psg_recall-0.1.1.tar.gz
| Download URL | psg_recall-0.1.1.tar.gz |
|---|---|
| Size | 17.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
49d57cc44f5aa974fc07f1c05b9aa2fe914b5762278a35d017a0ae6f5c961cc5
|
|
BLAKE2b-256 checksum How to use checksums |
937831b503d2946ea58dd3f2606c0c0bb9783a8881abffa790332ef69deb1fb8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / psg_recall-0.1.1-py3-none-any.whl
| Download URL | psg_recall-0.1.1-py3-none-any.whl |
|---|---|
| Size | 16.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d4983cbe2ba5312b9ce1c2cab02b35c44211214d60aa741a6032a3229875726d
|
|
BLAKE2b-256 checksum How to use checksums |
6c5dcb8a0facd8a21bed5cadaf71be5182001c5b8d311a6620c54914947dbff2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Security for psg-recall 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.