Skip to main content

Documentation Index

Fetch the complete documentation index at: https://cognis.vasanth.xyz/llms.txt

Use this file to discover all available pages before exploring further.

Graph examples enact recognizable workflows on top of Graph<S>. Sources under examples/graphs/.
NameScenarioSource
graphs_state_machinePolling loop — check up to 5 times whether an external job is done; give up if not.src
graphs_with_checkpointsResumable 5-step ETL pipeline — extract / validate / transform / load / notify, snapshot per step.src
graphs_interruptsHITL pause-for-approval — agent drafts an email, graph stops before the send node so a reviewer can approve.src
graphs_semantic_routerCustomer-support intent routing — "refund" → refund_flow, "cancel" → cancel_flow, else general help.src
graphs_topic_channelsOnboarding agent that collects (name, hobbies, todo) across turns — reducers per field (last_value vs. append).src

How to run

Most graph examples are offline (no LLM needed):
cargo run -p cognis-examples --example graphs_state_machine
cargo run -p cognis-examples --example graphs_with_checkpoints
cargo run -p cognis-examples --example graphs_interrupts

See also

Graphs and state

The user guide.

Checkpointing

Time travel and resume.

Patterns → HITL approval

Interrupts in a real flow.