neomemx 0.1.0

A high-performance memory library for AI agents with semantic search
Documentation
# neomemx

<p align="center">
  <img src="static/neomemx-logo.png" width="560" alt="neomemx logo">
</p>

[![Crates.io](https://img.shields.io/crates/v/neomemx.svg)](https://crates.io/crates/neomemx)
[![Documentation](https://docs.rs/neomemx/badge.svg)](https://docs.rs/neomemx)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)

**neomemx** is a high-performance, multi-tenant memory layer for AI agents build with a Rust.

## Highlights

- **High-performance AI memory** — Stores facts, full history, and supports semantic search.
- **Rust API** — Fluent builder style (`store`, `search`, `retrieve_all`).
- **Flexible providers** — Groq, Jina, ChromaDB; optional OpenAI, HuggingFace, Milvus.
- **LLM-assisted extraction** — Automatic fact extraction and consolidation.
- **Multi-tenant safe** — Per-user/agent scoped memory.
- **Advanced retrieval** — Reranking and relationship-graph generation.

## Quick start

1) Run ChromaDB:
```bash
docker run -d -p 8000:8000 chromadb/chroma
or
chroma run  --host 0.0.0.0 --port 8000
```
2) Export any provider keys you need:
```bash
export GROQ_API_KEY=your_key   # or OPENAI_API_KEY, JINA_API_KEY
```

### Rust

`Cargo.toml`:
```toml
[dependencies]
neomemx = "0.1"
tokio = { version = "1", features = ["full"] }
```

Example:
```rust
use neomemx::{Memory, MemoryConfig, Result};

#[tokio::main]
async fn main() -> Result<()> {
    let memory = Memory::new(MemoryConfig::default()).await?;

    memory.add("Alice is a software engineer.")
        .user("user_123")
        .await?;

    let results = memory.search("What does Alice do?")
        .user("user_123")
        .limit(3)
        .await?;

    for item in results {
        println!("{}", item.memory);
    }

    Ok(())
}
```

## Configuration (env vars)

| Variable | Description | Required |
|----------|-------------|----------|
| `GROQ_API_KEY` | Groq API key | If using Groq |
| `JINA_API_KEY` | Jina API key | If using Jina |
| `OPENAI_API_KEY` | OpenAI API key | If using OpenAI |
| `CHROMA_HOST` | ChromaDB host | No (default: localhost) |
| `CHROMA_PORT` | ChromaDB port | No (default: 8000) |

## License

MIT - see [LICENSE](LICENSE)