Skip to main content

keep-memory

The engineering wiki for AI agents

Track architecture decisions, observations, and knowledge as git-native markdown files with validation, knowledge graphs, and agent session memory.

Features

  • Typed Concepts — Decisions, Observations, APIs, Tables, Metrics, Projects, Sessions, Plans, Snapshots
  • Knowledge Graphs — Automatic link extraction, traversal, backlinks, and networkx export
  • Agent Memory — Session tracking, plan execution with step completion, state snapshots
  • Git-Native — Auto-commit on agent actions, revert to any state, full history
  • Validation — 3-level validation (bundle integrity, concept quality, cross-concept consistency)
  • Search — Full-text search with inverted index and optional fuzzy matching
  • MCP-Ready — Model Context Protocol server placeholder for AI tool integration

Quick Start

pip install -e .

# Initialize a knowledge bundle in your project
keep init

# Create a decision
keep create decision "Use PostgreSQL" --tags database,backend

# Search your knowledge base
keep search "postgresql"

# Validate for inconsistencies
keep validate

# View knowledge graph
keep graph

# Session tracking
keep session start
keep plan create "Refactor auth" --steps "extract module,write tests,update docs"
keep plan step "plans/refactor-auth_2024-01-15" 0 --result "module extracted"
keep snapshot --note "mid-refactor checkpoint"

Concept Format

---
id: use-postgresql
type: Decision
status: Active
tags: [database, backend]
author: eliasz
rationale: "Need relational database for structured data"
consequences:
  - "ACID transactions available"
  - "Requires connection pooling"
supersededBy: null
timestamp: 2024-07-15T10:30:00Z
---

# Body: Markdown content

Python API

from keep_memory import AgentMemory, GraphExtractor, MemoryMixin

# Agent memory with sessions, plans, and snapshots
memory = AgentMemory("./.keep-memory", agent_id="my-agent")
memory.start_session("session-1")
memory.record_decision("Use Redis", rationale="Cache layer needed")
memory.create_plan("Deploy v2", ["build", "test", "deploy"])
memory.snapshot(note="pre-deploy")

# Knowledge graph
from keep_memory import OKFBundle, GraphExtractor
bundle = OKFBundle.load()
graph = GraphExtractor(bundle)
edges = graph.get_edges()
tree = graph.traverse("architecture/overview", max_depth=2)

Development

Prerequisites: Python 3.10+ and git.

python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install -e ".[dev]"
pytest

License

Apache License 2.0

Metadata

Release files for keep-memory 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for keep-memory 0.2.0
File Size Uploaded Provenance Actions
keep_memory-0.2.0.tar.gz 49.2 kB With provenance Details for keep_memory-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for keep-memory 0.2.0
File Interpreter ABI Platform Actions
keep_memory-0.2.0-py3-none-any.whl Python 3 none any Details for keep_memory-0.2.0-py3-none-any.whl

Total release size: 93.5 kB

Release files / keep_memory-0.2.0.tar.gz

Download URL keep_memory-0.2.0.tar.gz
Size 49.2 kB
Tags Source
SHA-256 checksum
How to use checksums
63163647c4e720149a492c5dbd60b2fea6c7a4ca13a702f24683343ec396fe46
BLAKE2b-256 checksum
How to use checksums
6a55dce352495fb07d366edc5801b47242c0e14e711b403997603499ba9446fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Release files / keep_memory-0.2.0-py3-none-any.whl

Download URL keep_memory-0.2.0-py3-none-any.whl
Size 44.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bd283802bbe329ed4f0f5345305270e9b0a6a5579942b4f5a0741dcf65cf1c61
BLAKE2b-256 checksum
How to use checksums
dc57a3336328b5d1df328f12ba57f5bae951fa42e53986352ecb3c9fa2786240
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Security for keep-memory 0.2.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for keep_memory-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page