Metadata-Version: 2.4
Name: enxi
Version: 1.0
Summary: Real-time external memory and cognitive continuity layer. Build From AROM Labs under Aditya
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi>=0.111.0
Requires-Dist: uvicorn>=0.29.0
Requires-Dist: pydantic>=2.7.0
Requires-Dist: pydantic-settings>=2.2.0
Requires-Dist: qdrant-client>=1.9.0
Requires-Dist: pymilvus>=2.4.0
Requires-Dist: fastembed>=0.3.0
Requires-Dist: httpx>=0.27.0
Dynamic: license-file

# Enx (`enx`)

**Real-time external memory and cognitive continuity layer** for LLMs, autonomous agents, and model pretraining workflows.

[![PyPI version](https://img.shields.io/pypi/v/enxi.svg)](https://pypi.org/project/enxi/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python Version](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/)

---

## Overview

**Enx** is a high-performance, real-time memory synchronization and cognitive continuity engine designed to bridge state across sessions, training checkpoints, and distributed agentic pipelines. 

By leveraging **FastEmbed (ONNX-backed)**, Enxi operates with zero PyTorch runtime overhead, delivering ultra-fast vector embeddings and surgical prompt contextualization out-of-the-box.

---

## Key Features

* **Zero PyTorch Overhead:** Utilizes `fastembed` with ONNX runtime for ultra-lightweight, high-speed embedding generation without heavy deep learning framework dependencies.
* **Multi-Tier Vector Storage:** Built-in native connectors for **Qdrant** and **Milvus** to handle hot cache and cold archival memory tiers seamlessly.
* **Dynamic Context Bridge:** Instantly augments raw user prompts and training checkpoints with relevant historical memories.
* **Production-Ready API Gateway:** Powered by FastAPI and Pydantic v2 for high-throughput, validated async gateway communication.

---

## Installation

Install **Enx** globally or inside your virtual environment straight from PyPI:

```bash
pip install enxi

Quickstart Usage
Here is how to initialize the Enxi SDK client to store, recall, and contextualize memories in your application:

Python
from sdk.client import EnxClient

# Initialize the client layer
client = EnxClient()

# 1. Store (Remember) a new memory point
point_id = client.remember(
    memory_id="node-session-001",
    content="Cognitive continuity layer successfully synchronized across nodes.",
    tier="cold",
    metadata={"module": "core", "sovereign_stack": True}
)
print(f"Committed memory with UUID: {point_id}")

# 2. Recall memories via semantic search
results = client.recall(
    query_text="How is the cognitive state synchronized?",
    tier="cold",
    limit=2
)
for idx, hit in enumerate(results, 1):
    print(f"{idx}. Score: {hit['score']:.3f} | Content: {hit['payload']['content']}")

# 3. Contextualize (Augment prompts or training loops)
augmented = client.contextualize(
    user_prompt="Explain the sovereign memory architecture.",
    tier="cold",
    limit=2
)
print(f"Augmented Prompt Payload:\n{augmented['augmented_prompt']}")
Project Structure
Plaintext
enxi/
├── pyproject.toml
├── README.md
├── src/
│   ├── api/          # FastAPI routers and gateway endpoints
│   ├── core/         # Engine, bridging, scraper, and consolidators
│   ├── sdk/          # Client SDK for seamless integration
│   └── storage/      # Qdrant and vector store connectors
└── examples/         # Pretraining hooks and SDK demo scripts
