Financial-grade AI memory — bitemporal facts, SEC 17a-4 audit chain, GDPR crypto-shred
Project description
Lians (蓮)
Financial-grade AI memory — bitemporal facts, SEC 17a-4 audit chain, GDPR crypto-shred.
Install
pip install lians-sdk # HTTP client only
pip install lians-sdk[local] # + zero-setup SQLite mode (no server needed)
pip install lians-sdk[langchain] # + LangChain chat history & tools
pip install lians-sdk[langgraph] # + LangGraph node factories
pip install lians-sdk[crewai] # + CrewAI BaseTool wrappers
pip install lians-sdk[openai-agents] # + OpenAI Agents SDK tools
pip install lians-sdk[autogen] # + AutoGen v0.4 tools
pip install lians-sdk[all] # Everything
Quickstart
from lians import LocalLiansClient
from datetime import datetime, timezone
mem = LocalLiansClient() # 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 Lians different
| Feature | Lians | 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 lians.langchain_integration import LiansChatHistory, build_tools
# LangGraph
from lians.langgraph_integration import create_recall_node, create_remember_node
# CrewAI
from lians.crewai_integration import build_crewai_tools
# OpenAI Agents SDK
from lians.openai_agents_integration import build_openai_agent_tools
# AutoGen v0.4
from lians.autogen_integration import build_autogen_tools
Switching to hosted API
# Dev (local SQLite, no server)
from lians import LocalLiansClient
mem = LocalLiansClient()
# Production (self-hosted or managed)
from lians import LiansClient
mem = LiansClient(base_url="https://mem.yourfirm.internal", api_key="...")
Full documentation: github.com/ebeirne/Lians
Project details
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 lians_sdk-0.3.0.tar.gz.
File metadata
- Download URL: lians_sdk-0.3.0.tar.gz
- Upload date:
- Size: 40.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7223b3340e8d96e88f3f1394a4c26aae6b8e9bf4b620e4ae272f2a6e918766f
|
|
| MD5 |
6980da829914a0f2968e3ec639e04e0e
|
|
| BLAKE2b-256 |
cfc8b20a058089f03465bb64a1086763934b3180d17175cf1a3923fe3574c8e3
|
Provenance
The following attestation bundles were made for lians_sdk-0.3.0.tar.gz:
Publisher:
publish-lian.yml on Lians-ai/Lians
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lians_sdk-0.3.0.tar.gz -
Subject digest:
b7223b3340e8d96e88f3f1394a4c26aae6b8e9bf4b620e4ae272f2a6e918766f - Sigstore transparency entry: 2023539599
- Sigstore integration time:
-
Permalink:
Lians-ai/Lians@ca37c73e673dfc9f45258098cca8cbb45151f8fa -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/Lians-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-lian.yml@ca37c73e673dfc9f45258098cca8cbb45151f8fa -
Trigger Event:
push
-
Statement type:
File details
Details for the file lians_sdk-0.3.0-py3-none-any.whl.
File metadata
- Download URL: lians_sdk-0.3.0-py3-none-any.whl
- Upload date:
- Size: 49.0 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 |
af99442a3270fb7fd1f4312a6339d31ddb79e2250ade0e1e6dd320136590ce45
|
|
| MD5 |
6a620ca9a7005b39528d4d58da5990d7
|
|
| BLAKE2b-256 |
b11c9c3b25ad4553419aa3011f5008d3db4c4dfe042920503172f9f02d3b107f
|
Provenance
The following attestation bundles were made for lians_sdk-0.3.0-py3-none-any.whl:
Publisher:
publish-lian.yml on Lians-ai/Lians
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lians_sdk-0.3.0-py3-none-any.whl -
Subject digest:
af99442a3270fb7fd1f4312a6339d31ddb79e2250ade0e1e6dd320136590ce45 - Sigstore transparency entry: 2023539730
- Sigstore integration time:
-
Permalink:
Lians-ai/Lians@ca37c73e673dfc9f45258098cca8cbb45151f8fa -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/Lians-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-lian.yml@ca37c73e673dfc9f45258098cca8cbb45151f8fa -
Trigger Event:
push
-
Statement type: