Skip to main content
Glama
Lians-ai

Lians Agent Memory

Official

Memory for any AI agent.

Lians gives AI agents durable memory across chats, sessions, tools, and models. Your agent can remember a useful fact now and recall it when it matters later.

  • Works with the AI you already use through MCP, plugins, or an SDK.

  • Runs locally by default with SQLite and no Lians account or API key.

  • Keeps memory focused by returning a small, relevant set of current facts.

  • Stays provider-neutral so memory is not trapped inside one model vendor.

Lians is a memory layer, not another assistant. Your agent and model stay the same; Lians gives them a place to remember.

Install Lians without a terminal

Download LiansMemory for Windows, macOS, or Linux from GitHub Releases, open it, choose the AI clients found on your computer, and select Install Lians.

The desktop setup:

  • needs no Lians account, API key, Python installation, or model download;

  • safely backs up existing client settings before changing them;

  • gives supported clients one shared local memory profile; and

  • includes a diagnostic command and silent install mode for managed devices.

Restart the selected AI client, then try:

Remember that I am researching sustainable packaging for independent retailers.

The first standalone builds support Claude Desktop, Cursor, Windsurf, Gemini CLI, and Codex. ChatGPT does not load local stdio MCP servers, so the installer does not modify ChatGPT; it requires a hosted connector. See the guided install and IT deployment guide.

Related MCP server: Citadel

Developer setup: add memory through MCP

Use this path when you prefer a package-managed MCP server or want the full temporal and governance engine.

Install uv, then add this server to your agent's MCP configuration:

{
  "mcpServers": {
    "lians": {
      "command": "uvx",
      "args": ["--from", "lians-sdk[mcp]", "lians-mcp"],
      "env": {
        "LIANS_MCP_ENABLED_TOOLS": "remember,recall,list_memories,correct_memory,forget_memory"
      }
    }
  }
}

Restart your agent and try two prompts in separate chats:

Remember that this project uses Python 3.12 and pytest.
What Python version and test runner does this project use?

Local MCP memory is stored in ~/.lians/mcp.db. The starter configuration exposes the basic loop plus the controls needed to trust it:

Tool

What it does

remember

Store one durable fact, preference, constraint, or decision.

recall

Retrieve a small set of relevant, current memories.

list_memories

Inspect what Lians currently knows.

correct_memory

Replace a stale fact without hiding its history.

forget_memory

Permanently erase one memory after explicit confirmation.

Use the exact setup guide for Cursor, Gemini CLI, Claude Code, or Codex. Remove LIANS_MCP_ENABLED_TOOLS when you want the advanced temporal and audit tools too.

How it works

you → your AI agent → remember / recall → Lians → local SQLite
  1. You or your agent explicitly saves something worth keeping.

  2. A later session asks Lians for memory related to the current task.

  3. Lians returns bounded context instead of replaying every old conversation.

  4. When a fact changes, Lians can supersede the stale version instead of sending both versions back to the model.

No model provider owns the memory. You can point another compatible agent at the same Lians store and continue from the same context.

Use Lians in Python

For an application, notebook, or agent loop that needs in-process memory:

pip install "lians-sdk[local]"
from datetime import datetime, timezone
from lians import LocalLiansClient

memory = LocalLiansClient(db_path=".lians/memory.db")

memory.add(
    agent_id="my-agent",
    content="The project uses Python 3.12 and pytest.",
    event_time=datetime.now(timezone.utc),
    metadata={"project": "demo", "topic": "tooling"},
)

result = memory.recall(
    agent_id="my-agent",
    query="Which Python version and test runner should I use?",
)

for item in result["memories"]:
    print(item["content"])

Local mode needs no server, Docker container, or API key. The first run may download the local embedding model.

Install from this repository

git clone https://github.com/Lians-ai/Lians.git
cd Lians
python -m pip install -e "agentmem/sdk/python[local,mcp]"

That editable install includes the local Python client and the lians-mcp entry point. See the full install guide for TypeScript, Go, Java, C, framework adapters, and self-hosting.

Choose the interface that fits

You want to...

Start with

Add memory without a terminal

Lians Easy

Give an existing AI client memory from a terminal

MCP setup

Add local memory inside Python

LocalLiansClient

Connect Python or TypeScript to a Lians server

Language SDKs

Use Pydantic AI, LangChain, LangGraph, CrewAI, OpenAI Agents, or AutoGen

Framework integrations

Run the full service yourself

Self-host Lians

Why Lians

Most memory demos store text and run vector search. Lians also handles the problems that appear when an agent keeps memory for more than a few sessions:

  • Current over stale: corrected facts can supersede earlier versions.

  • Small over noisy: recall is bounded so the model gets useful context.

  • Local over locked-in: local mode keeps data on your machine.

  • Portable over provider-specific: MCP and SDKs work across agent stacks.

  • Inspectable over opaque: memories can retain timestamps, sources, and lineage.

Lians also supports point-in-time recall, conflict inspection, memory lineage, tamper-evident audit history, governed erasure, information barriers, and decision reconstruction. These capabilities are available when a project needs them; they are not required to get started.

Repository map

agentmem/src/lians/          Core engine and HTTP service
agentmem/sdk/python/        Python SDK, local client, and MCP server
agentmem/sdk/typescript/    TypeScript SDK
packages/lians-easy/        Dependency-free desktop runtime and installer
integrations/               Agent and framework integrations
plugins/                    Installable agent plugins
docs/                       Setup, architecture, security, and operations

Development

git clone https://github.com/Lians-ai/Lians.git
cd Lians
python -m pip install -e ".[dev]"
python scripts/test_all.py

Focused test runs and development conventions are in docs/CONTRIBUTING.md. Published package and registry versions are tracked in docs/published-release-status.json.

Community

If Lians is useful to you, star the repository. It helps other agent developers find the project.

License

Apache 2.0 — see LICENSE.

Install Server
A
license - permissive license
A
quality
A
maintenance

Maintenance

Maintainers
13dResponse time
3dRelease cycle
11Releases (12mo)
Commit activity
Issues opened vs closed

Related MCP Servers

  • A
    license
    -
    quality
    C
    maintenance
    Local-first memory kernel for coding agents that provides a shared, auditable, graph-backed long-term memory layer with features like write preview, temporal recall, and provenance explanations.
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Local-first, source-traceable memory for AI agents — no LLM at ingest, $0 per message, zero data egress. Gives Claude Code, Cursor, and any MCP client one shared persistent memory with semantic recall, belief revision, selective forgetting, and a provenance guard that blocks acting on stale or unconfirmed memories.
    23
    12
    MIT
  • F
    license
    -
    quality
    A
    maintenance
    Local-first memory for AI agents with evidence-backed recall, deterministic trust verdicts, self-inspection, and a tamper-evident audit history.
    3

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Lians-ai/Lians'

If you have feedback or need assistance with the MCP directory API, please join our Discord server