Keep a research wiki that an agent maintains from your own sources
You drop sources into a folder the agent may only read. It compiles them into linked wiki pages on themes, sectors and concepts, answers your questions with links to those pages, and lists contradictions when you ask.
How it works
- Create one folder with three subfolders. sources/ holds what you collect, and the agent may read it but never change it. wiki/ is where the agent writes. answers/ keeps outputs worth saving.
- Write a short rules file that the agent reads at the start of every session (CLAUDE.md for Claude Code, AGENTS.md for others). It covers who owns which folder, the page format, how pages link to each other, and the three routines below.
- Ingest. Add one source at a time, such as a saved article, your notes from a book, a conference-call transcript or your own market notes. The agent tells you the key points first and waits. Only then does it write or update pages, refresh the index and add a dated line to the log.
- Query. Ask a question. The agent reads the index first, then the pages it needs, and answers with links to every page it used. If the answer is worth keeping, it saves it in answers/ so it isn't lost in chat history.
- Lint, only when you ask. The agent lists contradictions, outdated figures, pages nothing links to and missing links. You pick what gets fixed.
- Open the folder in Obsidian to read the pages and see how topics connect. The files stay on your computer, and only what the agent reads is sent to the model provider.
Copy-paste prompt
You maintain my private research wiki in this folder. You do not give trading advice and you never place orders.
Folders:
- {{sources_folder}}: my material. Read it, never edit, move or delete anything in it.
- {{wiki_folder}}: yours. Create and update pages here.
- {{answers_folder}}: save answers I want to keep.
Page rules: every page starts with title, type (theme | sector | concept | event | process-note), sources and last_updated.
Every factual sentence links to the source file it came from. If you can't link it, leave it out.
End every page with a "Related pages" list. Keep {{wiki_folder}}/index.md (one line per page) and
{{wiki_folder}}/log.md (one dated line per session: what you did, which files you touched) current.
When I say "ingest {{file}}": read it fully, give me the five most important points and wait for my reply.
Then write or update the pages, update the index, check whether it changes any other page, and log it.
When I ask a question: read the index first, then only the pages you need. Answer with links to those pages.
Say "not in the wiki" rather than filling gaps from memory.
When I say "lint": list contradictions, figures older than {{stale_after_days}} days, orphan pages and missing links.
Do not fix anything until I choose.
Guardrails
- The agent never edits or deletes anything in the sources folder. It writes only to the wiki and answers folders.
- Every fact on a wiki page links back to the source file it came from. No link, no fact.
- Pages cover themes, concepts and your own process notes. The wiki is private research, not a list of things to trade.
- Lint only reports problems. Nothing is changed without your OK.
- Store only material you have the right to keep, and keep the wiki private.
What can go wrong
A common mistake is ingesting a whole folder in one go. You get confident pages nobody checked, and an early error spreads into every linked page. Ingesting one source at a time and reading the key points before the agent writes is slower, but the wiki stays trustworthy. At a few hundred pages, an out-of-date index starts hiding pages from the agent, so run a lint pass every few weeks.
Why it helps
Research done in a chat window disappears. Three months later you can't find what you read, or why you thought it mattered. A folder of linked pages, rebuilt from your own sources, gives the agent the context it lacks in a fresh chat. It also gives you one place to look things up. Because every fact links to a file you added, a wrong answer is easy to trace.
Where this comes from
Andrej Karpathy described the pattern publicly in April 2026: a folder of raw sources the model only reads, a wiki the model owns, and a rules file that tells it how to ingest, answer and check. Sebastian Krog, a small-cap value investor, wrote up how he has used it every day for six months for company research. We've adapted it for swing traders by organising the pages around themes, sectors, concepts and your own process notes.
Set-up notes
- Start with one topic you already know well, so you can tell whether the pages are right.
- Converting long PDFs to plain text or Markdown before you add them makes ingestion more reliable.
- If you sync the folder to your phone, remember that synced folders can live in unexpected places on disk. Point the agent at the top-level folder.
Source and references
Based on a public post and article by Sebastian Krog (@SebKrog), who applied Andrej Karpathy's "LLM knowledge base" idea to his own investment research. Summarised and adapted for swing traders in our own words.
Original: Sebastian Krog on x
- How I Use Claude as My Second Brain for Stock Research · Treasure Hunting (Sebastian Krog, Substack) (checked 18 Oct 2026)
- LLM Knowledge Bases (post on X) · Andrej Karpathy (@karpathy) (checked 18 Oct 2026)
- llm-wiki (GitHub gist) · Andrej Karpathy (checked 18 Oct 2026)
- Manage Claude's memory (CLAUDE.md files) · Claude Code documentation (checked 18 Oct 2026)
- Internal links · Obsidian Help (checked 18 Oct 2026)
Spotted an error, or want your post removed? Email hello@agentsfortraders.com.
Educational content only. Not investment advice or a personal recommendation. No tickers, signals or trade alerts. Trading involves risk of loss.
Conteúdo exclusivamente educativo. Não constitui aconselhamento nem recomendação de investimento. Sem tickers, sinais ou alertas de negociação. Negociar envolve risco de perda.
Related use cases
Triage news on your holdings to material items with links
An agent filters company news down to material items such as guidance changes, share offerings, rating changes and legal or regulatory events, summarises each with a link, and drops rumours.
Journaling & post-trade reviewTurn your trade journal into a setup library the agent keeps current
From your journal and post-trade reviews, an agent maintains one linked page per setup. Each page holds your written definition, example trades, common mistakes and stats computed in code; a separate dated log records every definition change.
Agent ops: guardrails & costsMake your agent label every claim by source and how well it's confirmed
Give the agent a ranked list of source types and five confirmation labels. Every fact it writes carries both, conflicts are written down instead of smoothed over, and unconfirmed claims stay out of its conclusions.
The Daily 3
Three agent workflows for swing traders, free, on US trading days.