Skip to main content

A biological memory upgrade layer for Cognee, adding Valence, Consolidation, and Decay physics to vector graphs.

Project description

Nexyn Logo

Biological Memory Consolidation for Cognee

PyPI version License: MIT


🌐 Website | 🎮 Interactive Demo


Nexyn Core is a lightweight Python library that adds human-like memory physics to your AI applications. Built specifically to run alongside Cognee, it solves a major problem in AI memory systems: context bloat.

Instead of treating every piece of information equally, Nexyn automatically scores how important a memory is (Valence), applies a decay rate, and forgets irrelevant data over time—just like a human brain.

What It Solves

  • Infinite Context Clutter: AI agents quickly drown in their own logs. Nexyn ensures only the most important, reinforced memories survive long-term.
  • Flat Memory Structures: Nexyn categorizes data dynamically. A passing thought decays in hours; a core user instruction (like "I am allergic to peanuts") becomes a permanent instinct.

How It Works

  1. Sensory Buffer: Intercepts data before it enters your vector database.
  2. Evaluator: Uses NVIDIA NIM to quickly score the emotional/logical weight (Valence).
  3. Retrieval & Rehearsal: Every time you search for a memory, Nexyn resets its decay timer (rehearsal), naturally surfacing things you think about often.
  4. Consolidation: A background process sweeps your database and permanently deletes memories that have decayed to zero.

📦 Installation

# Using pip
pip install nexyn-core

🚀 Usage

Nexyn is designed to be completely invisible. You simply initialize it once, and it automatically intercepts your native Cognee calls to apply biological physics. You don't need to learn a new API.

import asyncio
import cognee
import nexyn

async def main():
    # 1. Initialize Nexyn's cognitive layer
    await nexyn.inject(
        nim_api_key="nvapi-your-key-here", 
        cognee_api_key="your_cognee_api_key",
        cognee_url="https://api.cognee.ai",
        tenant_id="default",
        user_id="user_123"
    )

    # 2. Add memories normally (Nexyn automatically scores Valence)
    await cognee.add("Doug is the groom. The wedding is Sunday.")
    
    # 3. Compile the Cognee knowledge graph
    await cognee.cognify()
    
    # 4. Search triggers decay physics and memory rehearsal
    results = await cognee.search("Where is Doug?")
    
    # 5. Fast-forward time to prune dead memories
    await nexyn.sweep()

if __name__ == "__main__":
    asyncio.run(main())

🎮 Interactive Dashboard

Want to see the biological pipeline in action? Check out our live visual dashboard to watch memories decay, prune, and consolidate in real-time: 👉 Live Demo

📝 License

Distributed under the MIT License.

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

nexyn_core-1.0.2.tar.gz (34.2 kB view details)

Uploaded Source

Built Distribution

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

nexyn_core-1.0.2-py3-none-any.whl (36.4 kB view details)

Uploaded Python 3

File details

Details for the file nexyn_core-1.0.2.tar.gz.

File metadata

  • Download URL: nexyn_core-1.0.2.tar.gz
  • Upload date:
  • Size: 34.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.9

File hashes

Hashes for nexyn_core-1.0.2.tar.gz
Algorithm Hash digest
SHA256 4f6404b1ac5f512697797fda5acd2d556014b734ecc6f03d4be1b2639429a77f
MD5 04a7782c5ec132b0f7e717c4853ea181
BLAKE2b-256 007f22ee527e9e5f6799c5925ac08d5e7c2c7b94ba182bbb358ec5862ea5c1e0

See more details on using hashes here.

File details

Details for the file nexyn_core-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: nexyn_core-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 36.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.9

File hashes

Hashes for nexyn_core-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c648f14d54e289100e21560effcf273d2d12acf0ae001c382d53f52fd1b0469b
MD5 37acb665a816a23a5ec41ab524efe73c
BLAKE2b-256 833b70bf5a220353e62d1d96a60fffa60bf4e21231f91b20232fbff22f4540f4

See more details on using hashes here.

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