Metadata-Version: 2.4
Name: cortexdb-langchain
Version: 0.1.0
Summary: LangChain integration for CortexDB — long-term memory for AI systems
License-Expression: Apache-2.0
Requires-Python: >=3.10
Requires-Dist: cortexdbai>=0.1.0
Requires-Dist: langchain-core>=0.3
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Description-Content-Type: text/markdown

# cortexdb-langchain

LangChain integration for CortexDB long-term memory.

> **LLM provider note (audit BLK-2):** the canonical quickstart uses
> `from langchain_openai import ChatOpenAI` for the example agent. CortexDB
> itself is LLM-agnostic — the LangChain example just needs *some* model to
> drive the agent. Swap with one line:
>
> ```python
> # OpenAI (default in the docs)
> from langchain_openai import ChatOpenAI
> llm = ChatOpenAI(model="gpt-4o")
>
> # Anthropic
> from langchain_anthropic import ChatAnthropic
> llm = ChatAnthropic(model="claude-sonnet-4-6")
>
> # Google
> from langchain_google_genai import ChatGoogleGenerativeAI
> llm = ChatGoogleGenerativeAI(model="gemini-1.5-pro")
>
> # Local / Ollama (no API key)
> from langchain_community.chat_models import ChatOllama
> llm = ChatOllama(model="llama3.1")
> ```
>
> Nothing in `cortexdb-langchain` reads `OPENAI_API_KEY`. The retriever and
> memory classes only talk to the CortexDB v1 surface.

## Install

```bash
pip install cortexdb-langchain
```

## API base URL

The SDK and integration default to `https://api-v1.cortexdb.ai` (audit FRI-8).
Override with `CORTEXDB_API_URL` if you self-host.
