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.2.tar.gz (542.7 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.2-py3-none-any.whl (422.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: neurosleepnet-0.3.2.tar.gz
  • Upload date:
  • Size: 542.7 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.2.tar.gz
Algorithm Hash digest
SHA256 e300c16b480a6e33b0a94f7f3fe15395a39f260f0ad46beaa81f601b767850b2
MD5 4d07c53ddab657e280103a4818669946
BLAKE2b-256 eba01f48cb2b3740a36b31db6a44f8c5f0d20fd38fd3e9ac920d05de415ba1a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for neurosleepnet-0.3.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: neurosleepnet-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 422.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c684b61525d3939cb85cf5cfc795d0b4f4e4138cfc4f62ba5b5345f17ecc7dea
MD5 20fc9e1da88b3dcd1d628c5b48f8d430
BLAKE2b-256 1ad46a985a49d5b2b289d9d3b6d9cb79bbe0829b814703f1e5057cf79198634e

See more details on using hashes here.

Provenance

The following attestation bundles were made for neurosleepnet-0.3.2-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