Key facts
- A minimal LLM agent is a graph of nodes, action-labeled edges, and a shared store — the model Pocket Flow names Graph + Shared Store.
- This page is a labeled synthetic specimen. It does not call a model and is not the official Pocket Flow runtime.
- LangChain, LangGraph, and LlamaIndex still win when you need a harness, durable execution, or a document pipeline.
"Graph + Shared Store"
How to read a tick
A node that mixes retrieval, prompting, retries, and routing in one function is hard to test because you cannot say what failed. The three-step lifecycle is small on purpose. prep reads. exec computes and should not mutate the store. post writes and returns an action string. The flow is then a lookup: that action, or default, selects the next node.
That is the whole router. There is no hidden callback graph behind the specimen. The unused answer edge on the retrieval path is still drawn because branching is a label you did not return, not a feature you have to import.
What this specimen is
It is a teaching run of a three-node agent. The retrieval path attaches two public-doc snippets this site already cites. The skip path shows that Search can exist on the graph and still not run. Both paths end when Answer returns done. The shared store is an in-memory dictionary, which is how Pocket Flow documents the idea; in production it might be a typed object, a row, or a durable checkpoint.
Sketch your own nodes in the agent graph designer. That tool is a pad. This page is the specimen.
What this specimen is not
It is not Pocket Flow running in your browser, and it is not an argument that production systems should stay this small. The run has no persistence across a worker restart, no trace backend, no human interrupt, no eval harness, and no document parsers. Those absences are the point of the desk: you can see the control flow because nothing else is on the table.
Honest remainder
- LangGraph earns its weight when you need durable execution, memory, streaming, or human-in-the-loop as a first-class interrupt — not as a
console.inputinexec. - LangChain earns its weight when the job is a configurable agent harness: model, tools, prompt, and middleware, plus the surrounding integrations.
- LlamaIndex earns its weight when the hard problem is documents: loading, parsing, indexing, retrieval, and extraction. The Search node on this page is a labeled stand-in, not a data framework.
A good tiny graph can become the specification for a later production runtime. Starting in a heavy framework because you might need those features later is how teams lose the ability to name their own state machine.
The three parts
Nodes own one coherent unit of work. If you cannot write a single-sentence job and a retry policy, the node is too large. If the next node always needs a private leftover, the node is too small.
Edges are actions, not vibes. search, answer, default, and done are reviewable. A planner that returns free prose is not a router until you map that prose onto this set.
The shared store is the debugging surface. A failed run should show whether retrieval, composition, or routing was the miss. Params, in Pocket Flow’s docs, are for batch identity — a chunk number, not the chunk.
FAQ
Do I need a heavy framework for agents?
No, not if the job is a small state machine you can draw. You need a heavier runtime when durable execution, human-in-the-loop interrupts, production tracing, deployment, or a document pipeline is the actual problem. The Tiny Graph is the first case, stepped.
What is a minimal LLM orchestration approach?
Name the nodes, label the action edges, and keep shared state explicit. Each node reads the store in prep, computes in exec, writes and returns an action in post. Pocket Flow, by The Pocket, is the open-source project that popularized that shape; this site is an independent guide to it.
How do node/graph agent frameworks work?
A node owns one unit of work. The action string it returns selects the next node. The shared store is the contract between hops. Agent loops, workflows, and RAG pipelines are different graphs, not different universes.
Is LangChain overkill?
Sometimes. It is overkill when you only need a few explicit hops and provider calls you already understand. It is not overkill when you want its agent harness, middleware, and integrations. LangGraph is the better comparison once you need a production orchestrator rather than a dictionary and a loop.
Is this the official Pocket Flow project?
No. Pocket Flow is open-source software by The Pocket, documented at the-pocket.github.io/PocketFlow and on GitHub. PocketFlow AI Guide is an independent educational site. The run on this page is a labeled synthetic specimen, not a live Pocket Flow process.
Does The Tiny Graph call a model?
No. The ticks are authored so you can inspect prep, exec, post, and store writes without a provider. Use the agent graph designer when you want to sketch your own nodes; use this page when you want to watch one run.
Sources used on this page
- Pocket Flow documentationThe Pocket. Accessed July 12, 2026. Primary source for the 100-line claim, Graph + Shared Store abstraction, core patterns, and utility philosophy.
- The-Pocket/PocketFlow GitHub repositoryGitHub. Accessed July 12, 2026. Primary repository and README for installation, license, language ports, examples, and project framing.
- Pocket Flow Node documentationThe Pocket. Accessed July 12, 2026. Primary source for prep, exec, post, retries, and fallback behavior.
- Pocket Flow Flow documentationThe Pocket. Accessed July 12, 2026. Primary source for action-based transitions, branching, loops, and nested flows.
- Pocket Flow Communication documentationThe Pocket. Accessed July 12, 2026. Primary source for Shared Store and Params guidance.
- LangChain overviewLangChain. Accessed July 12, 2026. Primary source for LangChain create_agent, integrations, middleware, and LangGraph relationship.
- LangGraph overviewLangChain. Accessed July 12, 2026. Primary source for durable execution, persistence, human-in-the-loop, memory, and production orchestration claims.
- LlamaIndex developer documentationLlamaIndex. Accessed July 12, 2026. Primary source for LlamaIndex document loading, indexing, retrieval, parsing, and extraction scope.
Cite this page
The Tiny Graph. PocketFlow AI Guide. Updated September 19, 2026. https://pocketflowai.com/tiny-graph/
PocketFlow AI Guide. "The Tiny Graph." Accessed September 19, 2026. https://pocketflowai.com/tiny-graph/