Skip to main content

Persistent local memory for AI agents. Remembers everything.

Project description

nemp

Persistent local memory for AI agents. Remembers everything.

Zero dependencies. Pure Python. One-line integration.

from nemp import recall_all

memories = recall_all("/app")
# {"framework": "FastAPI", "database": "MongoDB", "auth": "Google OAuth", ...}

Why

AI agents forget everything between sessions. Every time you start a new session, you re-explain your stack, your decisions, your preferences.

Nemp fixes this. Agents remember across sessions, automatically.

Install

pip install nemp

Quick Start

from nemp import init, save, recall, context

# Auto-detect project stack
init("/path/to/project")

# Save a decision
save("database", "MongoDB with 3 collections: users, todos, categories",
     tags=["stack", "database"], agent_id="architect")

# Recall by keyword (with semantic expansion)
results = recall("db")  # finds "database" memories too

# Get full context for agent injection
ctx = context()

Emergent Integration (1 line)

# In Emergent's agent startup:
from nemp import inject_context

prompt = inject_context("/app", "You are a coding agent...")
agent = Agent(system_prompt=prompt)
# Agent now knows everything from all previous sessions

7 Functions

Function Description
init(path) Auto-detect stack, save as memories
save(key, value, tags, agent_id) Save a memory (auto-compresses)
recall(keyword) Search with semantic expansion
list_memories() List all memories
forget(key) Delete a memory
context() Full context as prompt-ready string
log(thought, agent_id) Log agent thoughts

Bonus:

  • recall_all(path) → Dict of all memories (Emergent one-liner)
  • inject_context(path, prompt) → Prepend context to system prompt

How It Works

Memories stored in .nemp/ directory as JSON:

project/
└── .nemp/
    ├── memories.json    # All memories
    ├── MEMORY.md        # Auto-generated index
    └── access.log       # Audit trail

Same format as the MCP server. Memories saved by Claude Code via MCP are readable by Emergent via Python, and vice versa.

Schema

[
  {
    "key": "database",
    "value": "MongoDB with 3 collections",
    "tags": ["stack", "database"],
    "timestamp": "2026-02-12T10:30:00.000Z",
    "agent_id": "architect",
    "source": "manual",
    "compressed": false
  }
]

Links

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nemp-0.1.0.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nemp-0.1.0-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file nemp-0.1.0.tar.gz.

File metadata

  • Download URL: nemp-0.1.0.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for nemp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0eacf9a3af2b46663be6841272775741c10f0c2f53e8098e64091b2b13c2fe30
MD5 6c96ff9529529e52761b8c213d75bc24
BLAKE2b-256 5773223d9e70bea05bddd96206b84215232883ec55408e79f57d0658c6b75193

See more details on using hashes here.

File details

Details for the file nemp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: nemp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for nemp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8a2c6b30f0275579ab298b1fc60895cb115a3c5b949c76f0079f47b0f3c3b2a8
MD5 eb8c6a9fb1b88c29c7a9ceafc1b4078d
BLAKE2b-256 c71260a5af4f342e80c5af670e2d903db4bdc608559e3279da1a251e95d3ffcd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page