Metadata-Version: 2.4
Name: neurosleepnet
Version: 0.3.3
Summary: NeuroSleepNet — Enterprise-grade persistent memory and governance layer for AI agents with adaptive retrieval and consolidation.
Project-URL: Homepage, https://github.com/avirooppal/NeuroSleepNet
Project-URL: Documentation, https://github.com/avirooppal/NeuroSleepNet#readme
Project-URL: Repository, https://github.com/avirooppal/NeuroSleepNet.git
Project-URL: Issues, https://github.com/avirooppal/NeuroSleepNet/issues
Author-email: Aviroop Pal <palaviroopoff@gmail.com>
Keywords: agent,ai,continual-learning,llm,memory,neurosleepnet,nsn,slm
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.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Requires-Dist: fastembed>=0.4.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: numpy>=1.24.0
Provides-Extra: all
Requires-Dist: fastembed>=0.4.0; extra == 'all'
Requires-Dist: openai>=1.0.0; extra == 'all'
Provides-Extra: local
Requires-Dist: fastembed>=0.4.0; extra == 'local'
Provides-Extra: openai
Requires-Dist: openai>=1.0.0; extra == 'openai'
Description-Content-Type: text/markdown

# NeuroSleepNet Python SDK

A sleep-inspired hybrid memory layer for continual AI learning. Give your local LLMs and agents infinite memory with a single line of code.

## Installation

```bash
pip install neurosleepnet
```

For local LLM support (HuggingFace, Torch):
```bash
pip install "neurosleepnet[local_llm]"
```

## Quick Start

```python
import neurosleepnet as nsn

# 1. Initialize — no API keys required for local use
nsn.init(project="my-agent-v1")

# 2. Wrap your agent (OpenAI, LangChain, HuggingFace, etc.)
# All memory injection and storage becomes transparent.
agent = nsn.wrap(your_agent)

# 3. Use your agent as normal
response = agent("What did we talk about in our last session?")
```

## Core Features

- **Project Scoping**: Isolate memories by project or agent identity.
- **Attention-based Retrieval**: Hybrid semantic search + recency weighting.
- **Sleep Consolidation**: Nightly background pruning and reinforcement of important facts.
- **Local-First**: Built-in SQLite fallback ensures your agent never crashes, even if the backend is down.
- **Zero-Ops**: Designed to run entirely on your own infrastructure.

## Advanced API

```python
# Manually remember a fact
nsn.remember("User prefers Python", importance=0.9, tags=["pref"])

# Retrieve memories semantically
memories = nsn.recall("coding preferences", top_k=3)

# Diagnostics
nsn.status()

# Explain why a memory was retrieved
nsn.explain_last()

# Export/Import full state
state = nsn.snapshot()
nsn.restore(state)
```

## License
Apache 2.0
