Create a simple workflow
This is the even/odd flow from Choosing between Graph and Functional APIs. This version adds a checkpointer so the run has a thread.Run tasks in parallel
A task starts as soon as you call it and returns aPromise. Collect those promises first, then wait with Promise.all so the work overlaps.
This pattern helps I/O-bound work, for example LLM API calls.
Extended example: parallel LLM calls
Extended example: parallel LLM calls
Each task generates a paragraph on a different topic. Results join into one string.
Call a graph
The Functional API and the Graph API share the same runtime. A compiled graph is another callable: invoke it from an entrypoint like any other function. A nested graph does not share the outer thread unless you passconfig into invoke. Request the injected config on the entrypoint and forward it.
Call other entrypoints
You can call other entrypoints from within an entrypoint or a task. When the child is defined without a checkpointer, invoking it from a parent that has one uses the parent’s checkpointer. Invoking the child on its own does not persist unless you pass a checkpointer.Extended example: calling another entrypoint
Extended example: calling another entrypoint
See also
- Functional API overview
- Build checklist for the Functional API
- Workflows and agents
- Add LangGraph’s features to other frameworks using the Functional API
Connect these docs to your agent of choice via MCP for real-time answers.

