Examples · learn/15-first-agent · 210 of 339
memory
tin run examples/learn/15-first-agent/memory.tinagent Echo { model: "mock" }
fn main() {
print(Echo("my name is Ada"))
print(Echo("what is my name?")) // a real model would see both messages and answer "Ada"
print("model calls so far: {Echo.turns()}")
Echo.reset() // forget the conversation: the next call starts fresh
print(Echo("what is my name?"))
}