NOW LET US – AI RAG SaaS Studio TP.HCM
NOW LET US
Digital Product Studio
Back to news
DEV-TOOLS...2 min read

Lat.md: Agent Lattice: a knowledge graph for your codebase, written in Markdown

Share
NOW LET US Article – Lat.md: Agent Lattice: a knowledge graph for your codebase, written in Markdown

Lat.md is a tool that organizes codebase knowledge into a structured graph of Markdown files, enabling better documentation scaling and providing precise context for AI agents to prevent hallucinations.

A knowledge graph for your codebase, written in markdown.

AGENTS.md doesn't scale. A single flat file can describe a small project, but as a codebase grows, maintaining one monolithic document becomes impractical. Key design decisions get buried, business logic goes undocumented, and agents hallucinate context they should be able to look up.

Compress the knowledge about your program domain into a graph — a set of interconnected markdown files that live in a lat.md/ directory at the root of your project. Sections link to each other with [[wiki links]], source files link back with // @lat: comments, and lat check ensures nothing drifts out of sync.

The result is a structured knowledge base that:

  • Scales— split knowledge across as many files and sections as you need
  • Cross-references— wiki links ([[cli#search#Indexing]]) connect concepts into a navigable graph
  • Stays in synclat check validates that all links resolve and that required code references exist
  • Is searchable— exact, fuzzy, and semantic (vector) search across all sections
  • Works for humans and machines— readable in any editor (or Obsidian), queryable by agents via the lat CLI

npm install -g lat.md

Then run lat init in the repo you want to use lat in.

Run lat init to scaffold a lat.md/ directory, then write markdown files describing your architecture, business logic, test specs — whatever matters. Link between sections using [[file#Section#Subsection]] syntax. Link to source code symbols with [[src/auth.ts#validateToken]]. Annotate source code with // @lat: [[section-id]] (or # @lat: [[section-id]] in Python) comments to tie implementation back to concepts.

my-project/
├── lat.md/
│ ├── architecture.md # system design, key decisions
│ ├── auth.md # authentication & authorization logic
│ └── tests.md # test specs (require-code-mention: true)
├── src/
│ ├── auth.ts # // @lat: [[auth#OAuth Flow]]
│ └── server.ts # // @lat: [[architecture#Request Pipeline]]
└── ...
lat init # scaffold a lat.md/ directory
lat check # validate all wiki links and code refs
lat locate "OAuth Flow" # find sections by name (exact, fuzzy)
lat section "auth#OAuth Flow" # show a section with its links and refs
lat refs "auth#OAuth Flow" # find what references a section
lat search "how do we auth?" # semantic search via embeddings
lat expand "fix [[OAuth Flow]]" # expand [[refs]] in a prompt for agents
lat mcp # start MCP server for editor integration

Semantic search (lat search) requires an OpenAI (sk-...) or Vercel AI Gateway (vck_...) API key. The key is resolved in order:

  • LAT_LLM_KEY env var — direct value
  • LAT_LLM_KEY_FILE env var — path to a file containing the key
  • LAT_LLM_KEY_HELPER env var — shell command that prints the key (10s timeout)
  • Config file — saved by lat init. Run lat config to see its location.

Requires Node.js 22+ and pnpm.

pnpm install
pnpm build
pnpm test
© 2026 Now Let Us. All rights reserved.

Source: Hacker News

Advertisement
Ad slot ready: 5887729102

More in this category

NOW LET US Related – Swift at Apple: Migrating the TrueType hinting interpreter

dev-tools

Swift at Apple: Migrating the TrueType hinting interpreter

Apple has rewritten its TrueType hinting interpreter from C to memory-safe Swift for its Fall 2025 OS releases, improving security and boosting performance by an average of 13%.

NOW LET US Related – Where Did Earth Get Its Oceans? Maybe It Made Them Itself

dev-tools

Where Did Earth Get Its Oceans? Maybe It Made Them Itself

For decades, scientists believed Earth's water was delivered by comets or asteroids. However, new research and space missions suggest our planet might have manufactured its own oceans through a mix of magma and hydrogen.

NOW LET US Related – Digital Sovereignty Becomes an Imperative as the US Reads Dutch Emails

dev-tools

Digital Sovereignty Becomes an Imperative as the US Reads Dutch Emails

The reported access of Dutch officials' emails by the U.S. House of Representatives highlights the critical difference between data residency and true digital sovereignty. It underscores why nations must secure legal and operational control over their data, moving beyond mere local storage promises.

NOW LET US Related – Removing 'um' from a recording is harder than it sounds

dev-tools

Removing 'um' from a recording is harder than it sounds

Removing filler words like 'um' and 'uh' from audio recordings is surprisingly difficult due to audio artifacts and AI limitations. The open-source tool 'erm' solves this by combining Whisper with advanced digital signal processing techniques.

NOW LET US Related – If you are asking for human attention, demonstrate human effort

dev-tools

If you are asking for human attention, demonstrate human effort

As AI-generated content floods the workplace, a new etiquette dilemma emerges. This article highlights a crucial principle for modern collaboration: if you want to request human attention, you must first demonstrate human effort.

NOW LET US Related – Raspberry Pi 5 – 16GB RAM

dev-tools

Raspberry Pi 5 – 16GB RAM

The Raspberry Pi 5 features a massive upgrade with a 2.4GHz quad-core processor, up to 16GB of RAM, and in-house silicon for vastly improved I/O performance.

EXPLORE TOPICS

Discover All Categories

Deep dive into the specific technology sectors that matter most to you.