ALMA - Agent Learning Memory Architecture
A local-first memory layer that sits underneath an AI agent's built-in memory, recording which strategies worked or failed on past tasks so future runs can reuse what succeeded.
Where built-in assistant memory typically stores facts and preferences such as a favorite editor theme, ALMA instead stores outcomes: which approach worked, which failed, and why, automatically turning three or more similar outcomes into a reusable strategy, and tracking anti-patterns with a stated reason and a better alternative. Retrieval combines four factors: similarity to the current situation, recency, past success rate and confidence, rather than only similarity or recency.
It is designed to complement, not replace, an assistant's own memory, is shared across multiple agents and platforms rather than isolated per session, and reports a recall score of 0.964 at five results on the 500-question LongMemEval benchmark. It installs as a Python package and defaults to a free local SQLite database, with PostgreSQL and Qdrant available as alternative backends.