Skip to content

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

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 thought
Download .aal

Syntax explained

  1. The ability must allow effects(think). Named verb slots such as verdict have type String.

  2. derive rubric_version = 1 is deterministic computation, not a model-generated conclusion.

  3. 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

Terminal
cargo run --locked --bin aalc -- check thinking.aal

cargo run --locked --bin aalc -- build thinking.aal -o thinking.aalc

You can check and build this example directly. Execution requires a model Host configured using the repository guide.

Language source and specification

Try it yourself

Add a named reasoning slot and run check. Replace effects(think) with effects() and inspect the effect mismatch diagnostic.

Language source and specification