Nodes & edges
Compile StateGraph workflows with START/END transitions and sequential node execution.
Explore real Python examples of LangGraph's graph execution, conditional routing, typed state, reducers, message history, and reusable HR/IT subgraphs. Start offline; connect an OpenAI model only when you choose to.
A graph-orchestration learning project—not LLM pretraining, a deployed autonomous-agent platform, or a production benchmark.
ILLUSTRATIVE ROUTING + STATE FLOW
WHAT THE CODE DEMONSTRATES
These capabilities are based on the current Python source. Each example keeps a focused scope so you can inspect graph execution and state behavior separately.
Compile StateGraph workflows with START/END transitions and sequential node execution.
Route execution using intermediate values and explicit branch mappings.
Use TypedDict with input/output or private channels and partial node updates.
Validate bounded values explicitly, including calculated outputs.
Compare overwrites, numeric/list accumulation and distinct-item merging.
Demonstrate add_messages and MessagesState without a hosted model.
Show wrapper-based and direct shared-schema HR / IT orchestration.
Explore sixteen deterministic examples without an LLM API or GPU.
Two OpenAI integrations gated behind configuration and explicit selection.
Export Mermaid graph sources and example results as JSON.
Run a companion Jupyter notebook alongside the CLI implementation.
Install using a Python virtual environment; optional launcher available.
HIGH-LEVEL DESIGN
LangGraph compiles nodes and edges into executable workflows. The implementation demonstrates branch selection, state updates, message reduction, and nested graph composition.
Different handlers can run based on the state returned by an earlier node. The project's numerical routing example selects multiplication or subtraction.
Input, internal, private, and output schemas make data flow explicit. Nodes return partial dictionaries instead of mutating the input state.
Examples contrast overwriting a value with additive accumulation, unique-list merging, and message-ID-aware updates using add_messages.
Two compositional patterns illustrate calling an IT graph inside an HR node or attaching a compiled IT graph directly when the schemas match. These are workflow examples, not independent deployed agents.
EXAMPLE DIRECTORY
Browse by topic. Sixteen examples are deterministic and API-free; two illustrate optional hosted model integration. All eighteen are present in the repository's Python CLI.
--topic to run individuallyBuild a single greeting node, connect START and END, compile and invoke the graph.
Run an integer-processing node with an explicit input and deterministic output.
Invoke a hosted OpenAI model through a LangGraph node when configured.
Compose reverse-string and uppercase nodes with normal graph edges.
Route data to multiplication or subtraction branches based on the intermediate state.
Define structured state keys and route even/odd values using partial state updates.
Validate input bounds and explicitly validate computed output before updating state.
Separate input, internal and output schemas to expose a focused graph interface.
Pass derived counts between nodes without exposing them as public output.
Compare the default last-write state behavior with reducer-based merging.
Use Annotated state with operator.add to combine integer updates.
Append list values across graph nodes using an addition reducer.
Preserve insertion order while combining distinct list values through a custom reducer.
Merge or replace LangChain messages using stable IDs and add_messages.
Construct a MessagesState graph with structured conversation history, no API required.
Use an optional OpenAI model with message state and a personalized prompt.
Invoke an IT subgraph inside an HR parent node while adapting different state schemas.
Add a compiled IT subgraph directly as a node in the HR parent graph.
No matching example. Try another search term or select All.
GETTING STARTED
These commands use the filenames currently present in your GitHub repository. Python 3.11 or 3.12 is recommended; a GPU is not required for the orchestration examples.
git clone https://github.com/su394611-del/Mutli-agents-using-LangGraph.git
cd Mutli-agents-using-LangGraph
py -3.12 -m venv .venv-langgraph
.\.venv-langgraph\Scripts\python.exe -m pip install --upgrade pip
.\.venv-langgraph\Scripts\python.exe -m pip install -r requirements_langgraph_example.txt.\.venv-langgraph\Scripts\python.exe langgraph_example_multi_agents.py --list
.\.venv-langgraph\Scripts\python.exe langgraph_example_multi_agents.py --self-test.\.venv-langgraph\Scripts\python.exe langgraph_example_multi_agents.py --topic conditional_edges
.\.venv-langgraph\Scripts\python.exe langgraph_example_multi_agents.py --topic subgraph_wrapper.\.venv-langgraph\Scripts\python.exe langgraph_example_multi_agents.py --export-mermaid .\diagrams --json-output .\results.jsonSOURCE & DOCUMENTATION
The project exposes its Python functions, example notebook, dependencies and README directly. Explore the exact code behind each behavior rather than relying on a marketing description.
This is a runnable Python learning project for LangGraph orchestration. Its offline examples use deterministic Python operations—not an on-device trained language model.