Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lian_sdk-0.1.2.tar.gz (32.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lian_sdk-0.1.2-py3-none-any.whl (40.4 kB view details)

Uploaded Python 3

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

Hashes for lian_sdk-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c8f329d1c58db1ae218dfa1383caba8af9676ee6815ec9a59b8cc378015b4d63
MD5 a74c558d2c91a442f5f715d407ae4d5d
BLAKE2b-256 10802726f9b4b91d0ff2caffd749cacfec8a1f6e4c1dca6e10d94618832a2c7e

See more details on using hashes here.

Provenance

The following attestation bundles were made for lian_sdk-0.1.2.tar.gz:

Publisher: publish-lian.yml on ebeirne/Lian

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for lian_sdk-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8d51986702d01df25a78bb0a4f15f5fa88e3d8f90ae798ec06f187386a7da255
MD5 0a793c1874ce757d309d41e67a8cdfd5
BLAKE2b-256 57f21c4dd3ea46e6b588f008f24923e1c30d071a06bb13aa412f9c5ab9964d56

See more details on using hashes here.

Provenance

The following attestation bundles were made for lian_sdk-0.1.2-py3-none-any.whl:

Publisher: publish-lian.yml on ebeirne/Lian

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page