-
Notifications
You must be signed in to change notification settings - Fork 0
Example 1 First Request and Response
Fernando Koch edited this page Mar 30, 2026
·
3 revisions
Understand the smallest useful public GraphK flow.
You have one incoming value and you want one response. You do not need branching, policy, or a complex architecture yet. You only want to see the session enter the graph and the response come back out.
import graphk
pipeline = graphk.SequencePipe(nodes=[graphk.demo.EchoNode()])
program = graphk.Program({"echo": pipeline})
emitter = graphk.Emitter(program)
emitter.request("echo", graphk.Session(value=5))
print(emitter.response())- the program stores the pipeline under
echo - the emitter resolves
echo - a transient runner executes the pipeline
-
EchoNodereadsvalue -
EchoNodewrites a response payload -
emitter.response()returns that payload from the cached session
This is the simplest complete GraphK story:
- architecture
- program registration
- runtime state
- execution
- final response