Metadata-Version: 2.4
Name: novyx-llamaindex
Version: 1.0.0
Summary: Persistent memory + rollback + audit trail for LlamaIndex agents using Novyx Core
Author-email: Novyx Labs <hello@novyxlabs.com>
Maintainer-email: Novyx Labs <hello@novyxlabs.com>
License: MIT
Project-URL: Homepage, https://novyxlabs.com/integrations/llamaindex
Project-URL: Documentation, https://docs.novyxlabs.com/integrations/llamaindex
Project-URL: Repository, https://github.com/novyxlabs/novyx-llamaindex
Project-URL: Issues, https://github.com/novyxlabs/novyx-llamaindex/issues
Keywords: llamaindex,llama-index,novyx,memory,ai,agents,llm,persistent,semantic,rag,rollback,audit
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: novyx>=2.9.0
Requires-Dist: llama-index-core>=0.11.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"

# novyx-llamaindex

Persistent memory + rollback + audit trail for LlamaIndex agents, powered by [Novyx Core](https://novyxlabs.com).

## Install

```bash
pip install novyx-llamaindex
```

## Quick Start

### ChatStore (drop-in for SimpleChatStore)

```python
from novyx_llamaindex import NovyxChatStore
from llama_index.core.memory import ChatMemoryBuffer

chat_store = NovyxChatStore(api_key="nram_your_key")
memory = ChatMemoryBuffer.from_defaults(
    chat_store=chat_store,
    chat_store_key="user-123",
    token_limit=3000,
)
```

### BaseMemory (semantic recall)

```python
from novyx_llamaindex import NovyxMemory

memory = NovyxMemory.from_defaults(
    api_key="nram_your_key",
    session_id="user-123",
    top_k=5,
)

# Use with any LlamaIndex chat engine
engine = SimpleChatEngine.from_defaults(memory=memory)
response = engine.chat("Hello!")
```

### Retriever (RAG pipeline)

```python
from novyx_llamaindex import NovyxRetriever

retriever = NovyxRetriever(api_key="nram_your_key", top_k=5)
nodes = retriever.retrieve("What are the user's preferences?")
```

## Features

- **Persistent**: Memories survive across sessions, restarts, and deployments
- **Semantic**: `recall()` finds relevant memories by meaning, not just keywords
- **Rollback**: Undo memory mistakes with `memory.rollback("2 hours ago")`
- **Audit Trail**: Every operation is SHA-256 hashed and logged
- **Cross-session**: Agent A learns it, Agent B knows it (via Context Spaces)

## API Reference

| Class | Base Class | Description |
|-------|-----------|-------------|
| `NovyxChatStore` | `BaseChatStore` | Drop-in persistent chat store |
| `NovyxMemory` | `BaseMemory` | Semantic memory with recall on `get()` |
| `NovyxRetriever` | `BaseRetriever` | RAG retriever over Novyx memories |
| `NovyxMemoryClient` | — | Low-level client for direct Novyx API access |

## License

MIT
