# velixar-langchain

Velixar AI memory integration for LangChain. Gives your LangChain agents persistent, cognitive memory that understands users across sessions.

## Install

```bash
pip install velixar-langchain
```

## Retriever

```python
from velixar_langchain import VelixarRetriever

retriever = VelixarRetriever(
    api_key="vx_...",
    workspace_id="ws_abc123",
)

# Use in a chain
docs = retriever.invoke("What are the user's preferences?")
```

## Memory

```python
from velixar_langchain import VelixarMemory

memory = VelixarMemory(
    api_key="vx_...",
    workspace_id="ws_abc123",
    user_id="user_1",
)

# Use with any LangChain chain
from langchain.chains import ConversationChain
chain = ConversationChain(llm=llm, memory=memory)
```

## Features

- 4-tier hierarchical memory (pinned, session, semantic, org)
- Automatic salience scoring and memory promotion
- Identity modeling and cognitive profiles
- Encrypted embeddings (AES-256-GCM)
- Cross-session persistence

## Links

- [Velixar AI](https://velixarai.com)
- [API Docs](https://docs.velixarai.com)
- [Dashboard](https://app.velixarai.com)
