search_knowledge
Semantic search across your AI conversation knowledge base. Returns matching notes ranked by relevance.
limitquery必填
io.github.ZengLiangYi由 GitHub 账号 ZengLiangYi 发布v0.6.2更新于 Oct 30, 2026
Local-first AI PKM memory for coding conversations.
本地优先的 AI 编程对话个人知识库,让助手检索提炼后的笔记,并召回或保存可复用的任务记忆。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
参照 仓库 中的启动说明。
ChatCrystal collects conversations from AI coding tools (Claude Code, Cursor, Codex CLI, Trae, GitHub Copilot), uses LLM to distill them into searchable structured notes, and builds your personal knowledge base.
Requires Node.js >= 20 and an LLM service (Ollama, OpenAI, OrcaRouter, Anthropic, Google AI, or any OpenAI-compatible API).
The server auto-launches in background on first command. No manual setup needed.
For a Docker cloud instance, save the shared token once:
crystal import still scans and parses histories on the local device, then uploads normalized conversations to the cloud instance. The cloud server does not scan your local filesystem. crystal mcp reuses the same saved connection and token.
HTTPS is recommended for cloud connections, but HTTP works when that is the deployment you choose.
To manage a Docker cloud token:
If CHATCRYSTAL_API_TOKEN is set in the deployment environment, change that environment variable and recreate the container instead of using token reset.
Global options: --base-url <url> (server address), --token <token> (cloud API token), --json (force JSON output), --version
Output: TTY-aware — colored tables in terminal, JSON when piped.
Integrate with AI coding tools so they can retrieve knowledge from your conversation history during coding.
Add to settings.json:
Runtime configuration is stored in config.json under the active data directory. CLI, MCP, repo/dev checkouts, npm global installs, and Electron default to ~/.chatcrystal/data. Use crystal config set for persistent config. .env remains available only as an optional local override layer.
OrcaRouter uses ChatCrystal's built-in https://api.orcarouter.ai/v1 Base URL. Set llm.provider to orcarouter, provide an API Key, and select a discovered model in the Web UI; no llm.baseURL is required. Get an OrcaRouter API Key.
Automatically detects and imports from:
ChatCrystal also has a web UI and Electron desktop app. See the GitHub repository for details.
来源:server/README.md,提交 7642768
Semantic search across your AI conversation knowledge base. Returns matching notes ranked by relevance.
limitquery必填Get the full content of a note including title, summary, key conclusions, code snippets, and tags.
id必填List note summaries for browsing and narrowing the ChatCrystal knowledge base. Use this when you need paginated notes filtered by tag or title/summary keyword. Use search_knowledge instead for semantic relevance ranking, and get_note when you already have an id and need the full note body. Returns note metadata and summaries, not full note content.
tagpagesearchGet related notes for a given note, including relationship type and confidence score.
noteId必填Retrieve reusable task memories before starting substantive coding work. Use this at the beginning of implementation, debugging, migration, configuration, investigation, refactor, or optimization tasks to load project-scoped memories first and optional global lessons second. Use mode="debug" when the user reports an error, failing command, regression, or incident; include error_signatures and related_files when available. Use search_knowledge instead for ad hoc semantic note search that is not tied to the current task. This tool is read-only and returns ranked memories plus optional related-note context without writing anything.
modetask必填optionsDry-run validation for a candidate task memory before calling write_task_memory. Use this after meaningful work and before persisting a lesson to check whether the candidate is durable, specific, reusable, and shaped like a high-quality ChatCrystal note. It has no side effects and never writes to the knowledge base. Returns acceptance, rejection reason, warnings, and materialized note fields so agents can revise the candidate or skip weak work logs.
mode必填task必填scopememory必填source_run_keyPersist a task memory only when it can become a high-quality ChatCrystal note: specific title, concrete summary, meaningful key conclusions, and a durable reusable lesson such as a pitfall, fix, decision, pattern, or symptom-to-resolution mapping. Do not write one-time environment checks, version/status reports, ordinary progress logs, or vague robustness claims. Weak auto writebacks are skipped by core validation and recorded only as receipts.
mode必填task必填scopememory必填source_run_key已满足适用检查项的 90%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
npm install -g chatcrystalcrystal import # Scan and import AI conversationscrystal summarize --all # Batch summarize into notescrystal search "React state" # Semantic search your knowledgecrystal connect https://chatcrystal.example.com --token "your-long-token"crystal import --yes# Rotate when you still know the current token.crystal --base-url https://chatcrystal.example.com token rotate "new-long-token-at-least-16-chars" --current "old-token"
# Reset stored auth from the Docker host when the token is lost.docker compose exec chatcrystal crystal token reset --yesdocker compose exec chatcrystal cat /data/setup-code# Knowledge retrievalcrystal search <query> [--limit 10] # Semantic searchcrystal notes list [--tag X] # Browse notescrystal notes get <id> # View note detailcrystal notes relations <id> # View note relationscrystal tags # List tags with counts
# Data managementcrystal import [--source claude-code] # Import conversationscrystal summarize <id> # Summarize one conversationcrystal summarize --all # Batch summarizecrystal summarize --retry-errors # Retry failed summariescrystal status # Server status and DB stats
# Configurationcrystal config get # View configcrystal config set llm.provider openai # Update configcrystal config test # Test LLM connection
# Server managementcrystal serve # Start server (foreground)crystal serve -d # Start server (daemon)crystal serve stop # Stop daemoncrystal serve status # Check if runningcrystal mcp # Start MCP stdio server{ "mcpServers": { "chatcrystal": { "command": "crystal", "args": ["mcp"] } }}# LLM (ollama/openai/orcarouter/anthropic/google/azure/custom)crystal config set llm.provider openaicrystal config set llm.model gpt-4ocrystal config set llm.apiKey sk-...
# Embedding (ollama/openai/google/azure/custom)crystal config set embedding.provider ollamacrystal config set embedding.model nomic-embed-text