Skip to content

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 ​

  1. Orchestration primitives - Graphs, nodes, edges, conditional routing
  2. Persistence - Multiple backends (memory, sqlite, postgres)
  3. Time travel - Fork from any checkpoint, debug decisions
  4. Streaming - Token-by-token, node updates, custom events
  5. Human-in-the-loop - interrupt() + Command primitive
  6. Durable execution - task decorator caches side effects
  7. Ecosystem - LangSmith Studio, LangGraph Platform

What LangGraph Doesn't Do ​

  1. 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
  2. Code-aware context - "What's the minimal context for this function?"
  3. Structural representations - Skeletons, AST-level views
  4. Token efficiency - "Summarize this codebase in 2k tokens"
  5. Safe code modification - Shadow git, atomic rollbacks
  6. 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 ​

LayerShips with normalize?Could use external?
FrontendsTUI, CLI, MCPIDE plugins, web, A2A
OrchestrationYes (low friction OOTB)LangGraph, Claude, etc.
ContextYes (core value)No - this is us
ToolsYes-
EngineRust CLI-

Practical Implications ​

NormalizeAPI should be tool-shaped ​

Pure, stateless tools that any orchestrator can call:

  • view(locator) → structured code view
  • edit(path, task) → safe modification
  • analyze(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:

python
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 intelligence

LangSmith 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 ​

  1. Don't add orchestration to normalize - That's spore's domain
  2. Do keep NormalizeAPI tool-shaped - Usable by any orchestrator
  3. Do make Context Layer explicit - Reusable by external callers
  4. Consider LangGraph integration - As one frontend, not foundation

Summary ​

ConcernLangGraphNormalize
Orchestration✓ Their strengthNot in scope (see spore)
Working memory✗ Chat history✓ Structured, manageable
Persistence✓ MatureShadow 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.