IWE: Why Developers Are Ditching Vector Databases for Markdown Knowledge Graphs
Your notes are a disaster. Admit it. That brilliant architecture decision you documented three months ago? Buried in ~/notes/old/final_v2_ACTUAL.md. The API design rationale your team desperately needs? Scattered across Slack threads, Confluence pages, and that one GitHub issue you can't find. And when you finally feed this chaos to your AI assistant, hoping for salvation, you get... hallucinations based on "maybe relevant" vector similarity matches.
Here's the brutal truth: messy knowledge bases provide messy context to AI, and messy context yields poor results.
What if your AI agent could navigate your knowledge like you do? Not guess. Not approximate. Actually follow the mental maps you've already built. That's exactly what IWE delivers—a hierarchical knowledge graph system that transforms plain Markdown into a structured memory palace both humans and machines can traverse with precision.
Built in Rust. Processing 20,000 files in under a second. Zero cloud dependencies. This isn't another note-taking app promising to "organize your life." This is infrastructure for augmented intelligence—and developers are quietly replacing their vector database setups with it.
What is IWE?
IWE (pronounced "eye-wee") is an open-source Markdown memory system designed for both human users and AI agents. Created by the iwe-org collective, it reimagines how knowledge should be structured, accessed, and maintained in an age where artificial intelligence increasingly serves as our cognitive collaborator.
At its core, IWE treats your Markdown files not as isolated documents, but as nodes in a connected knowledge graph. The system understands two fundamental relationship types: nesting (parent-child hierarchical inclusion) and cross-references (lateral connections between topics). This dual-link architecture mirrors how human cognition actually works—ideas exist within contexts AND relate across domains.
The project has gained significant traction among developers precisely because it rejects two dominant paradigms: proprietary cloud note-taking platforms that lock your data behind APIs, and naive RAG (Retrieval-Augmented Generation) systems that rely solely on embedding similarity without understanding document structure.
IWE's philosophy is radical in its simplicity: your notes remain plain Markdown files on your local machine. No database. No cloud sync. No vendor lock-in. The intelligence emerges from structure, not from opaque algorithms processing your data on someone else's servers.
The Rust implementation isn't merely performant—it's transformative. While Python-based knowledge management tools struggle with latency at scale, IWE's native compilation delivers sub-second traversal of massive knowledge bases. This speed isn't luxury; it's necessity when AI agents need to retrieve context within inference-time constraints.
Key Features That Separate IWE from the Pack
Local-First Architecture with Zero Lock-In
Every note lives as a plain .md file in a directory you control. Version with git, sync with Syncthing, back up however you prefer. Your knowledge outlives any tool, any company, any trend. This isn't a feature—it's a statement of principles.
Hierarchical Structure Without Folder Hell
Traditional file systems force single-parent hierarchies. A "Meditation" note must live in EITHER Health/ OR Productivity/—unless you resort to symlinks or copies. IWE's inclusion links enable true multiple inheritance: the same note belongs to any number of parent topics simultaneously, with links establishing relationships while the file remains in one canonical location.
IDE-Grade Editor Integration Through Language Server Protocol (LSP) implementation, IWE transforms your editor into a knowledge workbench. We're not talking basic preview—this is go-to-definition for concepts, find-references for ideas, automated refactoring of note structures. Extract a section into its own note. Inline it back. Rename with cascading link updates. The cognitive overhead of maintenance? Nearly eliminated.
Native AI Agent Interface via MCP The Model Context Protocol integration is where IWE transcends traditional note-taking. Rather than dumping text into a context window and hoping, your AI agent receives structured tools: search with fuzzy matching, retrieve with hierarchical depth control, navigate trees, create and modify notes programmatically. The agent becomes a collaborator with precise instrumentation, not a student guessing at your filing system.
Blazing Performance Twenty thousand files processed in under one second. This isn't benchmark theater—it's the difference between AI agents that can afford to explore your knowledge graph versus those constrained to surface-level retrieval. Rust's zero-cost abstractions and memory safety make this possible without garbage collection pauses or interpreter overhead.
Real-World Scenarios Where IWE Dominates
Scenario 1: Engineering Team Knowledge Preservation
Imagine onboarding a new senior engineer to your distributed systems architecture. Traditionally, they'd spend weeks piecing together context from outdated wiki pages, PR descriptions, and tribal knowledge. With IWE, your architecture decisions live in a navigable graph: System Design nests Consensus Protocols, which includes Raft Implementation, which cross-references Failure Mode Analysis. The new hire's AI assistant can iwe retrieve --key raft --depth 3 and receive not just the Raft note, but its parent context, sibling alternatives, and related operational considerations. Structured context replaces archaeological excavation.
Scenario 2: Research Synthesis at Scale
Academic researchers and market analysts drown in sources. IWE enables living literature reviews where Climate Policy contains nested regional analyses, each linking to primary sources, methodological critiques, and updated findings. When writing a new paper, the researcher queries their knowledge graph—not a static bibliography—to find not just relevant papers, but how those papers relate to their current argument's position in the conceptual hierarchy.
Scenario 3: AI-Assisted Personal Knowledge Management The "second brain" movement often produces bloated, unsearchable collections. IWE's CLI tools let your AI agent maintain your system: automatically filing meeting notes under appropriate projects, suggesting cross-references you missed, extracting action items into trackable sub-notes. The agent doesn't replace your judgment—it amplifies your organizational intent with computational precision.
Scenario 4: Documentation-First Development Teams practicing documentation-driven development can embed living specifications directly in their knowledge graph. API schemas, ADRs (Architecture Decision Records), and runbooks form an interconnected system where changes propagate intelligently. Modify a parent concept, and IWE's refactoring tools update child references. Your documentation stays coherent as complexity grows—something traditional static sites fundamentally cannot achieve.
Step-by-Step Installation & Setup Guide
Getting IWE operational takes minutes, not hours. The project distributes three core binaries: iwe (CLI), iwes (LSP server), and iwec (integration server for AI tools).
macOS and Linux (Homebrew)
The fastest path for most users:
# Add the IWE tap and install all components
brew tap iwe-org/iwe
brew install iwe
This single command installs the complete toolchain. Verify with:
iwe --version
iwes --version
iwec --version
Cross-Platform (Cargo)
For Rust toolchain users or those on unsupported platforms:
# Install all three binaries from crates.io
cargo install iwe iwes iwec
Ensure ~/.cargo/bin is in your PATH. The Rust compilation provides native performance optimized for your specific architecture.
Workspace Initialization
Navigate to your notes directory and initialize:
cd ~/notes # Or wherever your Markdown files live
iwe init
This creates the .iwe/ configuration directory with metadata about your knowledge graph structure. Existing Markdown files are indexed automatically.
Editor Configuration
IWE's LSP server (iwes) integrates with any editor supporting LSP. Official configurations exist for:
- VS Code: Install the
vscode-iweextension - Neovim: Configure via
lspconfigor native LSP - Helix: Add to
languages.toml - Zed: Install the
zed-iweextension
The LSP provides real-time graph awareness: autocomplete suggests existing notes as you type links, hover reveals parent context, and refactoring commands restructure relationships without breaking connections.
AI Agent Integration
For AI tool connectivity, start the MCP server:
iwec # Runs the Model Context Protocol integration server
Configure Claude Desktop, Cursor, Windsurf, or compatible tools to connect to this server. The server watches your filesystem for changes, ensuring AI agents always work with current state.
REAL Code Examples: IWE in Action
Let's examine actual usage patterns from the IWE repository, with detailed explanations of how each operation leverages the knowledge graph structure.
Example 1: Context Retrieval for AI Conversations
The most common workflow—preparing structured context for an AI agent:
# Fuzzy search across all note titles and content
iwe find auth
# Retrieve a specific note with 2 levels of hierarchical context
# --key specifies the target note
# --depth 2 includes parents, grandparents, and children
iwe retrieve --key authentication --depth 2
# Display the complete subtree from a starting point
iwe tree --key oauth
Why this matters: Traditional RAG would return "similar" chunks about authentication. IWE returns structured context: the authentication note itself, its position within Security → Access Control, its child implementations (OAuth, SAML, API keys), and cross-references to related topics. The AI receives not text fragments, but a navigable cognitive map.
Example 2: Knowledge Graph Maintenance
These commands demonstrate IWE's refactoring capabilities—maintaining graph integrity as your understanding evolves:
# Extract a section into its own note, preserving parent relationship
# The new note becomes a child of the original, with links updated
iwe extract --source system-design.md --heading "Consensus Protocol"
# Merge a child note back into its parent when granularity was excessive
iwe inline --key consensus-protocol
# Rename with cascading updates—no broken links, ever
iwe rename --from raft-algorithm --from raft-consensus
# Remove a note and automatically clean all references
iwe delete --key deprecated-auth-method
The critical insight: These aren't file operations. They're graph operations. When you rename, IWE's LSP-aware indexing updates every inclusion link, cross-reference, and backlink across your entire knowledge base. The structural integrity that makes AI navigation possible is preserved automatically.
Example 3: Flattening for Export
Sometimes you need linear output—perhaps for a report or to feed a system expecting traditional documents:
# Flatten a subtree into one continuous document
# Preserves hierarchical structure through headers
iwe squash --key project-roadmap --output roadmap-comprehensive.md
Use case: Your AI agent has been maintaining a complex project roadmap with nested epics, stories, and technical spikes. For a stakeholder presentation, you need a single readable document. squash traverses the graph, inlining children with appropriate header levels, producing coherent linear output from rich hierarchical source.
Example 4: Programmatic Note Creation
AI agents can create structured notes through stdin:
# Create a new note from piped content
# Automatically integrated into the knowledge graph
cat meeting-notes.md | iwe new --title "Sprint Retrospective 2024-01-15" --parent agile-process
The AI agent pattern: Your meeting transcription service outputs raw text. An AI agent parses action items, creates appropriately nested notes, and establishes cross-references to relevant project documentation—all through IWE's CLI without ever touching files directly. The graph structure emerges from semantic understanding, not manual filing.
Advanced Usage & Best Practices
Depth Control for Context Windows
When retrieving notes for LLM consumption, balance completeness with token limits. --depth 1 provides immediate context; --depth 3 captures broad understanding. For code architecture notes, prefer deeper retrieval; for quick reference, shallower. Profile your typical context consumption and establish conventions.
Strategic Cross-Reference Density
The most powerful knowledge graphs aren't deeply nested trees—they're small-world networks with hierarchical backbone and rich lateral connections. Deliberately link across domains: connect that database optimization note to both Performance and Data Modeling. This is how surprising insights emerge—for both you and your AI.
Template-Driven Workflows
IWE supports templated note creation. Establish patterns for daily standups, incident retrospectives, ADRs. Consistent structure enables more reliable AI processing. The iwe-org/skills repository contains community-contributed agentic skills for common patterns.
Version Control Integration
Since everything is Markdown, commit your .iwe/ metadata and note files. The graph structure itself becomes auditable. When git blame reveals who last modified a concept's position in your hierarchy, you've achieved something no proprietary tool offers: collaborative knowledge curation with full provenance.
Performance at Scale
With 20,000+ files, consider excluding archival content from active indexing. Use .iweignore patterns for generated files, old project snapshots, or reference materials you rarely traverse. The LSP server remains responsive even with massive repositories, but intentional scope management improves human navigability.
IWE vs. The Alternatives: Why Structured Graphs Beat Vector Search
| Capability | IWE | Notion/Obsidian | Vector DB (Pinecone/Weaviate) | Traditional RAG |
|---|---|---|---|---|
| Data Ownership | ✅ Plain files, full control | ❌ Proprietary/cloud-dependent | ⚠️ Your vectors, their infrastructure | ❌ Opaque embedding storage |
| Structural Semantics | ✅ Native parent-child + cross-ref | ⚠️ Manual backlinks only | ❌ None—flat similarity | ❌ Chunked, structure-destroyed |
| AI Navigation | ✅ Purpose-built tools (MCP) | ❌ No native AI interface | ⚠️ Query API, no context awareness | ⚠️ Retrieval only, no modification |
| Speed at Scale | ✅ 20K files < 1 second | ❌ Cloud latency | ✅ Fast similarity search | ⚠️ Index-dependent |
| Editor Integration | ✅ LSP-native, multi-editor | ⚠️ Plugin-dependent | ❌ None | ❌ None |
| Note Refactoring | ✅ Automated graph operations | ⚠️ Manual or plugin-assisted | ❌ N/A | ❌ N/A |
| Setup Complexity | ⚠️ Terminal + LSP config | ✅ GUI simplicity | ⚠️ Infrastructure required | ⚠️ Pipeline engineering |
The fundamental distinction: vector databases answer "what's similar?" while IWE answers "what's related, and how?" Similarity is statistical inference; relationship is semantic understanding. When your AI agent needs to comprehend why a decision was made, how concepts interact, where in your thinking process an idea originated—structured navigation outperforms similarity search by orders of magnitude.
Frequently Asked Questions
Is IWE a replacement for Obsidian or Notion? IWE serves different priorities. Obsidian excels at visual graph exploration for human users; Notion at collaborative databases. IWE prioritizes machine-navigable structure and local-first permanence. Many users maintain IWE as their canonical knowledge graph, syncing subsets to other tools for specific workflows.
Does IWE work without AI agents? Absolutely. The IDE features alone—structured refactoring, go-to-definition for concepts, automated link management—justify adoption for serious knowledge workers. AI integration is additive, not required.
How does IWE handle Markdown flavors?
IWE supports standard Markdown, wiki-style [[links]], tables, and common extensions. The parser is designed for interoperability, not lock-in. Your files remain readable by any Markdown renderer.
Can multiple users share an IWE knowledge graph?
Since everything is files, standard git workflows apply. The .iwe/ metadata merges cleanly with standard conflict resolution. For real-time collaboration, pair with git-based sync tools or accept asynchronous workflows.
What AI tools work with IWE's MCP server? Currently Claude Desktop, Cursor, Windsurf, and any MCP-compatible client. The protocol is open and expanding; expect broader ecosystem support as MCP adoption accelerates.
Is there a mobile app or web interface? No—and intentionally so. IWE's philosophy prioritizes file-system-native access. Use any Markdown editor on mobile; the structure persists. For web access, static site generators can consume your graph.
How does performance scale beyond 20,000 files?
The benchmark demonstrates headroom for substantial growth. For truly massive corpora, the Rust implementation allows profile-guided optimization, and selective indexing via .iweignore maintains responsiveness.
Conclusion: Your Knowledge Deserves Better Than Guesswork
We've accepted too much mediocrity in how we manage—and how we let AI access—our accumulated understanding. Vector similarity is a hack, a statistical approximation when we lack structure. Folders are a constraint, a single-parent hierarchy imposed by filesystems designed for documents, not ideas.
IWE offers something genuinely different: a knowledge representation that serves both human cognition and machine navigation, built on the radical premise that your data should remain yours, in formats that outlast any platform, accessible to intelligence both artificial and human.
The Rust implementation isn't performance theater—it's the substrate that makes real-time AI collaboration feasible. The MCP integration isn't vendor lock-in—it's participation in an open standard for augmenting intelligence. The plain Markdown files aren't limitation—they're liberation from format rot and platform risk.
If you're feeding fragments to AI agents and hoping context emerges, stop. If you're maintaining notes that even you can't navigate after six months, stop. If you're paying cloud providers to hold your thinking hostage, stop.
Install IWE. Initialize your graph. Give your future self—and your AI collaborators—a map worth following.
The repository awaits at github.com/iwe-org/iwe. The knowledge you've already created deserves structure that honors its value.