diff --git a/src/oss/images/agent-middleware-execution-flow.svg b/src/oss/images/agent-middleware-execution-flow.svg
new file mode 100644
index 0000000000..2bc940e619
--- /dev/null
+++ b/src/oss/images/agent-middleware-execution-flow.svg
@@ -0,0 +1,2 @@
+
\ No newline at end of file
diff --git a/src/oss/langchain/middleware/custom.mdx b/src/oss/langchain/middleware/custom.mdx
index 318cc5d784..f014867c8b 100644
--- a/src/oss/langchain/middleware/custom.mdx
+++ b/src/oss/langchain/middleware/custom.mdx
@@ -549,6 +549,20 @@ __Agent loop ends__
- `after_*` hooks: Last to first (reverse)
- `wrap_*` hooks: Nested (first middleware wraps all others)
+### Detailed execution flow
+
+The following diagram illustrates the complete agent execution lifecycle with all middleware hook points:
+
+
+
+
+Diagram is based on the [langchain_v1/langchain/agents/factory.py](https://github.com/langchain-ai/langchain/blob/81c4f21b5297b31b2cd82ccefdd134aa0e59efa0/libs/langchain_v1/langchain/agents/factory.py).
+
+
## Agent jumps
To exit early from middleware, return a dictionary with `jump_to`: