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/AI_Memory_Software_lotus

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.0.tar.gz (28.1 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.0-py3-none-any.whl (35.3 kB view details)

Uploaded Python 3

File details

Details for the file lian_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: lian_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 28.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for lian_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7696cb8f0fc45c6fe89f9f1974146d109acee77dcd55a9cef0f9184d687b4380
MD5 77eff7425c1e9fc1e7ff81aac0857fce
BLAKE2b-256 7330491ca8d050e951e560d207de0dbcccaefe8d7be6a1c59bd511f6aceabaa8

See more details on using hashes here.

File details

Details for the file lian_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: lian_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 35.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for lian_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 866fdba85bb23f3ea182b37a4c064e3ef725a8702cc9fb2691db9309ac9c32ac
MD5 cf8a13b440765417f39b7c648bca3055
BLAKE2b-256 1e0924a047a1b9009b133e9747086c4ea37d74d9777a6fec5ec3d35010453c67

See more details on using hashes here.

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