coding-agents
vectorize-io/hindsightHindsight:会学习的 Agent 长期记忆系统,自动召回/保存、知识页、深度反思与按仓库隔离的记忆银行。
一个 Obsidian 风格的知识库:摄取资料,让 LLM 构建并维护互联 wiki,并基于它提问。
English | 中文
An Obsidian-style personal knowledge base for DeepSeek Harness, built on the Karpathy Wiki methodology.
LLM Wiki turns DeepSeek Harness into a lightweight Obsidian: a three-column workspace (sessions · chat · wiki) where you drop source files in, the LLM incrementally builds and maintains a persistent wiki, and you can then ask questions in the chat that are grounded in your knowledge base.
Most RAG re-derives knowledge from raw documents on every query — nothing accumulates. LLM Wiki instead keeps a persistent, compounding wiki of interlinked markdown pages between you and your sources. Each new source is read once and integrated: entity/concept pages are updated, cross-references maintained, contradictions flagged, and the index kept current.
Inspired by Karpathy's "LLM Wiki" pattern — the wiki is just a git repo of markdown files.
raw/, wiki/, index.md, log.md, schema.md).raw/.raw/ and generate/update wiki/ pages, with concurrent processing and a progress bar. PDFs are text-extracted via pypdf.[[wikilinks]], with zoom/pan, hover-highlight, and click-to-open.wiki_query tool + prompt section lets you ask the chat and get answers with page citations.A single package with two halves, plus a one-line preset contribution:
| Part | Where | Responsibility |
|---|---|---|
Host plugin (src/index.ts) | main | ingest engine (LLM), graph/lint/search, RPC handlers, wiki_query tool, prompt section |
Client plugin (src/client/index.tsx) | ./client + dsh.client | the right-column panel UI (tree, upload, graph, reader) |
| Preset row | agent.cordis.yml (user copy of standard) | exposes the wiki_query tool to the agent |
<workspace>/llm-wiki/
├── raw/ # immutable source files (you own)
│ └── .ingested.json # dedup bookkeeping
├── wiki/ # LLM-generated pages
│ ├── entities/
│ ├── concepts/
│ └── sources/
├── index.md # content catalog (auto-rebuilt)
├── log.md # append-only timeline
└── schema.md # wiki conventions (you + LLM co-evolve)
This package is authored as TypeScript/JSX against the DeepSeek Harness source tree, so it is built with that repo's toolchain:
# inside the deepseek-harness repo
pnpm install
pnpm --filter @vesna-strivozha-2026/dsh-llm-wiki build
# install into your profile (host + client)
dsh plugin --profile web add @vesna-strivozha-2026/dsh-llm-wiki
Then author a preset (copy of standard) that adds the chat-Q&A tool row, e.g.:
- id: tool-llm-wiki
name: '@vesna-strivozha-2026/dsh-llm-wiki'
Restart the client — the wiki panel and wiki_query tool are now permanent.
@deepseek-ai/dsh-client-ui-primitives)One LLM call per raw/ source: the source text (truncated to maxSourceChars) plus the schema.md conventions, asked to return a structured JSON {"pages":[{"path":"...","content":"..."}],"logEntry":"..."} that is written into wiki/ pages before index.md and log.md are rebuilt.
Output is capped at ingestMaxTokens (default 16384) per source; input is truncated at maxSourceChars (default 60000); up to concurrency (default 3) sources run concurrently.
None; ingest reads source and wiki markdown from disk on each run.
The wiki_query tool searches wiki/ pages and returns the index.md summary plus the top matching pages; a llm-wiki-query prompt section tells the model to prefer the tool for knowledge-base topics.
The tool result is truncated — index ≤ 1500 chars, each hit ≤ 1200 chars, at most 4 pages — so it stays small in context.
None; search reads markdown from disk on each call.
open, Windows Invoke-Item, Linux xdg-open).pypdf dependency — PDF ingestion (text extraction) needs Python with pypdf on any platform (in-panel PDF reading works without it).details slot takeover — the panel replaces the shipped tool-details column (tool results remain visible in the conversation cards).