Running a Karpathy-style LLM wiki through a Telegram bot on a small VPS

The author replaced a hand-maintained Obsidian vault with a markdown wiki that Hermes Agent keeps up to date: sources get sent to a Telegram bot, and the agent files, cross-links, logs and lints them. What makes it interesting is that the agent does the bookkeeping. The author still picks what goes in.

Community reportRead the original (opens in a new tab)Source read 2026-10-20
Runs onHetzner VPS (2 vCPU, 4 GB RAM, Ubuntu LTS), no GPU
ModelsNot specified; the author only notes that remote APIs such as OpenAI or OpenRouter can be used
ChannelsTelegram, CLI
IntegrationsLocal git repository, Static site generator (left open: Hugo, MkDocs or a custom script), Web server or PaaS for publishing (Caddy, Nginx or similar), Telegram BotFather

Who built it

Jsong, a Medium writer who had used Obsidian for years. The author was frustrated by three things: the upkeep of cross-references and index pages, having no access away from the desktop, and notes that never changed unless edited by hand. The post adapts Andrej Karpathy's LLM Wiki idea.

How it works

Hermes runs on a small VPS and connects to a private Telegram bot through the messaging gateway. The author set it up with the installer, then hermes setup and hermes gateway setup. The bot only answers the author's numeric Telegram user ID, so a phone becomes the main way to add to and query the knowledge base.

The wiki is plain markdown in a git repository, split into three areas. raw/ holds the original sources and is never edited. wiki/ holds pages the agent writes: summaries, entity and concept pages, and cross-links. schema/ holds the rules (AGENTS.md), a page catalog (index.md) and a chronological log.md. The author shared Karpathy's gist with Hermes, had it propose this layout, and then the two co-wrote AGENTS.md. It sets rules for page types, frontmatter, and how the index and log get updated.

Day to day there are three loops. Ingest: send a URL, file or text to the bot, and the agent summarises it and updates the related pages, the index and the log. Query: ask a question, the agent builds an answer from the wiki, and it may save that answer as a new page. Lint: on request, the agent looks for contradictions, orphan pages, missing links and stale claims. It uses its terminal and file tools to edit pages and commit to git.

The wiki is also published as a static website on the author's own domain. The post doesn't pin down the generator or how rebuilds are triggered; it mentions a cron job or git hook as options. The author says Obsidian is now just an optional viewer for the same files. According to the author, the self-improving part is that Hermes remembers their preferences across sessions and suggests changes to the schema. The post doesn't measure this.

Hermes now ships a bundled llm-wiki skill based on the same Karpathy pattern. It reads its wiki location from a WIKI_PATH environment variable. The post doesn't say whether the author used this skill or wrote the workflow from scratch.

Lessons you can use

  • Write down the rules for maintaining the wiki (page types, frontmatter, index and log updates) in a file the agent reads every time, instead of re-explaining them in chat.
  • Keep sources you never edit separate from pages the agent writes, so it is always clear what came from outside and what the model produced.
  • A chat app makes a good inbox for a knowledge base: sending a link from your phone is a smaller habit to keep than opening a desktop note app.
  • Put the wiki in git so every edit the agent makes can be reviewed and reverted.
  • Run a lint pass now and then to catch contradictions, orphan pages and stale claims, rather than assuming the agent's filing is always right.
  • Restrict a messaging bot that has terminal access to your own user ID before you start using it.

Try a smaller version

  1. 1

    Install Hermes and enable the bundled llm-wiki skill (check with hermes skills), then set WIKI_PATH in your profile's .env to a new folder you have initialised as a git repo.

  2. 2

    Ask the agent to set up raw/, wiki/, index.md and log.md, and write a short AGENTS.md with your page and linking rules. Hermes loads context files like this automatically.

  3. 3

    Connect a Telegram bot with hermes gateway setup, set TELEGRAM_ALLOWED_USERS to your own ID, and send it three articles to ingest.

  4. 4

    Ask one question that should draw on all three sources, then ask the agent to lint the wiki and report orphans or contradictions.

  5. 5

    Once the manual loop works, add a weekly scheduled job that runs the lint pass and sends the report to your Telegram home channel.

Caveats

  • The author gives no measurements of answer accuracy, how well contradictions are caught, API cost, or wiki size. The self-improving behaviour is described, not demonstrated.
  • The publishing setup and the model are left unspecified, so the post can't be followed step by step.
  • A public wiki written by an agent with shell access on the same server deserves thought: review what gets published, and limit who can talk to the bot.

Original source

An original summary written from the public source on 2026-10-20. Figures and outcomes are the author’s own reports and were not independently verified.

Spotted something wrong or out of date? Tell us on X at @HermesWatcher (opens in a new tab) and we will fix it.