from agno.agent import Agentfrom agno.db.sqlite import SqliteDbfrom agno.models.openai import OpenAIResponsesfrom agno.tools.hackernews import HackerNewsToolsfrom rich.pretty import pprintdb = SqliteDb(db_file="agents.db")john_doe_id = "[email protected]"chat_agent = Agent( model=OpenAIResponses(id="gpt-5.2"), description="You are a helpful assistant that can chat with users", db=db, update_memory_on_run=True,)chat_agent.print_response( "My name is John Doe and I like to hike in the mountains on weekends.", stream=True, user_id=john_doe_id,)chat_agent.print_response("What are my hobbies?", stream=True, user_id=john_doe_id)research_agent = Agent( model=OpenAIResponses(id="gpt-5.2"), description="You are a research assistant that can help users with their research questions", tools=[HackerNewsTools()], db=db, update_memory_on_run=True,)research_agent.print_response( "I love reading about AI. What are the top stories on Hacker News about AI?", stream=True, user_id=john_doe_id,)memories = research_agent.get_user_memories(user_id=john_doe_id)print("Memories about John Doe:")pprint(memories)