This project has been archived by its maintainers, and is no longer receiving any updates.
autourgos-episodic-memory
Structured task/outcome log for Autourgos agents. Unlike the
freeform conversational recall the rest of the memory family provides, EpisodicMemory
records what was tried and what happened — so a future run can check "have I attempted
this before, and did it work?" before repeating a known-bad approach.
from autourgos_episodic_memory import EpisodicMemory
memory = EpisodicMemory(db_path="episodes.db") # persists across restarts
memory.remember(
task="Deploy the app to production",
outcome="fail",
actions_taken=["ran deploy.sh", "hit permission error on S3 bucket"],
notes="Needs IAM role update before retrying.",
)
for episode in memory.retrieve("deploying the app", top_k=3):
print(episode.metadata["outcome"], "-", episode.content)
Table of Contents
Install
pip install autourgos-episodic-memory
Depends on autourgos-memory and autourgos-semantic-memory (its TF-IDF KeywordRetriever
does the relevance scoring — this package doesn't reimplement it). SQLite persistence is
stdlib, no extra dependency.
Why a separate package
The rest of the memory family stores conversation (what was said). EpisodicMemory stores
attempts (what was done and whether it worked) — a different shape of data with its own
outcome field ("success" / "fail" / "partial") and actions_taken list, not a chat
turn. Keeping it separate from autourgos-vector-memory/autourgos-semantic-memory avoids
conflating "recall a relevant past conversation" with "recall a relevant past task result."
Quick Start
from autourgos_episodic_memory import EpisodicMemory
memory = EpisodicMemory(db_path="agent_episodes.db", max_episodes=500)
memory.remember(
task="Fix the failing test suite",
outcome="success",
actions_taken=["reran pytest -x", "found stale fixture", "regenerated fixture"],
)
memory.remember(
task="Fix the failing test suite",
outcome="fail",
actions_taken=["tried deleting __pycache__"],
notes="Did not address the root cause.",
)
# Before trying again, check what happened last time:
past = memory.retrieve("failing test suite", top_k=5)
for ep in past:
print(f"[{ep.metadata['outcome']}] {ep.metadata['task']}")
db_path=":memory:" (the default) keeps everything in RAM for the process lifetime. Pass a
real file path for recall across restarts — episodes are reloaded and re-indexed on the next
EpisodicMemory(db_path=...) construction.
EpisodicMemory supports the context-manager protocol, closing its connection automatically:
with EpisodicMemory(db_path="agent_episodes.db") as memory:
memory.remember(task="Deploy the app", outcome="success")
# connection is closed here automatically
Constructor Reference
EpisodicMemory
| Parameter | Type | Default | Description |
|---|---|---|---|
db_path |
str |
":memory:" |
SQLite file path, or :memory: for no persistence |
max_episodes |
int, optional |
None |
Oldest episodes dropped once this count is exceeded |
EpisodicMemory.remember(task, outcome, actions_taken=None, notes="")
| Parameter | Type | Required | Description |
|---|---|---|---|
task |
str |
yes | What was attempted. Non-empty. |
outcome |
str |
yes | One of "success", "fail", "partial" |
actions_taken |
list[str] |
no | Steps taken during the attempt |
notes |
str |
no | Freeform extra context (why it failed, what to try next, etc.) |
Returns an Episode (frozen dataclass with task/outcome/actions_taken/notes/timestamp).
EpisodicMemory.retrieve(query, top_k=5)
Returns a list of autourgos_memory.Document, ranked by TF-IDF relevance to query. Each
Document.metadata carries task, outcome, actions_taken, notes, timestamp.
License
Apache License 2.0 — see LICENSE.
Metadata
Release files for autourgos-episodic-memory 1.0.2
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 |
|---|---|---|---|---|
| autourgos_episodic_memory-1.0.2.tar.gz | 18.2 kB | Without provenance | Details for autourgos_episodic_memory-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| autourgos_episodic_memory-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for autourgos_episodic_memory-1.0.2-py3-none-any.whl |
Total release size: 33.5 kB
Release files / autourgos_episodic_memory-1.0.2.tar.gz
| Download URL | autourgos_episodic_memory-1.0.2.tar.gz |
|---|---|
| Size | 18.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ddfa494d267cd07ba2dfebaf700fdc0db07a157cd86550c3cdd2b32ef8a49ae6
|
|
BLAKE2b-256 checksum How to use checksums |
128506446566f148067a4aa8198bae373d0c7dd9abb3ca6e59c8da762577c875
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Release files / autourgos_episodic_memory-1.0.2-py3-none-any.whl
| Download URL | autourgos_episodic_memory-1.0.2-py3-none-any.whl |
|---|---|
| Size | 15.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c55cb2f33d416eadd04ed677d7749c67ab0e40725c6f63004634c842a87ba735
|
|
BLAKE2b-256 checksum How to use checksums |
7df913c437ca092d6bba05717431f98c13c18172e5fb3f4458a41d1afd440e99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Security for autourgos-episodic-memory 1.0.2
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.