Skip to content

Learn By Example

Fernando Koch edited this page Mar 30, 2026 · 3 revisions

Learn By Example

The fastest way to understand GraphK is to follow a progression of runnable scenarios.

This path is for readers who want to see complete workflows first and study the extension points later.

Suggested Progression

1. First Request And Response

Start with the smallest useful public flow:

  • one program
  • one registered pipeline
  • one emitter
  • one session
  • one response
  • optional implicit default when only one pipeline is registered

Read:

Runnable source:

2. Build A Sequential Architecture

Next, move from one node to a real architecture:

  • multiple nodes
  • ordered execution
  • one coherent pipeline
  • one program registration point

Read:

Runnable source:

3. Add Context And Policy

Once the basic flow makes sense, learn how GraphK controls execution through scoped values and validation rules across Program, Runner, Pipeline, and Node.

Read:

Runnable sources:

4. Route One Request To One Branch

Now move from simple sequence to conditional routing.

Read:

Runnable source:

5. Fan Out To Multiple Matching Branches

Finally, learn how GraphK executes multiple matching branches instead of selecting only one.

Read:

Runnable source:

Recommended Supporting Tests

When you want more detail than the examples provide, these test directories are the best next references:

Clone this wiki locally