Skip to main content

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

Release files for lian-sdk 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lian-sdk 0.1.2
File Size Uploaded
lian_sdk-0.1.2.tar.gz 32.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lian-sdk 0.1.2
File Interpreter ABI Platform
lian_sdk-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 73.0 kB

Release files / lian_sdk-0.1.2.tar.gz

Download URL lian_sdk-0.1.2.tar.gz
Size 32.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c8f329d1c58db1ae218dfa1383caba8af9676ee6815ec9a59b8cc378015b4d63
BLAKE2b-256 checksum
How to use checksums
10802726f9b4b91d0ff2caffd749cacfec8a1f6e4c1dca6e10d94618832a2c7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 24, 2026.

Transparency log

Release files / lian_sdk-0.1.2-py3-none-any.whl

Download URL lian_sdk-0.1.2-py3-none-any.whl
Size 40.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d51986702d01df25a78bb0a4f15f5fa88e3d8f90ae798ec06f187386a7da255
BLAKE2b-256 checksum
How to use checksums
57f21c4dd3ea46e6b588f008f24923e1c30d071a06bb13aa412f9c5ab9964d56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page