Lians Agent Memory
OfficialMemory 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 |
| Store one durable fact, preference, constraint, or decision. |
| Retrieve a small set of relevant, current memories. |
| Inspect what Lians currently knows. |
| Replace a stale fact without hiding its history. |
| 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 SQLiteYou or your agent explicitly saves something worth keeping.
A later session asks Lians for memory related to the current task.
Lians returns bounded context instead of replaying every old conversation.
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 | |
Give an existing AI client memory from a terminal | |
Add local memory inside Python | |
Connect Python or TypeScript to a Lians server | |
Use Pydantic AI, LangChain, LangGraph, CrewAI, OpenAI Agents, or AutoGen | |
Run the full service yourself |
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 operationsDevelopment
git clone https://github.com/Lians-ai/Lians.git
cd Lians
python -m pip install -e ".[dev]"
python scripts/test_all.pyFocused test runs and development conventions are in docs/CONTRIBUTING.md. Published package and registry versions are tracked in docs/published-release-status.json.
Community
Ask a question or report a bug in GitHub Issues.
Request a new agent or framework integration with the integration template.
Read the security policy before reporting a vulnerability.
If Lians is useful to you, star the repository. It helps other agent developers find the project.
License
Apache 2.0 — see LICENSE.
Maintenance
Related MCP Servers
- Alicense-qualityCmaintenanceLocal-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
- Alicense-qualityAmaintenanceLocal-first, encrypted memory for AI agents, with cryptographic forgetting.3Apache 2.0
- AlicenseAqualityAmaintenanceLocal-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.2312MIT
- Flicense-qualityAmaintenanceLocal-first memory for AI agents with evidence-backed recall, deterministic trust verdicts, self-inspection, and a tamper-evident audit history.3
Related MCP Connectors
Shared, verifiable memory for AI agents and robots: signed tokens that resolve and verify offline.
Persistent memory for AI agents — verbatim conversations, searchable by meaning.
Persistent memory and knowledge graphs for AI agents. Hybrid search, context checkpoints, and more.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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