1 Write source
Declare what the Tool accepts and returns. Check the program before running it.
ask() → Result<Int, Text>
Typed calls, recorded observations,
replay without external calls.
@tool flow ask() -> Result<Int, Text>
pub flow main() -> Result<Int, ToolProblem<Text>> = ask()
Follow the answer from a typed call into its recorded history.
Declare what the Tool accepts and returns. Check the program before running it.
ask() → Result<Int, Text>
The browser fixture supplies an answer. Local applications supply real implementations.
Call ./main.ask
The observation becomes part of the run's semantic history.
Reply {"Ok":42}
EndUse the recorded answer. No Tool implementation is called.
verdict: matched external calls: 0
pub flow main() -> Int = "forty-two"
A Text value cannot satisfy an Int return type.
Record a note once. Wait for a reply. Continue the same execution and inspect the evidence.
use "./tools"
/// Record once, then wait for a decision without repeating the first effect.
pub flow main(note: Text) -> Result<Int, ToolProblem<Text>> = {
let receipt = tools.record(note)?
let approved = tools.signoff()?
if approved { Ok(receipt) } else { Ok(0) }
}
Use CLI history filters or the optional TUI to inspect recorded calls, exact values and source. Replay verifies the record without repeating Tool effects.
Use the local developer tools →Build the CLI, set up your editor, and follow the learning path.
From a checkout of Flow:
cargo build -p flow-cli cargo run -p flow-cli -- doctorSource checkout (access required) →
Install the coherent local development bundle for macOS or Linux. Configure VS Code or Zed with its matching server and std.
Editor setup →The Book walks through runnable examples. The Reference describes the language target.
Read the Book →Flow is pre-release. The browser uses deterministic Tool fixtures; local applications bind real implementations. Language and tooling may change before the first public release.