Linas's Newsletter

Linas's Newsletter

Skill Graphs: The Architecture That Solves the AI Agent Context Window Problem 🤖

Your AI agent gets dumber the more you teach it. Skill graphs fix that - here's the architecture, the cognitive science, and a complete build-from-scratch tutorial.

Linas Beliūnas's avatar
Linas Beliūnas
Apr 06, 2026
∙ Paid

👋 Hey, Linas here! Every day, I break down 3 stories shaping the future of FinTech - plus the money movements and trends worth tracking. First time here? 370k+ FinTech and AI leaders get this daily. Join them:

Your AI agent has a context window problem, and you’re probably making it worse.

Every time you load a large skill file into your agent’s context, you’re trading breadth for blindness. The agent gets more information, but processes all of it worse. Chroma’s 2025 study tested 18 frontier models - GPT-4.1, Claude, Gemini 2.5, Qwen3 - and found that every single one degrades in performance as input length increases.

Claude Sonnet 4, GPT-4.1, Qwen3-32B, and Gemini 2.5 Flash on Repeated Words Task. Source: https://www.trychroma.com/research/context-rot

Not near the limit. At every increment. The bigger the context, the worse the reasoning.

This creates a fundamental tension: your agent needs domain depth to be useful, but the mechanism for delivering that depth actively undermines its ability to reason about what you gave it.

Skill graphs solve this.

Instead of one monolithic file, you build a network of small, composable markdown files connected by wikilinks. The agent navigates the network like a researcher following citations, pulling in only the two or three pieces relevant to the current question. Most knowledge stays on disk. Only what matters enters the context window.

Credit: @akshay_pachaar via X

The result: the same domain knowledge, better reasoning, at a fraction of the token cost.

This deep dive covers:

→ Why this works (the cognitive science of context degradation and how graphs exploit it)

→ How traversal decisions happen inside the context window, and

→ A complete tutorial for building a five-node skill graph from scratch - with full file contents you can adapt to any domain.

We also analyze Ars Contexta, the open-source reference implementation backed by 249 interconnected research claims about agent cognition.

Why Flat Files Fail: What’s Actually Happening in the Context Window

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2026 Linas Beliūnas · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture