Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Yanshi Examples Documentation

This directory documents runnable tutorials and example walkthroughs for Yanshi’s Content Studio generators, deterministic DAG workflows, and agent-native loops.

Start Here


Step-by-Step Tutorials in This Manual

📘 Runnable Tutorials (中文)

Copy-and-run tutorials for the core Yanshi execution paths:

  • Fixed DAG workflow (yanshi-core/examples/fixed_dag_workflow.rs)
  • Agent-native ReAct runtime (yanshi-agents/examples/agent_native_react.rs)
  • DAG + Agent hybrid workflow (yanshi-agents/examples/hybrid_workflow_agent.rs)
  • Skill + MCP tool discovery and call (yanshi-skills/examples/skill_calls_mcp_tool.rs)
  • WorkflowTool wrapping a child DAG

🧰 CLI Config-First Tutorial

Copy-and-run CLI walkthrough for the V2 YAML workflow and Skill paths:

  • Offline mock model configuration
  • Fixed DAG validation, --dry-run, and execution
  • Skill inspect / list-tools / test / run with --model, --memory, and --trace
  • skill_agent hybrid workflow execution
  • RAG + Skill workflow validation (yanshi-cli --features rag)
  • Signed marketplace package installation

🦀 Rust Interview Code-First Workflow (中文)

End-to-end walkthrough of authoring and testing a typed Rust SDK workflow.

🤖 Simple Agent LLM Flow

Walkthrough and Mermaid sequence/structure diagrams (simple_agent_llm_flow_diagram.mermaid, execution_flow_diagram.mermaid) for conditional LLM routing and observability.


Validating & Smoke-Testing Examples Locally

# Type-check every crate example across the workspace
cargo check --workspace --examples

# Strictly validate any Studio generator or CLI workflow YAML
cargo run -p yanshi-cli -- workflow validate examples/generators/illustrated_slides.yml --strict

# Run the offline CI example smoke suite
cargo xtask examples-smoke