Metadata-Version: 2.4
Name: nemp
Version: 0.1.0
Summary: Persistent local memory for AI agents. Remembers everything.
Author-email: Sukin Shetty <contact@nemp.dev>
License: MIT
Project-URL: Homepage, https://nemp.dev
Project-URL: Repository, https://github.com/SukinShetty/nemp-python
Project-URL: Documentation, https://nemp.dev/docs
Project-URL: Issues, https://github.com/SukinShetty/nemp-python/issues
Keywords: ai,memory,agents,llm,persistent,context,mcp
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# nemp

**Persistent local memory for AI agents. Remembers everything.**

Zero dependencies. Pure Python. One-line integration.

```python
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

```bash
pip install nemp
```

## Quick Start

```python
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)

```python
# 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](https://www.npmjs.com/package/nemp-mcp-server). Memories saved by Claude Code via MCP are readable by Emergent via Python, and vice versa.

## Schema

```json
[
  {
    "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

- Website: [nemp.dev](https://nemp.dev)
- MCP Server: [npm](https://www.npmjs.com/package/nemp-mcp-server)
- Claude Code Plugin: [GitHub](https://github.com/SukinShetty/Nemp-memory)
- Python Package: [GitHub](https://github.com/SukinShetty/nemp-python)

## License

MIT
