Skip to main content

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

Project description

Nexyn Logo

Nexyn Core v1.0.0

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.1.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.1-py3-none-any.whl (36.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nexyn_core-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 ad8c702d9ee31cd534e831697a528a2b738e448e91d7c26d4a7b48e3de0e9c01
MD5 e66525eb266172742806183e0bf4d435
BLAKE2b-256 b0ce346750bb2940c331e2f35b6cf2945c33efa818f1b751dd43202811b5249d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nexyn_core-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f29ce0fd1848c8de9aa365883b812ddab9748383e2ac08b18bbb206e5f753d6f
MD5 81329d9d88b00743ce51786e032cce57
BLAKE2b-256 ab2509b9a8d3ff4db5c5558864bbe0e84ffa613443b397ebb9b055ec17628922

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