Examples · learn/19-capabilities · 241 of 339
task-1.solution.caps
tin run examples/learn/19-capabilities/task-1.solution.caps.tin/// Read the weather for a city.
tool fn weather(city: string): string => fetch("https://example.com/weather?city={city}").or("unknown")
/// Remember a note.
tool fn note(text: string): string {
print("note: {text}")
"saved"
}
agent Forecaster { model: "mock", tools: [weather] }
agent Notes { model: "mock", tools: [note] }
fn main() {}