Deterministic by design
Recall is cheap, auditable, and consistent. You can write tests against it instead of treating memory as an opaque side effect.
ai-knot is a self-hosted memory layer for agents — with no LLM on the read path or the write path. It keeps structured knowledge in SQLite, PostgreSQL, or YAML, recalls only what the next turn needs — for one agent or a whole team — and drops into your stack in one line: MCP, HTTP, or native framework adapters.
Most agents still treat memory as a growing transcript. ai-knot treats memory as a knowledge layer: extract or add facts, store them in your own backend, and recall only the few facts the next turn needs.
ai-knot add / learn →
ai-knot search → ai-knot list →
ai-knot delete
Recall is cheap, auditable, and consistent. You can write tests against it instead of treating memory as an opaque side effect.
Keep the same API while switching between YAML, SQLite, and PostgreSQL. The store stays inspectable and under your control.
Start from the environment you already use: plain Python callables, MCP, CrewAI, LlamaIndex, LangGraph, AutoGen, OpenAI Agents SDK, PydanticAI, HTTP, TypeScript, notebook, or browser inspector.
Start with ai-knot demo for the installed proof, then drop to KnowledgeBase.add() and search() / recall() when you want the raw API.
One-command default-config setup for Claude Desktop, Claude Code, and OpenClaw on supported platforms. Try ai-knot setup openclaw --agent-id assistant --storage sqlite --write-default-config, then ai-knot doctor --json. Use serve-mcp for remote Streamable HTTP hosts.
Read-only memory viewer for demos, debugging, and trust-building.
Seeded demoRendered zero-network tutorial with outputs already visible on GitHub.
Open notebookUse Crew(memory=...) or memory.scope(...).
Use create_basic_memory_functions(...) when your runtime wants plain Python callables instead of LangChain tool objects.
Use create_basic_memory_tools(...) for the explicit add/search/list/delete loop, add create_get_memory_tool(...) or include_get=True for targeted by-id inspection, or keep create_manage_memory_tool(...) plus create_search_memory_tool(...).
Use AiKnotLlamaIndexMemory through the native memory=... seam.
Append recalled facts through runtime instructions=....
Attach AiKnotAutoGenMemory to AssistantAgent.
Inject long-term memory through RunConfig.
Use HttpKnowledgeBase over the HTTP sidecar when your runtime should not spawn the local MCP subprocess, and use npx ai-knot-doctor when you do want the npm bridge path. The sidecar path also keeps learn([...]) and addResolved([...]), including explicit op values for update/delete/noop memory correction.
The repo already includes multiple no-surprises entry points. Use the one that matches how you evaluate developer tools.
Open the repo in Codespaces, then run the install-free first commands from docs/codespaces-quickstart.md.
Run python examples/browser_inspector_demo.py and open /inspect.
Open examples/README.md for the quickest zero-network or real wiring proof by stack.
Run ai-knot demo for the built-in add / search / list / get / delete proof, then switch to learn when you want LLM-based extraction.
Run npm install ai-knot then npx ai-knot-demo when you want to verify the packaged Node bridge before writing TypeScript app code.
Run ai-knot serve-mcp assistant --port 8765 when your host supports HTTP MCP instead of stdio.
Inspect docs/benchmarks.md and re-run the deterministic suite.
One cross-surface command map for add, search, list, and delete.
Why agent memory should be treated as a knowledge layer, not a log.
Read itPractical guide for adding deterministic memory to an agent in under 30 minutes.
Read itNamed-reader QA numbers plus deterministic retrieval numbers.
Inspect the numbersWhen to choose ai-knot vs Mem0, Graphiti, Letta, or LangMem.
Compare trade-offsShort answers for evaluation questions, objections, and skeptical readers.
Open FAQFind the right install path and surface for CrewAI, LangGraph, LlamaIndex, MCP, HTTP, and TypeScript.
Browse integrations