Financial-grade AI memory — bitemporal facts, SEC 17a-4 audit chain, GDPR crypto-shred
Project description
Lian (蓮)
Financial-grade AI memory — bitemporal facts, SEC 17a-4 audit chain, GDPR crypto-shred.
Install
pip install lian-sdk # HTTP client only
pip install lian-sdk[local] # + zero-setup SQLite mode (no server needed)
pip install lian-sdk[langchain] # + LangChain chat history & tools
pip install lian-sdk[langgraph] # + LangGraph node factories
pip install lian-sdk[crewai] # + CrewAI BaseTool wrappers
pip install lian-sdk[openai-agents] # + OpenAI Agents SDK tools
pip install lian-sdk[autogen] # + AutoGen v0.4 tools
pip install lian-sdk[all] # Everything
Quickstart
from lian import LocalLianClient
from datetime import datetime, timezone
mem = LocalLianClient() # no server, no Docker, no 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 at the DB layer — LLM never sees stale data
result = mem.recall(agent_id="analyst-1", query="NVDA revenue guidance")
# Point-in-time: what did we know on March 1?
result = mem.recall_at(
agent_id="analyst-1",
query="NVDA revenue guidance",
as_of=datetime(2025, 3, 1, tzinfo=timezone.utc),
)
# Extract memories directly from a conversation (like mem0.add(messages=[...]))
mem.add_from_messages(
agent_id="analyst-1",
messages=[
{"role": "user", "content": "What guidance did NVDA give?"},
{"role": "assistant", "content": "NVDA raised FY2026 revenue guidance to $40B."},
],
)
What makes Lian different
| Feature | Lian | mem0 | Graphiti/Zep |
|---|---|---|---|
| Bitemporal model (event + ingestion time) | ✓ | ✗ | ✓ |
| Supersession (stale facts excluded at DB layer) | ✓ | ✗ | Partial |
| SEC 17a-4 tamper-evident audit chain | ✓ | ✗ | ✗ |
| GDPR crypto-shred with audit survival | ✓ | ✗ | ✗ |
| Information barriers (PostgreSQL RLS) | ✓ | ✗ | ✗ |
| Backtest contamination detection | ✓ | ✗ | ✗ |
Framework integrations
# LangChain
from lian.langchain_integration import LianChatHistory, build_tools
# LangGraph
from lian.langgraph_integration import create_recall_node, create_remember_node
# CrewAI
from lian.crewai_integration import build_crewai_tools
# OpenAI Agents SDK
from lian.openai_agents_integration import build_openai_agent_tools
# AutoGen v0.4
from lian.autogen_integration import build_autogen_tools
Switching to hosted API
# Dev (local SQLite, no server)
from lian import LocalLianClient
mem = LocalLianClient()
# Production (self-hosted or managed)
from lian import LianClient
mem = LianClient(base_url="https://mem.yourfirm.internal", api_key="...")
Full documentation: github.com/ebeirne/Lian
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lian_sdk-0.1.2.tar.gz.
File metadata
- Download URL: lian_sdk-0.1.2.tar.gz
- Upload date:
- Size: 32.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8f329d1c58db1ae218dfa1383caba8af9676ee6815ec9a59b8cc378015b4d63
|
|
| MD5 |
a74c558d2c91a442f5f715d407ae4d5d
|
|
| BLAKE2b-256 |
10802726f9b4b91d0ff2caffd749cacfec8a1f6e4c1dca6e10d94618832a2c7e
|
Provenance
The following attestation bundles were made for lian_sdk-0.1.2.tar.gz:
Publisher:
publish-lian.yml on ebeirne/Lian
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lian_sdk-0.1.2.tar.gz -
Subject digest:
c8f329d1c58db1ae218dfa1383caba8af9676ee6815ec9a59b8cc378015b4d63 - Sigstore transparency entry: 1934324862
- Sigstore integration time:
-
Permalink:
ebeirne/Lian@50f026967fe79db7bd2fa1b7cbc1a651bbed8027 -
Branch / Tag:
refs/tags/lian-v0.1.2 - Owner: https://github.com/ebeirne
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-lian.yml@50f026967fe79db7bd2fa1b7cbc1a651bbed8027 -
Trigger Event:
push
-
Statement type:
File details
Details for the file lian_sdk-0.1.2-py3-none-any.whl.
File metadata
- Download URL: lian_sdk-0.1.2-py3-none-any.whl
- Upload date:
- Size: 40.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d51986702d01df25a78bb0a4f15f5fa88e3d8f90ae798ec06f187386a7da255
|
|
| MD5 |
0a793c1874ce757d309d41e67a8cdfd5
|
|
| BLAKE2b-256 |
57f21c4dd3ea46e6b588f008f24923e1c30d071a06bb13aa412f9c5ab9964d56
|
Provenance
The following attestation bundles were made for lian_sdk-0.1.2-py3-none-any.whl:
Publisher:
publish-lian.yml on ebeirne/Lian
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lian_sdk-0.1.2-py3-none-any.whl -
Subject digest:
8d51986702d01df25a78bb0a4f15f5fa88e3d8f90ae798ec06f187386a7da255 - Sigstore transparency entry: 1934324880
- Sigstore integration time:
-
Permalink:
ebeirne/Lian@50f026967fe79db7bd2fa1b7cbc1a651bbed8027 -
Branch / Tag:
refs/tags/lian-v0.1.2 - Owner: https://github.com/ebeirne
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-lian.yml@50f026967fe79db7bd2fa1b7cbc1a651bbed8027 -
Trigger Event:
push
-
Statement type: