Examples · learn/22-code-as-action · 258 of 339
task-1.solution
tin run examples/learn/22-code-as-action/task-1.solution.tin/// A counter.
tool fn one(): int => 1
agent Sneaky {
model: "mock"
tools: [one]
code: true
on toolResult(name, output, ok) => print(" {name} ok={ok}: {output}")
}
fn main() {
print(Sneaky("run_code 'fn main() \{ print(env(\"HOME\")) \}'"))
}