Skip to main content

How to use large language models as a co-author and co-editor of knowledge wiki

Andrew Karpathy proposes “a pattern for building personal knowledge bases using LLMs.”1 Building on top of that, I propose the following opinionated software stack as a minimum viable product.

Rationale #

A personal knowledge base is a vault of markdown files that has internal and external links. Obsidian is the perfect IDE for that. The co-author and co-editor is an agent. The agent needs access to large language models. OpenRouter has access to free models with large context window. Adding the first and a long article can be 32K input token length. In addition, the llm-wiki skill is an agentic workflow, so multiple requests2 will be made when ingesting an article. Since the wiki will be maintained by both the agent and us, git helps to track changes. The agent will be creating and modifying files and folders. Running it inside Docker maintains isolation from our host computer.

Components #

Installation and Configuration #

Note: instructions are tested in macOS 26 Tahoe. They should work for Linux-based systems. Exercise is left for readers with Windows systems.

  • Create an OpenRouter account and an API key, e.g. my-api-key

  • Install Docker

  • Install git

  • Create a docker launchpad for Hermes Agent, e.g.

mkdir ~/wiki-agent
  • Create docker-compose.yml in the launchpad
services:
  hermes:
    image: nousresearch/hermes-agent:latest
    container_name: hermes
    restart: unless-stopped
    command: gateway run
    ports:
      - "127.0.0.1:8642:8642" # Restricts Gateway API to host only
      - "127.0.0.1:9119:9119" # Restricts Dashboard to host only
    volumes:
      - ~/.hermes:/opt/data
    environment:
      - HERMES_DASHBOARD=1
      - HERMES_DASHBOARD_HOST=0.0.0.0
      # API KEYS
      - OPENROUTER_API_KEY=${OPENROUTER_API_KEY}
      # Dashboard authentication
      - HERMES_DASHBOARD_BASIC_AUTH_USERNAME=${HERMES_DASHBOARD_BASIC_AUTH_USERNAME}
      - HERMES_DASHBOARD_BASIC_AUTH_PASSWORD_HASH=${HERMES_DASHBOARD_BASIC_AUTH_PASSWORD_HASH}
      - HERMES_DASHBOARD_BASIC_AUTH_SECRET=${HERMES_DASHBOARD_BASIC_AUTH_SECRET}
      # Wiki location
      - WIKI_PATH=/opt/data/wiki
    deploy:
      resources:
        limits:
          memory: 4G
          cpus: "2.0"
  • Create a password hash for the password your_password_here:
docker run --rm -it nousresearch/hermes-agent:latest python -c "from plugins.dashboard_auth.basic import hash_password; print('\\n\\n'+hash_password('your_password_here')+'\\n\\n')"
  • Create a random secret your_random_secret:
openssl rand -base64 32
  • Create .env in the launchpad
# API Keys
OPENROUTER_API_KEY=my-api-key
# Dashboard authentication
HERMES_DASHBOARD_BASIC_AUTH_USERNAME=admin
HERMES_DASHBOARD_BASIC_AUTH_PASSWORD_HASH='password_hash_from_previous_step'
HERMES_DASHBOARD_BASIC_AUTH_SECRET=your_random_secret
  • Start Hermes Agent
cd ~/wiki-agent
docker compose up -d

The folder ~/.hermes will be created on the host computer. Hermes Agent creates default configuration files during the very first run.

  • Login to the Hermes Agent dashboard at http://localhost:9119 with username admin and your_password_here (not the hash).

  • Set main model to OpenRouter.

    • In the left panel of the dashboard, choose “MODELS”.
    • Under “MODEL SETTINGS”, choose “CHANGE”.
    • Select “OpenRouter” in the left panel.
    • Choose nvidia/nemotron-3-super-120b-a12b:free or nvidia/nemotron-3-ultra-550b-a55b:free
    • Click “Switch”
    • Click “Reload”
  • Start a new chat window and type:

Start a new LLM wiki with the topic: artificial neural network architectures

The agent may ask for permission for executing file operations such as creating the wiki folder and subfolders. Choose “allow for the session”.

When completed, it may say:

Wiki Location: /opt/data/home/wiki

What was created:

1. Directory structure (raw/, entities/, concepts/, comparisons/, queries/)
2. SCHEMA.md - defines conventions, frontmatter template, page types, tag taxonomy, and naming conventions
3. index.md - initial index with sections for Concepts (Convolution, Attention Mechanism, Residual Connection, Batch Normalization) and Entities (Perceptron)
4. log.md - initial log entry documenting the wiki creation
  • Stop Hermes Agent
cd ~/wiki-agent
docker compose down
  • Initial commit for git:

The subfolders are empty, we will commit the Markdown files.

cd ~/.hermes/wiki
git init
git add index.md log.md SCHEMA.md
git commit -m "Initial commit"

Normal Operations #

  • To ingest an article:

Start Hermes Agent (docker compose up -d as in installation) if not already running, login to the Hermes Agent dashboard at http://localhost:9119 and start a new chat window:

Use the llm-wiki skill, ingest and update my LLM wik with this article: https://arxiv.org/html/1706.03762v7

Note: This article describes the transformer architecture which kicked off ChatGPT.

  • When the skill completed, check git for changes. If appropriate, edit then commit the changes.

Updating #

cd ~/wiki-agent
docker compose down # stop agent
docker compose pull # update docker image
docker compose up -d # start agent

  1. https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f ↩︎

  2. It makes sense to add credit to the OpenRouter account because “if you purchase at least 10 credits, your daily limit is increased to 1000 :free model requests per day [from 50].” Retrieved on 2026-07-09. https://openrouter.ai/docs/api/reference/limits ↩︎