langchain-ai /

LangChain

Live map
Snapshotmaster · 9a58107

A model request loops through middleware and tools until it becomes a final or structured response.

Click a building or route
Choose a path

Follow one model decision through a tool and back into conversation state.

System map7 components · 7 connections
130%
LangChain: an agent assembled from contracts architectureStart at the factory, follow the model-tool loop across the center, then exit through structured output.ordered middleware hooksmodel request and runt…system, human, AI, and…named calls and JSON a…validated tool argumentsToolMessages keyed by …Agent factoryMiddlewarepipelineChat modelTool nodeMessage stateExternal toolsStructuredoutput
Connections
BuildingsEntryServiceComputeStorageRuntimeToolingExternal

Terms, in plain English

MiddlewareHooks that wrap or transform agent model and tool execution.

How to study this repo

  1. 1
    Build the graph

    Trace create_agent from its inputs to the model and tool nodes.

  2. 2
    Follow one tool call

    Track its call ID from AIMessage through ToolNode and ToolMessage.

  3. 3
    Add one policy

    Read a middleware implementation and identify which request or result it changes.