NeuroSleepNet — A Sleep-Inspired Hybrid Memory Layer for AI Agents
Project description
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
pip install neurosleepnet
For local LLM support (HuggingFace, Torch):
pip install "neurosleepnet[local_llm]"
Quick Start
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
# 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
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
neurosleepnet-0.2.0.tar.gz
(31.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file neurosleepnet-0.2.0.tar.gz.
File metadata
- Download URL: neurosleepnet-0.2.0.tar.gz
- Upload date:
- Size: 31.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4bf6d220a21eade97abff885717395116d6fc662083daaefbb808a01a21f236
|
|
| MD5 |
17347f19c674826216159281cd2bc7c4
|
|
| BLAKE2b-256 |
7d1d99e600c37646a91de99510fab9b6facd96300e2cfaa8b49040e4bfc051a6
|
File details
Details for the file neurosleepnet-0.2.0-py3-none-any.whl.
File metadata
- Download URL: neurosleepnet-0.2.0-py3-none-any.whl
- Upload date:
- Size: 40.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6de33969171c6a8b34a85190c49be2df87c8049d7a7cabe2ba395e82496fbd34
|
|
| MD5 |
aa3ee94729c250951d87bacc24bc3b2d
|
|
| BLAKE2b-256 |
054bc8b35b41213fccc2c84b23a51ca0fb2d34f4b67a855bc86853f319ced537
|