Think & Effects
Separate model requests from deterministic computation.
think about defines a reasoning request. A configured Host executes the instructions and the kernel validates its result. Here we request an analysis and verdict, then attach a program-defined rubric version.
Complete example
Save the example as thinking.aal
agent Tutorial is Agent
public
ability run(topic: String) -> ThoughtResult effects(think)
thought = think about topic
analyze "Identify the central claim in {topic}"
decide verdict: "Explain whether the evidence supports it"
derive rubric_version = 1
return thoughtSyntax explained
-
The
abilitymust alloweffects(think). Named verb slots such as verdict have typeString. -
deriverubric_version = 1 is deterministic computation, not a model-generated conclusion. -
check and build need no model. Running think requires a configured model Host. A valid result shape does not prove a conclusion true; there is no fixed expected model output.
Build and run
cargo run --locked --bin aalc -- check thinking.aal
cargo run --locked --bin aalc -- build thinking.aal -o thinking.aalcYou can check and build this example directly. Execution requires a model Host configured using the repository guide.
Try it yourself
Add a named reasoning slot and run check. Replace effects(think) with effects() and inspect the effect mismatch diagnostic.