Skip to main content

NeuroSleepNet — Enterprise-grade persistent memory and governance layer for AI agents with adaptive retrieval and consolidation.

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.3.3.tar.gz (543.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neurosleepnet-0.3.3-py3-none-any.whl (422.8 kB view details)

Uploaded Python 3

File details

Details for the file neurosleepnet-0.3.3.tar.gz.

File metadata

  • Download URL: neurosleepnet-0.3.3.tar.gz
  • Upload date:
  • Size: 543.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for neurosleepnet-0.3.3.tar.gz
Algorithm Hash digest
SHA256 f5984a30bd518176a3c4294c81bc449cb024664a0986c5c0e61346b5952973f8
MD5 8e136bb3fd47e83eb93c0b3583c46c96
BLAKE2b-256 e15fe27f32a8d475635cb7767e41b2b21c72e0163fc1414510419b22d47f5020

See more details on using hashes here.

Provenance

The following attestation bundles were made for neurosleepnet-0.3.3.tar.gz:

Publisher: publish.yml on avirooppal/NeuroSleepNet

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file neurosleepnet-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: neurosleepnet-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 422.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for neurosleepnet-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 48640ea5aa8f1d8e64ec8ffe3508acf963dfd88f46ee652c7be7f803abd542c3
MD5 ecccc81ef6c868928ed27fd6060ac07c
BLAKE2b-256 90c32105805ba8883924f67c759ea531a3d09f32a1d69ff6096907591581ab59

See more details on using hashes here.

Provenance

The following attestation bundles were made for neurosleepnet-0.3.3-py3-none-any.whl:

Publisher: publish.yml on avirooppal/NeuroSleepNet

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page