from definable.agent import Agent
from definable.memory import Memory, SQLiteStore
from definable.model import OpenAIChat
memory = Memory(store=SQLiteStore("./example_memory.db"))
agent = Agent(
model=OpenAIChat(id="gpt-4o-mini"),
instructions="You are a helpful assistant with persistent memory.",
memory=memory,
)
# Store information
output = agent.run(
"My name is Alice and I'm a software engineer at Acme Corp.",
user_id="alice",
)
print(output.content)
# Recall information
output = agent.run("What do you know about me?", user_id="alice")
print(output.content)