Riding the wave of Andrej Karpathy's “LLM Wiki”

Some of you may have seen this remarkably popular post by Andrej Karpathy https://karpathy.ai introducing what he calls “LLM Wiki”:

https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f

It describes an approach to knowledge management that involves three elements:

* Storing notes as Markdown files in a Github repository

* Updating those notes via an LLM that modifies the files on disk directly

* Browsing and reading the notes via Obsidian by pointing it at the Markdown repository

The role of Obsidian in this approach is very familiar to TiddlyWiki users: making a folder full of text files accessible as a wiki.

That raises the possibility of being able to substitute TiddlyWiki for Obsidian in the LLM Wiki approach, meaning implementing some degree of interoperability with Obsidian. Users would be able to choose between Obsidian and TiddlyWiki, or combine them. The goal is, obviously, to drive adoption of TiddlyWiki.

You can see where I’ve got to in this repository. Note that the readme is trying to make a case for LLM Wiki users rather than TiddlyWiki users:

https://github.com/Jermolene/twillm/

Andrej’s workflow depends upon one Obsidian feature: it continually monitors the Markdown files on disk, and loads any updates dynamically made by the LLM. I’ve made a PR to implement that feature, see https://github.com/TiddlyWiki/TiddlyWiki5/pull/9806.

I should add that I started this journey with pmario’s MCP server. I think it is a better foundation for Karpathy’s original work than direct file access. For example, it allows for strategies to limit token consumption. I ended up moving away from MCP because I wanted to try to make TiddlyWiki a direct drop-in replacement for Obsidian, allowing existing users to maintain their existing mental model. I would, however, like to add back the MCP server as soon as possible, assuming we can do so without compromising LLM Wiki compatibility.

The window of opportunity to attract attention might be quite short, particularly if Obsidian were to implement LLM access themselves, perhaps by implementing an MCP server, the opening would close.

It would be very helpful to have help with testing, and in spreading the word about this

I should add that personally, there is no world in which I would send my personal notes to Anthropic, OpenAI or any other cloud service. I have been experimenting with running Qwen models on my Mac using Ollama. Their capabilities are far behind those of commercial providers, but they can still be useful.

I would be delighted to hear your thoughts and suggestions, and of course to accept pull requests.

There’s a typo in the Readme

brwowser

I don’t see that. What I see at that address is a huge bio.

Is it just me?


UPDATE: My bad. I should have gone to LLM Wiki

TBH, I am out of my depth on the details you need addressing.
Broadly …

1 - anything that helps promote TW is good. And, in my limits, this looks good.

2 - your comment …

… makes me hope we’ll have a bullet-proof secure AI interface in TW soon?
That itself might be a promo seller?

Just comments
TT

So happy to see you working on this @jeremyruston, I was just playing with this myself, except I was working with MWS and trying to restrict the agent to writes on certain bags :blush: will definitely check out your progress

Currently have it sandboxed with read/write access to “inbox” bag and read access to “core” bag. Just used Claude to create a skill based on my tiddlers templates.

I’ve also set up a nightly “Dream.py” script that runs everything accumulated over the course of the day from the Inbox and compiles it into well-structured tiddlers in the core bag, such as

I have not had the chance to try this yet, but I was enthused by this:

LLM-authored applets, not just content Beyond Markdown notes, the LLM can drop in wikitext tiddlers (.tid) that act as small interactive live views: dashboards, browse-by-tag tools, journal indexes, glossary pages. These compose with the human’s own customisations because they’re just tiddlers. The wiki becomes a programmable surface, not just a notes folder

It articulates a fantastic set of benefits and reckon it should be up at the top!

Very interesting. I did not know that the bidirectional-filesystem branch is already at this stage. I’ll investigate soon, to see, if I can make the tw-mcp server plugin simpler, usging this functionality. I needed to jump some hoops to create a reload_tiddlers tool, with the current server configuration. But this reload needs an external trigger by the user or the llm.

So it will be more convenient, if the “filesystem” itself can trigger the reload.


What’s interesting with the LLM Wiki approach are the llm SKILLs that may be able to run a whole “research” and “refine” workflow.

-m

TidGi-Desktop already provides Obsidian-level features like hot-reload tid files and folder-based wiki. And have build-in LLM agent support. I just haven’t advertise it on western world internet, and no much user advertise for it.

I am extremely excited to try this out!

At my day job (as a computer programmer), we are being required to incorporate AI in our work. As a major AI sceptic, I have had a hard time complying with this but made the decision two months ago that if I’m going to have to do this, I’m going to do it right. After a first successful project, and inspired, I believe, by similar ideas Karpathy described – although I hadn’t seen this post – I’ve built a knowledge base that collects every bit of information I can dig up on our system (from Jira, Confluence, SharePoint, code repositories, online documentation, etc.) It runs periodic refreshes of all those sources, extracting, consolidating, and synthesizing the information. I can ask it nearly any question about this system and get a reasonably correct and reasonably complete answer. More than that, I can use it to ask Claude Code to help plan and build the code I need. While I still don’t trust it for the core code, it’s proven invaluable for documentation, unit tests, and research. I’m still fiddling with it, and expect to do so for quite some time. I am now spending about two-thirds of my work hours playing with this tool, and still producing the expected work faster than before, because of the savings this tool has made.

I would really like to see if something like that could work for other personal projects, and TWILLM seems like the perfect way to go about this. I really can’t wait to try it out.

Unfortunately I won’t be able to spend the time needed to try this very soon. I’m deep inside another project (also TiddlyWiki) that will likely take most of my free time for the next week – after which I will have much less free time for another month. But I will try to spend as much time as I can in that month.


But meanwhile, from the README:

[tag[concept]rating[]>[6]sort[title]]

What?! Since when? Is this something new in 5.4.0? I’ve been so excited by background actions and multi-valued variables that I may have overlooked other nice changes.

If I were to have written this, I would probably would have done something like:

[tag[concept]get[rating]compare:number:gt[6]sort[title]]

Equivalent maybe, but not nearly as readable. I’m going to have to do some more reading!

Unfortunately this doesn’t seem to be valid 5.4.0 syntax (and IMO, it would be confusing if it were; following the extant filter operator conventions, rating[] ought to be short for field:rating[], i.e. any tiddler whose rating field is empty or nonexistent.) I imagine this example is either LLM output or pseudo-code intended to be more accessible to readers unfamiliar with TW filters.

So are we going to be relegating TW to simply being a ‘note store’ for LLMs? If TW’s strengths and flexibility means it’s sometimes complex and unintuitive to build what you want (IMO it is), I’d think the main effort should go towards making it simpler and more discoverable. Like the old Learning Perl book used to say, “Making Easy Things Easy and Hard Things Possible”.

I’d prefer TW replacing Obsidian by (for example) making TW Desktop store its tiddlers as files on the disk instead of a self-contained html file (same thing that node.js does). It’d be nice to be able to craft complex tiddlers in my text editor of choice and directly seeing them in TW Desktop without having to restart a node.js server.

No need to bring LLMs into this.

Not to trip into the “Why is Obsidian more popular than TW” rabbit hole again, but I don’t think the main reason someone might chose Obsidian instead of TW is because the former integrates with LLMs. Do we really want to start defining TW by running after what others might do? And especially in the area of LLMs?

I agree, with an asterisk/question mark on the “anything”. Promoting TW should be by making its strengths easier to see and use, not hiding its weaknesess. Making it easier to “out source” it core proposition (flexible note management, on a self-contained stack that you fully own top-to-bottom) feels a bit like throwing in the towel to be honest. To be doing this by involving LLMs leaves a bad taste in my mouth.

@Lamnatos I don’t really follow the objection here, all this is an optional feature. The fact an LLM can edit it doesn’t mean giving up widget and filter syntax or freely mixing in HTML (a key part of the proposition for me) by hand.

That’s a general limitation of TW as a server but I agree this would be very nice. I wish TW offered some kind of consistent endpoint to create tiddlers or read new files, if it can’t be changed to read the filesystem directly.

I have a couple of scripts that generate tiddlers on my server by getting data from APIs. I have to manually restart the server so much to the point I have an alias.
EDIT: I should have looked to solve my problem earlier, as there is in fact an API! I still like the simplicity of working directly with the filesystem though.

However, I don’t think it’s necessary to condemn LLM use in the same breath. It’s a positive side effect and the way it meets that need is quite consistent with TW’s philosophy in being flexible enough to act as middleware, as well as a full wiki.

Damn, and I so much wanted to believe! I didn’t even take the time away from my project to test – I’d already spent too much of my project break time on my post.

Now that you’ve dashed my hopes, @etardiff (:wink:), can I still dream about using < instead of compare:number:gt? That was my big imaginary win anyway.

Feel free to lie to me. :grinning_face:

Thank you for the feedback.

Excellent. I am aware that there is a lot of prior work in the community. I am hoping that we can collaborate together to make official plugins for the basic infrastructure needed for working with LLMs. I am not at all wedded to the implementation that I have used; we need to settle on the best.

Yes! Although the demo in its current form doesn’t make a compelling case for this. I am hoping we can put together some examples to tell the story better.

You’ve been an early adopter for LLMs in TiddlyWiki, and I am particularly keen that we can bring your work to the wider community. For example, I would be open to TidGi-Desktop replacing TiddlyDesktop (or at least becoming an official upgrade path).

Ouch, thanks @Scott_Sauyet. The syntax is indeed an LLM hallucination. I’m sure everyone who’s experimented with LLMs generating wikitext or filters has encountered these kinds of issues.

The usual fix for these situations is to provide documentation that the LLM can consult. We need to explore that for TW.

Only for this particular audience. We’re trying to present them with a familiar paradigm, but it doesn’t limit TW itself.

TiddlyDesktop does already support Node.js wikis which store their tiddlers as individual files. It is not a widely used feature, and I think needs some work to make it smoother. In the meantime, I believe TiddlyGittly from @linonetwo also offers the capability.

No, my point was that Obsidian might improve their support for LLMs, which might make a TW-based solution less attractive to the audience we’re talking about.

Best wishes

Jeremy

We could start by also recommend it in the https://tiddlywiki.com/#TiddlyDesktop , I think I won’t make the recommendation ashamed (It has more star than TiddlyDesktop now), I also want to beat Obsidian in the market, not about money, just for achievement.

I’m going to add more Agent feature to it, and adapt to local private LLM like kimik2.6 and deepseek v4, For processing personal wiki.

And I feel opencode is not very confortable to use when I develop games across 3~6 computers (I’m running e2e tests that will cause computer CPU and memory running out, cause lagging, so have to be distributed), and since Github copilot limits weekly usage, I have to switch to Kilo/Roo/Cline code and opencode in different situations, and sometimes CherryStudio, my prompts gets split everywhere, hard to manage. So I’m planning using tiddlywiki as single source of truth of LLM prompts, and let it control other programming cli to work.

I’m burning 0.1 Billion LLM tokens every day (If I’m not playing games…), this is the real need emerge from my workflow.

The roughness I would like to see smoothed over is that there is a regular need to restart Node to pick up changes that were made outside of the UI. If I edit a JS tiddler in my IDE because it has better tools for that, I would love to be able to just do a hard refresh in my browser to pick up the changes.

Other than that, I have no complaints at all about the Node version. It works well for me.

That would be one of the scenarios that Live reloading of tiddler files by Jermolene · Pull Request #9806 · TiddlyWiki/TiddlyWiki5 · GitHub could solve, once it is merged and TiddlyDesktop is updated to use the latest TW.

@jeremyruston, can we get a look at some examples of llm-wiki content that your project has generated so far?

I’m having a lot of fun perusing what Claude thinks is important to our conversations as it tries to construct a coherent “Second Brain”

I hope you’ll forgive a little nitpicky sidebar, which I offer only because @jeremyruston seems to have replaced the broken LLM filter with your suggestion in the GH readme…

This filter produces a sorted list of all ratings > 6 found on “concept” tiddlers, not a sorted list of the tiddler titles themselves. To capture the set of tiddlers described by “concept tiddlers I rated above 6, alphabetically”, you’d need to do something like this:

[tag[concept]] :filter[get[rating]compare:number:gt[6]] +[sort[title]]

I understand this is a throwaway example and not really important to the project being showcased, but if we’re trying to be accurate, we may as well be accurate. :slightly_smiling_face:

Yeah, that’s what happens when I code anything without testing.

The universe seems to know that I’m not going to test, because if I am going to test, all my code works flawlessly on the first try…

Always!1


Thank you. Good catch. Now I want that original gloss even more, though!




1And people say there’s no such thing as programmer’s humor?! What do you mean, “that’s supporting evidence?” What?