Metadata-Version: 2.4
Name: lians-sdk
Version: 0.4.2
Summary: Bitemporal long-term memory for AI agents with point-in-time recall, tamper-evident audit trails, and GDPR crypto-erasure
Project-URL: Homepage, https://www.lians.ai
Project-URL: Repository, https://github.com/Lians-ai/Lians
Project-URL: Documentation, https://github.com/Lians-ai/Lians/tree/master/docs
Project-URL: Changelog, https://github.com/Lians-ai/Lians/releases
Project-URL: Issues, https://github.com/Lians-ai/Lians/issues
Project-URL: Benchmarks, https://github.com/Lians-ai/Lians/blob/master/docs/benchmark.md
Project-URL: MCP, https://github.com/Lians-ai/Lians#mcp---native-tool-in-any-ai-client
License: Apache-2.0
Keywords: agent-memory,ai,audit-trail,bitemporal,compliance,crewai,gdpr,langchain,langgraph,llm,long-term-memory,mcp
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business :: Financial
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: httpx>=0.25
Provides-Extra: all
Requires-Dist: aiosqlite>=0.19; extra == 'all'
Requires-Dist: asyncpg>=0.29; extra == 'all'
Requires-Dist: autogen-core>=0.4; extra == 'all'
Requires-Dist: crewai>=0.28; extra == 'all'
Requires-Dist: cryptography>=42; extra == 'all'
Requires-Dist: fastapi>=0.110; extra == 'all'
Requires-Dist: httpx>=0.27.0; extra == 'all'
Requires-Dist: langchain-core>=0.2; extra == 'all'
Requires-Dist: langgraph>=0.1; extra == 'all'
Requires-Dist: mcp<2,>=1.0.0; extra == 'all'
Requires-Dist: numpy>=1.26; extra == 'all'
Requires-Dist: openai-agents>=0.0.1; extra == 'all'
Requires-Dist: pgvector>=0.2.5; extra == 'all'
Requires-Dist: pydantic-settings>=2.1; extra == 'all'
Requires-Dist: pydantic>=2.5; extra == 'all'
Requires-Dist: sentence-transformers>=3.0; extra == 'all'
Requires-Dist: sqlalchemy>=2.0; extra == 'all'
Provides-Extra: autogen
Requires-Dist: autogen-core>=0.4; extra == 'autogen'
Provides-Extra: crewai
Requires-Dist: crewai>=0.28; extra == 'crewai'
Provides-Extra: langchain
Requires-Dist: langchain-core>=0.2; extra == 'langchain'
Provides-Extra: langgraph
Requires-Dist: langchain-core>=0.2; extra == 'langgraph'
Requires-Dist: langgraph>=0.1; extra == 'langgraph'
Provides-Extra: local
Requires-Dist: aiosqlite>=0.19; extra == 'local'
Requires-Dist: asyncpg>=0.29; extra == 'local'
Requires-Dist: cryptography>=42; extra == 'local'
Requires-Dist: fastapi>=0.110; extra == 'local'
Requires-Dist: numpy>=1.26; extra == 'local'
Requires-Dist: pgvector>=0.2.5; extra == 'local'
Requires-Dist: pydantic-settings>=2.1; extra == 'local'
Requires-Dist: pydantic>=2.5; extra == 'local'
Requires-Dist: sentence-transformers>=3.0; extra == 'local'
Requires-Dist: sqlalchemy>=2.0; extra == 'local'
Provides-Extra: mcp
Requires-Dist: aiosqlite>=0.19; extra == 'mcp'
Requires-Dist: asyncpg>=0.29; extra == 'mcp'
Requires-Dist: cryptography>=42; extra == 'mcp'
Requires-Dist: fastapi>=0.110; extra == 'mcp'
Requires-Dist: httpx>=0.27.0; extra == 'mcp'
Requires-Dist: mcp<2,>=1.0.0; extra == 'mcp'
Requires-Dist: numpy>=1.26; extra == 'mcp'
Requires-Dist: pgvector>=0.2.5; extra == 'mcp'
Requires-Dist: pydantic-settings>=2.1; extra == 'mcp'
Requires-Dist: pydantic>=2.5; extra == 'mcp'
Requires-Dist: sentence-transformers>=3.0; extra == 'mcp'
Requires-Dist: sqlalchemy>=2.0; extra == 'mcp'
Provides-Extra: openai-agents
Requires-Dist: openai-agents>=0.0.1; extra == 'openai-agents'
Description-Content-Type: text/markdown

<p align="center">
  <a href="https://github.com/Lians-ai/Lians">
    <img src="https://raw.githubusercontent.com/Lians-ai/Lians/HEAD/docs/images/logo.png" width="340" alt="Lians logo">
  </a>
</p>

# Lians

**Bitemporal long-term memory for AI agents.** Keep current facts clean, reconstruct what an agent knew at a past time, and retain tamper-evident audit records.

## Install

```bash
pip install lians-sdk
pip install lians-sdk[local]         # SQLite plus real local semantic embeddings
pip install lians-sdk[mcp]           # Local MCP server
pip install lians-sdk[langchain]     # LangChain
pip install lians-sdk[langgraph]     # LangGraph
pip install lians-sdk[crewai]        # CrewAI
pip install lians-sdk[openai-agents] # OpenAI Agents SDK
pip install lians-sdk[autogen]       # AutoGen v0.4
pip install lians-sdk[all]           # Everything
```

## Quickstart

```python
from datetime import datetime, timezone
from lians import LocalLiansClient

mem = LocalLiansClient()  # No server, Docker, or API key

mem.add(
    agent_id="analyst-1",
    content="NVDA FY2026 revenue guidance raised to $40B",
    event_time=datetime(2025, 11, 19, 16, tzinfo=timezone.utc),
    metadata={"ticker": "NVDA", "metric": "revenue_guidance"},
    importance=0.9,
)

# Superseded facts are excluded before they reach the model
current = mem.recall(agent_id="analyst-1", query="NVDA revenue guidance")

# Reconstruct what was known on a past date
past = mem.recall_at(
    agent_id="analyst-1",
    query="NVDA revenue guidance",
    as_of=datetime(2025, 3, 1, tzinfo=timezone.utc),
)
```

## Why Lians

- Bitemporal facts with event time and ingestion time
- Deterministic supersession before memories reach the model
- Point-in-time recall and lookahead-bias checks
- Tamper-evident audit history and a crypto-erasure workflow
- Local SQLite mode with no server or API key
- Hosted and self-hosted deployment paths

See the [published benchmark results](https://github.com/Lians-ai/Lians/blob/master/docs/benchmark.md), [regulated-memory evaluation](https://github.com/Lians-ai/Lians/blob/master/docs/regulated-eval-results.md), and [public correction ledger](https://github.com/Lians-ai/Lians/blob/master/docs/gtm/public-right-of-reply-2026-07-17.md). The evaluation includes runnable adapters so results can be reproduced and challenged.

## Framework integrations

```python
from lians.langchain_integration import LiansChatHistory, build_tools
from lians.langgraph_integration import create_recall_node, create_remember_node
from lians.crewai_integration import build_crewai_tools
from lians.openai_agents_integration import build_openai_agent_tools
from lians.autogen_integration import build_autogen_tools
```

## Hosted or self-hosted API

```python
from lians import LiansClient

mem = LiansClient(base_url="https://mem.yourfirm.internal", api_key="...")
```

Full documentation: [github.com/Lians-ai/Lians](https://github.com/Lians-ai/Lians)

<!-- mcp-name: io.github.ebeirne/lians -->
