docs(examples): per-example docs pages with mermaid diagrams#54
Merged
Conversation
New top-level Examples section in the docs nav, sitting between Concepts and Model Providers. One page per example (00 through 09) plus an index, each following the same structure: overview / what it teaches / how to run / mermaid graph / reading the output. Mermaid is wired into pymdownx.superfences so the per-example graph shapes render inline. Cross-links to the relevant concepts pages appear in each "What it teaches" section. extra.css gets a small left-pad on nested primary-nav links so the section hierarchy reads at a glance now that the Examples section runs 11 entries deep. The llms.txt / llms-full.txt plugin config picks up the new Examples section plus Model Providers (which had been omitted since the plugin was first added) so AI-assistant ingestion covers the full public docs surface.
There was a problem hiding this comment.
Pull request overview
Adds a new Examples documentation section with per-example walkthrough pages, Mermaid graphs, navigation updates, and llms.txt coverage for the expanded docs surface.
Changes:
- Adds docs pages for examples 00–09 plus an examples index.
- Configures Mermaid rendering and includes Examples/Model Providers in llms.txt sections.
- Adds primary-nav indentation styling for nested nav items.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
mkdocs.yml |
Adds Examples nav entries, llms.txt sections, and Mermaid superfences config. |
docs/stylesheets/extra.css |
Adds indentation for nested primary navigation links. |
docs/examples/index.md |
Introduces the Examples landing page and catalog. |
docs/examples/00-hello-world.md |
Documents the hello-world routed pipeline example. |
docs/examples/01-routing-and-subgraphs.md |
Documents routing and subgraph composition. |
docs/examples/02-explicit-subgraph-mapping.md |
Documents explicit mapping for reused subgraphs. |
docs/examples/03-observer-hooks.md |
Documents observer hook usage and output. |
docs/examples/04-nested-subgraphs.md |
Documents nested subgraph composition. |
docs/examples/05-fan-out-with-retry.md |
Documents fan-out, retry, timing, and collect-mode behavior. |
docs/examples/06-parallel-branches.md |
Documents parallel branch execution. |
docs/examples/07-multimodal-prompt.md |
Documents multimodal prompts and prompt grouping. |
docs/examples/08-checkpointing-and-migration.md |
Documents checkpoint resume and state migration. |
docs/examples/09-tool-use.md |
Documents tool-calling agent loop behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- 09-tool-use: drop the invented third call_llm. The conditional
edge inspects each call_llm result and routes directly; the
happy path is 2 turns, not 3. Trace block was already correct.
- 04-nested-subgraphs: "name spaces" -> "namespaces".
- 03-observer-hooks: correct the per-invocation metrics counts.
The default Observer subscription is both started and completed,
so 4 nodes produce 8 events with 4 distinct namespaces. Added a
note above the trimmed tracer sample that started events fire
too (printing as -> {} since post_state isn't yet populated).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Second of the docs-phase PRs. Adds a new top-level Examples section to the docs site, sitting between Concepts and Model Providers in the left nav.
concepts/*.mdpages in each "what it teaches" section.pymdownx.superfencespicks up amermaidcustom fence so per-example graph shapes render inline. No external script tag; Material's bundled JS loads the mermaid runtime when it sees a.mermaidelement.extra.cssso the section hierarchy reads at a glance now that Examples runs 11 entries deep.Out of scope (next PR): README / Quickstart / Concepts re-read against v0.6.0.
Test plan
uv run --group docs mkdocs build --strictsucceedssite/llms.txtcontains an## Examplessection listing all 10 example pages plus the indexsite/llms.txtcontains a## Model Providerssection listing both pages