dynamic-langgraph

Concepts

  • JSON Config Reference
  • Validation Reference
  • Persistence
  • Interrupts (Human-in-the-Loop)
  • Send API (Map-Reduce)
  • Subgraph Composition
  • Streaming

API Reference

  • DLGValidator API Reference
  • DLGCompiler / DLGEngine API Reference
  • Exceptions API Reference
  • DLGTestHarness API Reference

Examples

  • Hello World
  • Human Review (Interrupt/Resume)
  • Map-Reduce with Send API
  • Subgraph Composition
  • Example Gallery (examples_py/)
    • human_in_the_loop/wait-user-input.json
    • customer-support/customer-support.json
    • chatbots/information-gather-prompting.json
    • extraction/retries.json
    • code_assistant/langgraph_code_assistant.json (and ..._mistral.json)
    • chatbot-simulation-evaluation/agent-simulation-evaluation.json (and langsmith-...json)
dynamic-langgraph
  • Example Gallery (examples_py/)
  • View page source

Example Gallery (examples_py/)

The examples_py/ directory holds real-world DLG topology configs, adapted from LangGraph’s official how-to guides. They illustrate graph shapes you can copy into your own project.

Note

These configs are reference topologies only. The .py files sitting next to each config are archival stubs from the upstream LangGraph docs repo (each says “this file has been moved”) — they are not DLG node handlers and the configs will not DLGEngine.from_file(...) and run as-is. To use a pattern below, copy the JSON and write your own state.py / nodes.py implementing the named handlers and routers, following the Hello World walkthrough.

human_in_the_loop/wait-user-input.json

Agent runs, then pauses for human approval before executing an action.

  • agent → conditional router needs_human_review → human_review (review) or __end__ (end)

  • human_review has interrupt_before: true → pauses for Command(resume=...)

  • human_review → execute → __end__

See Human Review for the minimal working version of this pattern.

customer-support/customer-support.json

Classic router fan-out: one classifier node dispatches to one of several specialist agents.

  • Entry router → conditional router classify_intent → billing_agent / technical_agent / general_agent

  • Each specialist agent edges directly to __end__

chatbots/information-gather-prompting.json

Loop-until-satisfied pattern: keep asking clarifying questions until enough information has been gathered.

  • gather_info → conditional router has_enough_info → back to gather_info (gather) or respond (respond)

  • respond → __end__

extraction/retries.json

Structured extraction with per-node retry policy and a validation loop.

  • extract node declares retry_policy (max_attempts: 3, exponential backoff)

  • extract → validate → conditional router route_validation_result → back to extract (retry) or __end__ (end)

  • Uses a pydantic state definition instead of typed_dict

code_assistant/langgraph_code_assistant.json (and ..._mistral.json)

RAG + self-correcting code generation, with two independent check gates.

  • retrieve → generate → conditional router route_after_generate → check_code or straight to check_hallucination

  • check_code → conditional router route_after_check → back to generate (regenerate) or check_hallucination

  • check_hallucination → __end__

  • The _mistral variant is the same topology with a swapped generate_code_mistral handler — shows how to parameterize a graph per model provider.

chatbot-simulation-evaluation/agent-simulation-evaluation.json (and langsmith-...json)

Simulate a user/chatbot conversation for N turns, then score the transcript.

  • simulated_user → chatbot → conditional router should_continue_simulation → loop back to simulated_user (continue) or evaluator (evaluate)

  • evaluator → __end__

  • The langsmith-... variant adds "settings": {"telemetry": {"enabled": true, "provider": "langsmith"}} and swaps the evaluator node for one that calls LangSmith — see Streaming/telemetry notes for the general telemetry story.


For contributors: if you turn one of these into a fully runnable example (add state.py + nodes.py), update this page and move it out of the “reference only” framing above.

Previous

© Copyright 2026, dynamic-langgraph contributors.

Built with Sphinx using a theme provided by Read the Docs.