The simplest possible LangGraph + Temporal sample: a single-node graph that processes a query string.
- Defining a
StateGraphwith a single node - Wrapping it with
LangGraphPluginso the node runs as a Temporal activity - Invoking the graph from a Temporal workflow
Prerequisites: uv sync --group langgraph and a running Temporal dev server (temporal server start-dev).
# Terminal 1
uv run langgraph_plugin/graph_api/hello_world/run_worker.py
# Terminal 2
uv run langgraph_plugin/graph_api/hello_world/run_workflow.py| File | Description |
|---|---|
workflow.py |
process_query node, graph definition and HelloWorldWorkflow |
run_worker.py |
Registers graph with LangGraphPlugin, starts worker |
run_workflow.py |
Executes the workflow and prints the result |