Skip to content

Graph Examples

Sudhanshu edited this page Nov 11, 2026 · 1 revision

Complete Example Catalog

# CLI topic Technical focus API needed?
01 greeting Single graph node, string state No
02 factorial Integer state and deterministic computation No
03 llm_node Optional ChatOpenAI node Yes
04 normal_edges Reverse then uppercase sequential graph No
05 conditional_edges Route after adding ten No
06 typed_dict_state Even/odd router using a TypedDict No
07 pydantic_state Input/output validation with Pydantic No
08 input_output_schemas Separate external input, internal state, output No
09 private_schema Derived intermediate private channels No
10 reducer_overwrite Last write replaces field No
11 reducer_numeric_add Numeric accumulation No
12 reducer_list_append List concatenation No
13 custom_reducer Ordered unique-list merge No
14 add_messages Add/replace messages by ID (no graph) No
15 messages_state Offline canned assistant with MessagesState No
16 messages_state_llm Optional model-backed message response Yes
17 subgraph_wrapper HR parent invokes IT with a different schema No
18 subgraph_direct HR parent adds compiled IT subgraph directly No

Useful commands

python .\langgraph_example_multi_agents.py --list
python .\langgraph_example_multi_agents.py --topic typed_dict_state
python .\langgraph_example_multi_agents.py --topic subgraph_direct
python .\langgraph_example_multi_agents.py --self-test

See CLI Reference for complete options and Notebook Guide for the independent notebook.

Clone this wiki locally