Metadata-Version: 2.4
Name: cognitive-memory
Version: 0.4.0
Summary: Biologically-inspired agent memory with decay, consolidation, and tiered storage
Project-URL: Homepage, https://github.com/bhekanik/cognitive-memory
Project-URL: Documentation, https://bhekanik.github.io/cognitive-memory
Project-URL: Repository, https://github.com/bhekanik/cognitive-memory
Project-URL: Issues, https://github.com/bhekanik/cognitive-memory/issues
Author: Bhekani Khumalo
License-Expression: MIT
Keywords: agents,ai,cognitive,decay,llm,memory
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.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.10
Requires-Dist: numpy>=1.24
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Provides-Extra: openai
Requires-Dist: openai>=1.0; extra == 'openai'
Description-Content-Type: text/markdown

# cognitive-memory

Biologically-inspired agent memory with decay, consolidation, and tiered storage.

[![PyPI version](https://img.shields.io/pypi/v/cognitive-memory.svg)](https://pypi.org/project/cognitive-memory/)

## Install

```bash
pip install cognitive-memory
```

Requires Python 3.10+.

## Quick Start

```python
from cognitive_memory import SyncCognitiveMemory

mem = SyncCognitiveMemory(embedder="hash")

mem.add("User is allergic to shellfish", category="core", importance=0.95)

response = mem.search("what allergies does the user have?")
for r in response.results:
    print(r.memory.content, f"(score: {r.combined_score:.2f})")
```

For production, use OpenAI embeddings (set `OPENAI_API_KEY`):

```python
from cognitive_memory import CognitiveMemory

mem = CognitiveMemory()  # defaults to OpenAI embeddings

await mem.add("User prefers dark mode", category="semantic", importance=0.7)
response = await mem.search("UI preferences")
```

For sync usage in scripts and notebooks, use `SyncCognitiveMemory` (same API, no `await`).

## Docs

Full documentation, guides, and API reference at **[bhekanik.github.io/cognitive-memory](https://bhekanik.github.io/cognitive-memory)**.

## License

[MIT](../../LICENSE)
