{"slug": "show-hn-lians-ai-token-bounded-memory-and-evidence-for-ai-workflows", "title": "Show HN: Lians AI, Token-bounded memory and evidence for AI workflows", "summary": "Lians AI has launched Lians, a cross-platform decision evidence and reconstruction layer for regulated AI workflows, providing token-bounded memory and evidence records. The platform captures and reconstructs agent decisions with content-addressed receipts, supporting Bedrock, Azure OpenAI, Anthropic, and open-source runtimes, and offers self-hosted and cloud options. It aims to address compliance needs in financial, medical, and legal environments by ensuring point-in-time knowledge and auditability.", "body_md": "[Website](https://www.lians.ai/)\n-\n[Docs](https://github.com/Lians-ai/Lians/tree/master/docs)\n-\n[Install](/Lians-ai/Lians/blob/master/docs/install.md)\n-\n[Quickstart](https://github.com/Lians-ai/Lians#self-hosted-quickstart)\n-\n**Star Lians**\n\n**Reproducible benchmark evidence and offline quality gates**\n\n[ RIAD-1: decision reconstruction benchmark](/Lians-ai/Lians/blob/master/docs/benchmarks/riad-1.md)\n·\n\n**CI receipts**[Lians](https://github.com/Lians-ai/Lians) is the **cross-platform\ndecision evidence and reconstruction layer for regulated AI**. It gives\ncompliance, model-risk, and operational-risk teams one record of what an agent\nknew, what it retrieved, which policy governed it, which tools ran, who\nreviewed it, and what changed later.\n\nThe durable moat is neutrality. A firm can run agents across Bedrock, Azure OpenAI, Anthropic direct, and open-source runtimes while keeping one portable evidence record outside every provider.\n\nEvery write is preserved as a governed temporal record and compiled into a\ntyped memory artifact. Every recall can run in `fast`\n\n, `deep`\n\n, or `reconstruct`\n\nmode and returns a content-addressed receipt that can bind automatically to a\nDecision Envelope. See\n[decision evidence and reconstruction](/Lians-ai/Lians/blob/master/docs/decision-evidence.md), the\n[normative completeness grades](/Lians-ai/Lians/blob/master/docs/completeness-grades.md),\n[Evidence Pack signing key custody](/Lians-ai/Lians/blob/master/docs/evidence-signing-key-custody.md), the\n[governed memory engine](/Lians-ai/Lians/blob/master/docs/memory-engine.md) and\n[reproducible evidence gates](/Lians-ai/Lians/blob/master/docs/benchmarks/README.md).\n\nThe platform exposes one evidence workflow:\n\n**Capture**: open a Decision Envelope and bind memory, traces, policy decisions, prompts, tools, and human review as the action happens.**Reconstruct**: reproduce the point-in-time knowledge and execution path even when exact deterministic replay is impossible.** Verify**: grade every decision as Recorded, Reconstructable, Verifiable, or Replayable, with every missing requirement named.** Monitor**: when a source, policy, or model changes, identify every exposed decision and emit a blast-radius alert.\n\nMemory remains a core evidence source and performance primitive. It is not the commercial category by itself.\n\n| Library | Self-Hosted Server | Cloud | |\n|---|---|---|---|\nBest for |\nTesting, prototyping | Regulated teams, private deployments | Zero-ops production (early access) |\nSetup |\n`pip install lians-sdk[local]` |\n`docker compose up --build` |\n`pip install lians-sdk` + API key |\nDatabase |\nSQLite (zero setup) | Postgres 16 + pgvector | Managed |\nAudit chain |\nYes | Yes | Yes |\nCrypto-shred erasure |\nYes | Yes | Yes |\nInformation barriers |\nLocal checks | PostgreSQL RLS | Managed policy |\nAir-gap capable |\nNo | Yes | No |\n\nLians gives agents a durable memory loop across facts, context, decisions, outcomes, and reviewed lessons. The Memory product keeps context current and useful; the Records product captures behavior and oversight in an open, verifiable event format.\n\nMost memory layers stop at storage and retrieval. Lians is built for teams that also need to know what the agent knew, when it knew it, where the fact came from, which outcomes followed, who was allowed to see it, and whether stale or erased content was kept out of future context.\n\nThat is the gap between a memory demo and a memory system teams can trust in production, especially in financial, medical, and legal environments.\n\nGeneric agent memory optimizes for personalization and recall. Regulated agent memory has a different job: it must keep the agent's context correct, current, segregated, reproducible, and defensible under review.\n\nLians is designed for the failure modes that matter in institutions:\n\n**Stale fact contamination**- old rates, old guidance, old medication doses, old damages estimates, or old client facts must not silently enter context.**Point-in-time reconstruction**- an examiner, clinician, partner, or risk committee may ask what the agent knew at a specific timestamp.** Information barriers**- one desk, care team, or matter team must not read another team's memory because of an application-layer bug.** Erasure with audit survival**- private content must be removable without breaking custody records, audit hashes, or legal retention evidence.** Relational compliance checks**- conflicts of interest, related-party exposure, and referral networks are graph questions, not plain vector search.\n\nThe short competitive frame:\n\nRuntime vendors explain their own cloud. Lians preserves portable decision evidence across all of them.\n\n| Vertical | What Lians proves | Product primitives |\n|---|---|---|\nFinancial institutions |\nNo stale or future facts influenced a decision; desk barriers held; audit state is reconstructable | Bitemporal recall, backtest contamination checks, SEC/FINRA audit export, RLS information barriers, related-party graph paths |\nHealthcare organizations |\nPHI access is scoped; care-team memory is reconstructable; patient erasure is provable | Per-subject encryption, crypto-shred certificates, HIPAA safeguard mapping, care-network graph, air-gap mode |\nLegal institutions |\nMatter walls held; privilege cutoffs are reproducible; chain-of-custody survives erasure | Matter-level barriers, `recall_at` for privilege dates, audit reconstruction, conflict-of-interest graph paths |\n\nProcurement and technical review materials:\n\n[Institutional proof kit](/Lians-ai/Lians/blob/master/docs/institutional-proof-kit.md)[Vertical pitch guide](/Lians-ai/Lians/blob/master/docs/verticals.md)[Competitive landscape](/Lians-ai/Lians/blob/master/docs/competitive-landscape.md)[Security whitepaper](/Lians-ai/Lians/blob/master/docs/security-whitepaper.md)[SOC 2 / HIPAA readiness](/Lians-ai/Lians/blob/master/docs/soc2-hipaa-readiness.md)[Threat model](/Lians-ai/Lians/blob/master/docs/threat-model.md)[Production deploy checklist](/Lians-ai/Lians/blob/master/docs/deploy.md)\n\nLians is listed on the [official MCP Registry](https://registry.modelcontextprotocol.io/?q=io.github.ebeirne%2Flians). Any MCP-compatible host - Claude Desktop, Cursor, VS Code, Windsurf, and others - can use local persistent memory immediately or connect to a hosted Lians server. No SDK code, custom adapter, Docker service, URL, or API key is required for local mode.\n\nYour agents get eight tools automatically:\n\n| Tool | What it does |\n|---|---|\n`remember` |\nStore a fact with event time and metadata |\n`recall` |\nRetrieve current (non-stale) facts by semantic query |\n`recall_at` |\nPoint-in-time recall — what did we know on date X? |\n`reconstruct` |\nFull audit reconstruction for regulatory submissions |\n`list_conflicts` |\nSurface facts where two sources disagree |\n`memory_lineage` |\nFull supersession history of any fact |\n`fact_history` |\nTime-series view of a ticker+metric (e.g. AAPL EPS) |\n`backtest_check` |\nDetect lookahead bias before a backtest runs |\n\nAdd to your `claude_desktop_config.json`\n\n(or equivalent MCP config):\n\n```\n{\n  \"mcpServers\": {\n    \"lians\": {\n      \"command\": \"uvx\",\n      \"args\": [\"--from\", \"lians-sdk[mcp]\", \"lians-mcp\"]\n    }\n  }\n}\n```\n\nRestart your client and Lians memory tools appear immediately. Local mode persists to `~/.lians/mcp.db`\n\n. To use a hosted deployment instead, set `LIANS_URL`\n\n, `LIANS_API_KEY`\n\n, and optionally `LIANS_AGENT_ID`\n\n.\n\n```\nuvx --from 'lians-sdk[mcp]' lians-mcp\n```\n\nNo environment variables are needed for local mode. Set `LIANS_URL`\n\n, `LIANS_API_KEY`\n\n, and optionally `LIANS_AGENT_ID`\n\nto use a remote server.\n\n```\npip install lians-sdk[local]   # SQLite plus real local semantic embeddings, no Docker\npython\nfrom lians import LocalLiansClient\nfrom datetime import datetime, timezone\n\nmem = LocalLiansClient()\n\nmem.add(\n    agent_id=\"analyst-1\",\n    content=\"NVDA FY2026 revenue guidance raised to $40B\",\n    event_time=datetime(2025, 11, 19, 16, tzinfo=timezone.utc),\n    metadata={\"ticker\": \"NVDA\", \"metric\": \"revenue_guidance\"},\n)\n\n# Superseded facts are excluded at the DB layer — never reach the LLM\nresults = mem.recall(agent_id=\"analyst-1\", query=\"NVDA revenue guidance\")\n\n# Deeper multi-facet recall for planning and research\nresults = mem.recall(\n    agent_id=\"analyst-1\",\n    query=\"What changed in the guidance and why?\",\n    mode=\"deep\",\n)\n\n# Point-in-time: what did we know on March 1? (compliance-grade answer)\nresults = mem.recall_at(\n    agent_id=\"analyst-1\",\n    query=\"NVDA revenue guidance\",\n    as_of=datetime(2025, 3, 1, tzinfo=timezone.utc),\n)\n\n# Every result includes receipt_sha256, provenance_coverage, and the\n# resolved serving mode and latency budget.\n```\n\nSwitch to the hosted server with one line: `from lians import LiansClient as LocalLiansClient`\n\n``` python\nfrom datetime import datetime, timezone\nfrom lians import AsyncLiansClient\n\nasync with AsyncLiansClient(base_url=LIANS_URL, api_key=LIANS_API_KEY) as lians:\n    envelope = await lians.open_decision_envelope(\n        agent_id=\"underwriter-1\",\n        decision_type=\"credit_application\",\n        regime=\"ECOA_REG_B\",\n        completeness_profile=\"regulated_recordkeeping\",\n        knowledge_as_of=datetime.now(timezone.utc),\n    )\n\n    context = await lians.recall(\n        agent_id=\"underwriter-1\",\n        query=\"verified applicant income\",\n        decision_envelope_id=envelope[\"id\"],\n    )\n\n    sealed = await lians.seal_decision_envelope(\n        envelope[\"id\"],\n        outcome=\"manual_review\",\n        decided_at=datetime.now(timezone.utc),\n        input_hash=INPUT_SHA256,\n        output_hash=OUTPUT_SHA256,\n    )\n\n    # No overclaiming: every missing requirement names the grade it blocks.\n    print(sealed[\"completeness\"])\n```\n\n`LiansMemoryHarness`\n\nwraps the two operations every memory-augmented agent needs —\nrecall-before and remember-after — into one object, with the compliance scoping\n(subject, source, event-time, information barrier) regulated deployments require.\nWorks with any sync client (`LiansClient`\n\nor `LocalLiansClient`\n\n) and any model.\n\n``` python\nfrom lians import LiansClient, LiansMemoryHarness\n\nharness = LiansMemoryHarness(mem, agent_id=\"research-desk\", domain=\"finance\")\n\n# One call: recall context, run your model, persist the response.\nanswer = harness.run_turn(\n    \"What is NVDA's current revenue guidance?\",\n    generate=lambda context, query: call_model(f\"{context}\\n\\nUser: {query}\"),\n)\n\n# Or control each step:\ncontext = harness.recall_context(\"NVDA revenue guidance\")   # ready to inject\nharness.remember(\"Desk note: guidance now $40B\")            # write after the turn\n```\n\nRegulated scoping ties every write to one data subject and an information barrier:\n\n```\nharness = LiansMemoryHarness(\n    mem, agent_id=\"care-team-3\",\n    subject_id=\"MRN-00042\",       # per-subject key — the crypto-shred target\n    barrier_group=\"oncology\",     # information-barrier tag\n    domain=\"healthcare\",\n)\n```\n\nRunnable end-to-end demo: [ agentmem/examples/harness_demo.py](/Lians-ai/Lians/blob/master/agentmem/examples/harness_demo.py).\n\nSome compliance checks *are* graph queries. Lians stores **bitemporal relationship\nedges** alongside facts — same audit chain, same information barriers, no graph\ndatabase — so you can answer them point-in-time:\n\n**Legal**— conflict-of-interest reachability (ABA 1.7/1.9): is an attorney connected to an adverse party?** Finance**— related-party / beneficial-ownership (SEC, AML/KYC): is a counterparty within N hops of a restricted entity?** Healthcare**— care-network / referral-pattern (anti-kickback) analysis.\n\n```\nmem.relate(\"analyst-1\", src_entity=\"Attorney\", rel_type=\"represented\",\n           dst_entity=\"ClientX\", event_time=datetime(2026, 1, 1, tzinfo=timezone.utc))\nmem.relate(\"analyst-1\", src_entity=\"ClientX\", rel_type=\"adverse_to\",\n           dst_entity=\"PartyY\", event_time=datetime(2026, 1, 1, tzinfo=timezone.utc))\n\n# Conflict-of-interest check — is there a connection, and through what?\npath = mem.path(\"analyst-1\", src_entity=\"Attorney\", dst_entity=\"PartyY\")\n# → {\"connected\": True, \"hops\": 2, \"path\": [...]}\n\n# Point-in-time: who was connected on the day of the trade?\nmem.neighbors(\"analyst-1\", entity=\"FundA\", depth=2, as_of=datetime(2025, 6, 1, tzinfo=timezone.utc))\n\n# Graph-proximity reranking — boost recalls about entities near an anchor\nmem.recall_near(\"analyst-1\", query=\"earnings\", near_entity=\"FundA\", near_key=\"ticker\")\n```\n\nEndpoints: `POST /v1/graph/relate`\n\n· `/v1/graph/unrelate`\n\n· `/v1/graph/extract`\n\n(text → edges, rule-based or opt-in LLM) · `GET /v1/graph/neighbors`\n\n· `/v1/graph/path`\n\n(all `as_of`\n\n-capable). Inspired by [Zep/Graphiti](/Lians-ai/Lians/blob/master/docs/compare-zep.md), built on our compliance spine.\n\nGive any coding agent persistent, compliance-grade memory:\n\n| Host | How |\n|---|---|\nClaude Code |\nPlugin with slash commands (`/lians-remember` , `/lians-recall` , `/lians-audit` , `/lians-integrate` ) and a compliance subagent —\n`integrations/lians-plugin` |\nCodex |\nDrop-in `AGENTS.md` + MCP config —\n`integrations/codex` |\nSkills standard |\n`npx skills add https://github.com/Lians-ai/Lians --skill lians` — works in Claude Code, Codex, Cursor —\n`skills/` |\nAny MCP host |\nOne-time config; eight native memory tools — see\n|\n\nInstitutional AI agents accumulate facts that **change over time**: rate decisions\nsupersede prior ones, guidance gets revised, medication doses change, care plans\nevolve, damages estimates move, and matter facts are corrected during discovery.\nSystems that return every version with equal rank contaminate the LLM context with\nstale facts.\n\nLians fixes this with a bitemporal model:\n\n**event_time**— when the fact happened (business time)** valid_from / valid_to**— when it was known (system time)\n\nSuperseded facts are excluded at the database layer. Every write is recorded in a tamper-evident SHA-256 hash chain; physical immutability and SEC 17a-4 deployment claims require separately configured WORM storage and policy controls. Per-subject keys can be destroyed for governed erasure while the audit trail survives. Information barriers are enforced at PostgreSQL RLS, not only at the application layer.\n\nTemporal memory is no longer unique: Graphiti documents a bitemporal knowledge graph, Mem0 documents temporal reasoning and history, Hindsight documents query-time temporal recall and audit controls, and Supermemory documents content versioning and a temporal graph. Lians should be evaluated on the compound decision-evidence boundary it implements:\n\n- reconstruct a named decision at both event-time and knowledge-time cutoffs;\n- enumerate the source versions included and excluded at those cutoffs;\n- detect post-cutoff leakage before a result is accepted;\n- emit a content-addressed Evidence Pack that can be verified offline; and\n- preserve the surrounding chain when subject content is crypto-erased.\n\nThe repository's regulated-memory harness is useful product evidence, not an\nindependent general-product leaderboard. Current leadership language remains\ngated on production load, isolation, restore, failure-injection, public benchmark,\nand independent-reproduction evidence. See [docs/competitive-landscape.md](/Lians-ai/Lians/blob/master/docs/competitive-landscape.md)\nand the runnable claim policy in\n[ agentmem/benchmarks/release_claims.py](/Lians-ai/Lians/blob/master/agentmem/benchmarks/release_claims.py).\n\n→ **Lookahead-bias demo** — the same agent backtest with naive vs point-in-time retrieval (Sharpe 4.6 vs −0.6, every leak logged): [ebeirne/lookahead-bias-demo](https://github.com/ebeirne/lookahead-bias-demo) · [in-repo](/Lians-ai/Lians/blob/master/demo/lookahead-bias/README.md)\n→ Full benchmark numbers: [docs/benchmark.md](/Lians-ai/Lians/blob/master/docs/benchmark.md)\n→ Regulated-eval head-to-head (five compliance invariants, Lians **5.0** / Zep–Graphiti **2.0** / mem0 **0.5**): [docs/regulated-eval-results.md](/Lians-ai/Lians/blob/master/docs/regulated-eval-results.md) — Lians, Graphiti OSS, and mem0 OSS all **executed live** in their default configurations (per-cell evidence in the appendix); remaining columns scored from their public API surface via runnable adapters you can re-run with keys.\n\nLians maintains client implementations across **five languages**. Public package\nversions currently differ by ecosystem; use the explicit coordinates below and\nverify the machine-readable [published release status](/Lians-ai/Lians/blob/master/docs/published-release-status.json).\n\n| Language | Install | Client | Docs |\n|---|---|---|---|\nPython 0.4.2 |\n`pip install lians-sdk==0.4.2` |\n`from lians import LiansClient` |\n|\n\n**TypeScript / Node 0.4.0**`npm install @lians-ai/lians@0.4.0`\n\n`import { LiansClient } from \"@lians-ai/lians\"`\n\n[sdk/typescript](/Lians-ai/Lians/blob/master/agentmem/sdk/typescript)**Go 0.4.1**`go get github.com/Lians-ai/Lians/agentmem/sdk/go@v0.4.1`\n\n`lians.NewClient(url, key)`\n\n[sdk/go](/Lians-ai/Lians/blob/master/agentmem/sdk/go)**Java 0.4.1**(JVM 11+)`ai.lians:lians-sdk:0.4.1`\n\n(Maven Central)`new LiansClient(opts)`\n\n[sdk/java](/Lians-ai/Lians/blob/master/agentmem/sdk/java)**C 0.4.1**(C99 + libcurl)`v0.4.1`\n\nsource tag`lians_client_new(...)`\n\n[sdk/c](/Lians-ai/Lians/blob/master/agentmem/sdk/c)→ **One-page install + 30-second quickstart for every language: docs/install.md**\n\nAll five cover core memory operations. Python and TypeScript currently expose a broader advanced surface than Go, Java, and C; verify the client you plan to use against the OpenAPI contract before a pilot.\n\n| Framework | Install | Import |\n|---|---|---|\nLangChain |\n`pip install lians-sdk[langchain]` |\n`from lians.langchain_integration import LiansChatHistory, build_tools` |\nLangGraph |\n`pip install lians-sdk[langgraph]` |\n`from lians.langgraph_integration import create_recall_node, create_remember_node` |\nCrewAI |\n`pip install lians-sdk[crewai]` |\n`from lians.crewai_integration import build_crewai_tools` |\nOpenAI Agents SDK |\n`pip install lians-sdk[openai-agents]` |\n`from lians.openai_agents_integration import build_openai_agent_tools` |\nAutoGen v0.4 |\n`pip install lians-sdk[autogen]` |\n`from lians.autogen_integration import build_autogen_tools` |\nTypeScript / Node |\n`npm install @lians-ai/lians` |\n`import { LiansClient } from \"@lians-ai/lians\"` |\n\n```\ngit clone https://github.com/Lians-ai/Lians.git && cd Lians/agentmem\ncp .env.demo .env\ndocker compose up --build -d\npython scripts/seed_demo.py   # prints a demo API key; open demo/index.html\n```\n\nDeploy to Fly.io, Kubernetes, or bare Docker: [docs/deploy.md](/Lians-ai/Lians/blob/master/docs/deploy.md)\n\n``` python\n# All three clients share the same API surface\nfrom lians import LiansClient          # sync, connects to hosted/self-hosted server\nfrom lians import AsyncLiansClient     # async, for FastAPI / async frameworks\nfrom lians import LocalLiansClient     # local SQLite, no server needed\n\nclient.add(agent_id, content, event_time, metadata={}, importance=0.5)\nclient.add_from_messages(agent_id, messages=[{\"role\": \"user\", \"content\": \"...\"}])\nclient.recall(agent_id, query, k=5)\nclient.recall_at(agent_id, query, as_of=datetime(...))   # point-in-time\nclient.snapshot(agent_id, as_of=datetime(...))           # full state export\nclient.backtest_check(agent_id, simulation_as_of=...)    # lookahead-bias detection\nclient.erase(subject_id, request_ref)                    # GDPR crypto-shred\n┌──────────────┐\n                    │  LLM / Agent │\n                    └──────┬───────┘\n                           │  REST / MCP\n               ┌───────────▼────────────┐\n               │        Lians API        │   FastAPI · rate-limit · OTEL\n               └──┬────────────────┬────┘\n          ┌───────▼──────┐  ┌──────▼───────┐\n          │   memories    │  │  event_log   │\n          │  (encrypted)  │  │ (hash chain) │\n          │  bitemporal   │  │  append-only │\n          └───────┬───────┘  └──────────────┘\n                  │\n          ┌───────▼───────┐\n          │  subject_keys  │   AES-256-GCM per subject\n          │  (crypto-shred)│   destroy key = content unrecoverable\n          └───────────────┘\n\n  Postgres 16 + pgvector (HNSW)      Redis (recall hot cache)\n```\n\n**Recall pipeline:** BM25 + cosine (Voyage Finance-2) → recency decay → validity gate (`valid_to IS NULL`\n\nfor present; `valid_from ≤ as_of < valid_to`\n\nfor point-in-time)\n\n**Supersession pipeline:** Stage 1 (metadata key overlap) → Stage 2 (deterministic: SUPERSEDES / CONFIRMS / ADDS) → Stage 3 (optional LLM adjudication for paraphrase detection)\n\n| Variable | Default | Description |\n|---|---|---|\n`EMBEDDING_PROVIDER` |\n`local` |\n`voyage` · `openai` · `sentence-transformers` · `local` |\n`VOYAGE_API_KEY` |\n— | Required when `EMBEDDING_PROVIDER=voyage` |\n`MASTER_ENCRYPTION_KEY` |\n— | Base64 32-byte key; blank disables PII encryption |\n`KMS_PROVIDER` |\n`env` |\n`env` · `aws` · `azure` · `vault` |\n`ADMIN_SECRET` |\n— | Protects `/v1/admin/*` — change in production |\n`SUPERSESSION_LLM_STAGE` |\n`false` |\nEnables Stage 3 LLM adjudication (Claude Haiku) |\n`AIRGAP_MODE` |\n`false` |\nHard-fails at startup if any config would send data externally |\n`ADMISSION_MODE` |\n`monitor` |\nAdmission control: `off` · `monitor` (tag+audit) · `enforce` (reject injection/blocked source, hold PII/PHI/MNPI for review) |\n`SIEM_URL` |\n— | Stream every audit event to a SIEM collector (Splunk HEC / Datadog / Elastic) |\n`WORM_MODE` |\n`false` |\nAttest write-once-read-many storage for SEC 17a-4 (object-locked audit, no UPDATE/DELETE on `event_log` ) |\n`STRIPE_API_KEY` |\n— | Enables per-namespace usage metering |\n\nFull reference: [agentmem/.env.example](/Lians-ai/Lians/blob/master/agentmem/.env.example)\n\n| Method | Path | Description |\n|---|---|---|\n`POST` |\n`/v1/memories` |\nAdd a memory (admission control; supersession check; `Idempotency-Key` for exactly-once retries) |\n`GET` /`POST` |\n`/v1/admissions` · `/{id}/resolve` |\nReview queue for held writes (PII/PHI/MNPI) — approve / reject |\n`POST` |\n`/v1/memories/batch` |\nBatch ingest |\n`POST` |\n`/v1/recall` |\nHybrid BM25+cosine recall; optional `as_of` , MMR rerank (`filters._rerank=mmr` ) |\n`POST` |\n`/v1/context` |\nToken-budgeted, ready-to-inject context block (point-in-time + MMR aware) |\n`POST` |\n`/v1/erase` |\nGDPR crypto-shred by `subject_id` |\n`GET` |\n`/v1/audit/reconstruct` |\nReconstruct agent state at any past date |\n`GET` |\n`/v1/admin/audit/verify` |\nVerify SHA-256 hash chain integrity |\n`GET` |\n`/v1/admin/audit/export` |\nExport audit log (SEC/FINRA/CFTC) |\n`GET` |\n`/livez` |\nLiveness probe (cheap; process up) |\n`GET` |\n`/readyz` · `/health` |\nReadiness / deep health check (DB + Redis) |\n\nInteractive docs: `http://localhost:8000/docs`\n\n```\npip install -e \".[dev]\"\npython scripts/test_all.py\n\n# Benchmarks only (no API keys required)\nPYTHONPATH=agentmem/src python -m pytest \\\n  agentmem/tests/test_supersession_benchmark.py \\\n  agentmem/tests/test_recall_quality.py -v\n```\n\nSee [docs/testing.md](/Lians-ai/Lians/blob/master/docs/testing.md) for the six named invariants (temporal soundness, audit immutability, erasure, etc.).\n\nBuilt to run in a regulated production environment, not just to demo:\n\n**Exactly-once writes**—`Idempotency-Key`\n\non`POST /v1/memories`\n\n; the SDKs send a stable key automatically, so a retried write never duplicates.**Resilient clients**— built-in retry with exponential backoff on transport errors / 5xx / 429.** Kubernetes probes**— cheap`/livez`\n\n(liveness) and deep`/readyz`\n\n(readiness), so a dependency blip doesn't restart healthy pods.**Rate limiting**— per-API-key sliding window (Redis), fails open.** Access control**— namespace-scoped keys,`read`\n\n/`write`\n\n/`admin`\n\nscopes,**RBAC roles**(`owner`\n\n/`analyst`\n\n/`compliance`\n\n/`readonly`\n\n), and SSO via gateway forward-auth.**DB-layer information barriers**—`RESTRICTIVE`\n\nPostgreSQL RLS,**proven in CI** against a non-superuser role.*Run the app as a non-superuser DB role*— superusers bypass RLS.**Memory admission control**— govern what's*allowed into*memory: PII/PHI/MNPI detection, source-trust, prompt-injection quarantine, and a high-risk review queue (`ADMISSION_MODE`\n\n). No other memory layer does this.**SIEM streaming**— every audit event forwarded to Splunk HEC / Datadog / Elastic (`SIEM_URL`\n\n), fire-and-forget.**Observability**— Prometheus metrics + Grafana, OpenTelemetry traces, JSON access logs with a request ID.** Evaluation**— a judge-free memory-eval harness (`agentmem/benchmarks/memory_eval.py`\n\n) in the LoCoMo/LongMemEval shape.\n\nSecurity & procurement docs: [security-whitepaper.md](/Lians-ai/Lians/blob/master/docs/security-whitepaper.md) · [threat-model.md](/Lians-ai/Lians/blob/master/docs/threat-model.md) · [soc2-hipaa-readiness.md](/Lians-ai/Lians/blob/master/docs/soc2-hipaa-readiness.md) · [sso.md](/Lians-ai/Lians/blob/master/docs/sso.md) · [publishing.md](/Lians-ai/Lians/blob/master/docs/publishing.md)\n\n| Requirement | Feature |\n|---|---|\n| SEC 17a-4 tamper-evidence | SHA-256 hash chain on every audit row |\n| FINRA 4511 recordkeeping | Append-only `event_log` |\n| GDPR Art. 17 erasure | AES-256-GCM per-subject keys; crypto-shred |\n| MiFID II point-in-time | Bitemporal: `event_time` + `valid_from/valid_to` |\n| Information barriers | `barrier_group` column; PostgreSQL RLS |\n| HIPAA §164.312 | Per-subject encryption, audit controls, transmission security |\n\nScope of these claims:Lians provides thetechnical controlsmapped above — it is software, not a certification. Regulatory compliance is a property of your deployment and organization (retention configuration, policies, attestations such as SOC 2 or a HIPAA assessment), and several controls require operator configuration (WORM object-lock, non-superuser DB role, KMS). Every claim links to the doc that says exactly what is and isn't covered — start with[soc2-hipaa-readiness.md].\n\nFull documentation: [compliance.md](/Lians-ai/Lians/blob/master/docs/compliance.md) · [hipaa.md](/Lians-ai/Lians/blob/master/docs/hipaa.md) · [security-whitepaper.md](/Lians-ai/Lians/blob/master/docs/security-whitepaper.md) · [threat-model.md](/Lians-ai/Lians/blob/master/docs/threat-model.md) · [soc2-hipaa-readiness.md](/Lians-ai/Lians/blob/master/docs/soc2-hipaa-readiness.md) · [sso.md](/Lians-ai/Lians/blob/master/docs/sso.md) · [worm-storage.md](/Lians-ai/Lians/blob/master/docs/worm-storage.md)\n\nAccess control: namespace-scoped API keys with `read`\n\n/`write`\n\n/`admin`\n\nscopes and RBAC roles (`owner`\n\n/`analyst`\n\n/`compliance`\n\n/`readonly`\n\n); SSO via gateway forward-auth (any OIDC/SAML IdP).\n\nLians is open-source and fully self-hostable — **the entire feature set,\nincluding every compliance primitive, is in this repository under Apache 2.0.**\nPaid packages sell deployment support, hardening review, and evidence\npackets around the open core, not license keys. A managed cloud is in early\naccess for customers whose compliance posture allows hosted processing\n(contact us); regulated buyers should choose the package by deployment\nboundary and evidence requirements, not by a consumer-style monthly tier.\n\n| Package | Best for | Deployment | Commercial model |\n|---|---|---|---|\nDeveloper |\nLocal prototypes, benchmarks, integrations | Local library or single-node server | Free / usage-based |\nTeam |\nInternal pilots and non-production agent workflows | Docker or small Kubernetes deployment | Usage-based or team plan |\nRegulated Production |\nSensitive, audited, time-dependent agent workloads | Customer cloud, private VPC, or on-prem | Annual contract |\nEnterprise / Air-Gap |\nBanks, hospitals, law firms, insurers, government | Private cloud, on-prem, or air-gapped | Custom annual contract |\nManaged Cloud |\nZero-ops production where hosted processing is approved | Lians-managed environment | Contract or usage-based |\n\nHealthcare customers require an executed BAA before PHI is processed in a managed environment. Financial and legal customers may require customer-managed keys, private networking, regional residency, dedicated environments, or air-gapped deployment.\n\nFull packaging documentation: [docs/pricing-tiers.md](/Lians-ai/Lians/blob/master/docs/pricing-tiers.md) and [docs/billing.md](/Lians-ai/Lians/blob/master/docs/billing.md)\n\n**Switching from another system?** [Migrate from mem0](/Lians-ai/Lians/blob/master/docs/migrate-from-mem0.md) or [Migrate from Zep CE](/Lians-ai/Lians/blob/master/docs/migrate-from-zep.md)\n\nApache 2.0 — see [LICENSE](/Lians-ai/Lians/blob/master/LICENSE).", "url": "https://wpnews.pro/news/show-hn-lians-ai-token-bounded-memory-and-evidence-for-ai-workflows", "canonical_source": "https://github.com/Lians-ai/Lians", "published_at": "2026-08-10 18:54:01+00:00", "updated_at": "2026-08-10 19:13:43.179502+00:00", "lang": "en", "topics": ["ai-infrastructure", "ai-tools", "ai-products", "ai-ethics"], "entities": ["Lians AI", "Lians", "Bedrock", "Azure OpenAI", "Anthropic"], "alternates": {"html": "https://wpnews.pro/news/show-hn-lians-ai-token-bounded-memory-and-evidence-for-ai-workflows", "markdown": "https://wpnews.pro/news/show-hn-lians-ai-token-bounded-memory-and-evidence-for-ai-workflows.md", "text": "https://wpnews.pro/news/show-hn-lians-ai-token-bounded-memory-and-evidence-for-ai-workflows.txt", "jsonld": "https://wpnews.pro/news/show-hn-lians-ai-token-bounded-memory-and-evidence-for-ai-workflows.jsonld"}}