from praisonaiagents import Agent
# First run - agent with memory and session
agent = Agent(
name="Bot",
memory={
"db": "postgresql://postgres:praison123@localhost/praisonai",
"session_id": "session-001"
}
)
response = agent.start("My favorite color is blue")
print(response)
# Later run (same session_id) - automatically resumes
agent2 = Agent(
name="Bot",
memory={
"db": "postgresql://postgres:praison123@localhost/praisonai",
"session_id": "session-001"
}
)
response = agent2.start("What's my favorite color?")
# Agent remembers: "Your favorite color is blue"
print(response)