Metadata-Version: 2.4
Name: memorytrace
Version: 0.1.0
Summary: AI agent memory system with SQLite+FTS5, MCP integration, and quality gates
Project-URL: Homepage, https://github.com/engram-memory/engram
Project-URL: Issues, https://github.com/engram-memory/engram/issues
License-Expression: MIT
License-File: LICENSE
Keywords: agent,ai,fts5,llm,mcp,memory,sqlite
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
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: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.5.0; extra == 'dev'
Provides-Extra: full
Requires-Dist: engram[llm]; extra == 'full'
Requires-Dist: engram[mcp]; extra == 'full'
Requires-Dist: engram[semantic]; extra == 'full'
Provides-Extra: llm
Requires-Dist: anthropic>=0.40.0; extra == 'llm'
Requires-Dist: openai>=1.50.0; extra == 'llm'
Provides-Extra: mcp
Requires-Dist: mcp>=1.0.0; extra == 'mcp'
Provides-Extra: semantic
Requires-Dist: numpy>=1.24.0; extra == 'semantic'
Description-Content-Type: text/markdown

# Engram

AI agent memory that learns across conversations.

## Install

```bash
pip install git+https://github.com/aop60003/default.git
```

## Use

```bash
engram save "Minseong Jeong is the Space King of Galaxy Corp"
engram find "Space King"
engram who "Minseong Jeong"
```

That's it. 3 commands. No config, no API keys, no database setup.

## All Commands

```
engram save "text"                   Save information (auto-extracts entities & facts)
engram find "query"                  Search memory
engram who "name"                    Look up a person/org
engram remember "name" "fact"        Manually remember something
engram all                           List everything
engram status                        Health check
engram forget "name"                 Delete an entity
engram export                        Export to Markdown files
```

## Examples

```bash
# Store meeting notes
engram save "Met Alice Johnson, VP of Engineering at Google. Discussed cloud AI partnership."

# Store Korean
engram remember "정민성" "AI와 우주 탐사에 관심이 많다"

# Search later
engram find "Google partnership"
engram who "Alice Johnson"

# Check status
engram status
```

## What It Does Automatically

- **Extracts** people & organizations from text (English, Korean, Chinese, Japanese)
- **Masks PII** — phone numbers, credit cards, emails become `[REDACTED]`
- **Deduplicates** — same fact won't be stored twice
- **Detects conflicts** — "CEO" then "CTO" for same person gets flagged
- **Generates summaries** — auto-summary when you don't provide one
- **Learns across sessions** — every conversation builds on previous ones

## For Claude Code Users

Add slash commands to use memory inside Claude Code:

```bash
# Copy command files
mkdir -p ~/.claude/commands
# See docs/04-usage-guide/02-claude-code-setup.md for details
```

Then use: `/memory-save`, `/memory-find`, `/memory-who`, `/memory-remember`, `/memory-status`

## For Developers (Python SDK)

```python
from engram.integrations.sdk import EngramSDK

with EngramSDK() as sdk:
    sdk.store("Minseong Jeong is the Space King of Galaxy Corp")
    result = sdk.search("Space King")
    print(result.to_agent_context())
```

## How It Works

```
Text → NER Extraction → Quality Gate → SQLite+FTS5 → BM25 Search
                              ↓
                     Confidence Scoring
                     PII Masking
                     Duplicate Check
                     Conflict Detection
```

- **Storage**: SQLite + FTS5 (zero dependencies, genuine BM25)
- **Export**: Markdown files for human reading
- **Session**: Context carries over between conversations

## License

MIT
