LangGraph Evaluation
Evaluating normalize's relationship to LangGraph and the broader agent ecosystem.
TL;DR
Normalize is a code intelligence tool, not an agent framework. LangGraph handles orchestration well; we handle context well. These are complementary, not competing.
Our differentiator: Working memory, not chat history. Current agents (LangGraph, Claude, Cursor) think in conversation - messages accumulate until truncated. But thinking isn't conversation. Agents need structured working memory they can manage. That's the gap.
Layered Architecture
What LangGraph Does Well
- Orchestration primitives - Graphs, nodes, edges, conditional routing
- Persistence - Multiple backends (memory, sqlite, postgres)
- Time travel - Fork from any checkpoint, debug decisions
- Streaming - Token-by-token, node updates, custom events
- Human-in-the-loop -
interrupt()+Commandprimitive - Durable execution -
taskdecorator caches side effects - Ecosystem - LangSmith Studio, LangGraph Platform
What LangGraph Doesn't Do
- Working memory management - Agents think in chat history, but thinking ≠ conversation
- Chat history is the wrong abstraction for agent cognition
- Agents need working memory, not conversation logs
- Current model: accumulate messages until truncation
- Better model: structured working memory the agent can manage
- Code-aware context - "What's the minimal context for this function?"
- Structural representations - Skeletons, AST-level views
- Token efficiency - "Summarize this codebase in 2k tokens"
- Safe code modification - Shadow git, atomic rollbacks
- Multi-language understanding - Call graphs across Python/Rust/etc.
The fundamental gap: Chat history is not working memory. Agents need to manage working memory, not accumulate conversation.
Layer Responsibilities
| Layer | Ships with normalize? | Could use external? |
|---|---|---|
| Frontends | TUI, CLI, MCP | IDE plugins, web, A2A |
| Orchestration | Yes (low friction OOTB) | LangGraph, Claude, etc. |
| Context | Yes (core value) | No - this is us |
| Tools | Yes | - |
| Engine | Rust CLI | - |
Practical Implications
NormalizeAPI should be tool-shaped
Pure, stateless tools that any orchestrator can call:
view(locator)→ structured code viewedit(path, task)→ safe modificationanalyze(target)→ health/complexity/security
Orchestration is optional, separate
- Orchestration now lives in spore
- Normalize provides intelligence primitives, not agent loops
- External callers (LangGraph, Claude, spore) bring their own orchestration
Context Layer is the product
What makes normalize valuable:
- Working memory primitives - Structure over chat history
- Skeleton extraction (structure without implementation)
- Fisheye views (focused context with surrounding awareness)
- Call graphs (understand flow without reading everything)
- Token-efficient summaries (right context, right size)
The key insight: thinking ≠ conversation. Agents need working memory, not message logs.
LangGraph Integration (If Wanted)
Normalize as tool provider, LangGraph as orchestrator:
from langgraph.graph import StateGraph
from langchain_core.tools import tool
from normalize import NormalizeAPI
api = NormalizeAPI.for_project(".")
@tool
def view_code(locator: str) -> str:
"""View code structure efficiently."""
return api.view.view(locator)
@tool
def edit_code(path: str, task: str) -> str:
"""Edit code with structural awareness."""
return api.edit.edit(path, task)
@tool
def analyze_code(target: str) -> str:
"""Analyze code health, complexity, security."""
return api.analyze.analyze(target)
# LangGraph handles orchestration
# Normalize handles code intelligenceLangSmith Studio
Nice for debugging agent decisions, but:
- Paid service dependency
- Reflects LangGraph's model, not ours
- Our TUI may better reflect normalize's context-centric model
Not a reason to adopt or reject LangGraph.
Recommendations
- Don't add orchestration to normalize - That's spore's domain
- Do keep NormalizeAPI tool-shaped - Usable by any orchestrator
- Do make Context Layer explicit - Reusable by external callers
- Consider LangGraph integration - As one frontend, not foundation
Summary
| Concern | LangGraph | Normalize |
|---|---|---|
| Orchestration | ✓ Their strength | Not in scope (see spore) |
| Working memory | ✗ Chat history | ✓ Structured, manageable |
| Persistence | ✓ Mature | Shadow Git (code-specific) |
| Multi-frontend | ✗ Python graphs | ✓ MCP, TUI, CLI, HTTP, A2A |
Normalize provides working memory primitives.LangGraph provides orchestration.
The fundamental problem: current agents think in chat history, but thinking isn't conversation. Agents need structured working memory. Normalize provides the primitives for that.