# Shihai — Long-Term Memory for Any AI

> Local, offline long-term memory for AI agents using MCP and quantized embeddings.

Shihai — Long-Term Memory for Any AI is a free AI agent skill on Agensi by 苏苏侠, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [苏苏侠](https://www.agensi.io/creators/creator-1419)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Version: 1.0
- Last updated: 2026-11-23
- Security: scan passed (2026-11-23); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/shihai-long-term-memory-for-any-ai
- Tags: llm-ops, node-js, mcp-server, memory, long-term-memory, local-first

## About this skill

Shihai (识海) is a long-term memory layer for AI agents. It runs locally on the user's machine as an MCP server, so an agent can store what the user tells it and recall it in later sessions.

Why it exists: every new chat session starts blank. The agent forgets your name, your project, your preferences. Shihai fixes that without sending anything to a server.

What it does:
- 23 memory tools: add, search, list, confirm, doubt, annotate, archive, count, export/import, and more
- Memories decay: frequently recalled ones stay bright, forgotten ones sink, deleted ones leave a mark
- Recall is semantic, not keyword: ask about "that copper key" and it finds the entry that said "KT-2041"
- Fully offline: the embedding model (22.9 MB, quantized) ships inside the npm package. No Python, no network, no API key
- Data lives in ~/.dsh/consciousness-seas on the user's own disk

Install (on the user's machine, once):
  npm i -g shihai-mcp
  shihai start

Requirements: Node.js 20+. Works on Windows, macOS, Linux.

How the agent uses it: this skill tells the agent when to call which memory tool. The server itself runs locally; Agensi is only the listing that points at it.

Free. Open source. No account, no telemetry.

## Requires

- Node.js

## Known limitations

Requires Node.js 20+. Local server must be running via CLI. Does not store full transcripts, only summarized nodes.The local server must be running (shihai start) before the agent can call any tool.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Shihai — Long-Term Memory for Any AI skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does dsh consciousness prevent my AI agent from forgetting previous conversations?

This skill provides AI agents with a local, persistent memory store, solving the 'amnesia' problem where agents forget project details, preferences, and past decisions once a session ends.

### Does my memory data get sent to an external cloud or AI provider for processing?

No, all data and the embedding model stay entirely on your local machine; this skill uses a quantized 22.9 MB model to perform vector searches without ever sending your private data to the cloud.

### Which AI agents or frameworks can I use with this memory skill?

It is compatible with any agent or platform that supports the Model Context Protocol (MCP) or OpenAI-compatible HTTP proxies, provided you have Node.js (v20+) installed locally.

### Does this skill store every word of my chats, or just specific summaries?

Unlike full transcripts which can clutter the context window, this skill distills interactions into 'memory nodes,' allowing the agent to retrieve only the most relevant facts via semantic search.

### is it free?

Yes. The skill, the local model and all 23 tools are free. Install with npm i -g shihai-mcp and run shihai start — no account, no licence key, no paid tier.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
