Transform · Trace · Evaluation · Feedback / lesson 01
Run one small primitive end to end
The primitive is deliberately small enough to understand by inspection.
Know what the primitive owns.
Problem
Without named state transitions, normalization, parsing, model calls, and checks collapse into one opaque function.
System boundary
A Transform owns one typed transition. A GraphRun owns the completed record. Evaluators judge output; feedback resolvers map that judgment to an action.
State changes become visible.
Inspectable: The original input, final output, ordered TraceStep records, and optional evaluation and feedback.
Edit the input and run the exact three-stage string pipeline.
Static specimen / JavaScript adds controls without changing the lesson.
Same idea, honest surfaces.
const trim = createTransform<string, string>({
id: "trim",
name: "Trim",
run: (input) => input.trim(),
});
const graph = createModelGraph({
id: "core-pipeline",
name: "Core Pipeline",
transforms: [trim, lowercase, splitWords],
});
const run = await graph.run(" Hello Model Graph ");
trim = create_transform(
"trim", "Trim", lambda text, _ctx: text.strip()
)
graph = create_model_graph(
"core-pipeline",
"Core Pipeline",
[trim, lowercase, split_words],
)
run = graph.run(" Hello Model Graph ")
What this does not imply.
The original document describes the first linear v1. The current runner still supports that default and also supports explicit acyclic DAG connections.