from agno.agent import Agent
from agno.db.postgres import PostgresDb
from agno.learn import LearningMachine, UserMemoryConfig, UserProfileConfig
from agno.models.openai import OpenAIResponses
agent = Agent(
model=OpenAIResponses(id="gpt-5.2"),
db=PostgresDb(db_url="postgresql+psycopg://ai:ai@localhost:5532/ai"),
learning=LearningMachine(
user_profile=True,
user_memory=UserMemoryConfig(max_memories=20),
),
instructions="""You are a personal assistant. Use what you know about
the user to provide personalized, relevant responses.""",
)
# Over time, the assistant learns:
# - Profile: Name, timezone, role
# - Memories: Preferences, ongoing projects, communication style