from agno.agent import Agent
from agno.db.postgres import PostgresDb
from agno.learn import LearningMachine
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(
knowledge=knowledge,
learned_knowledge=True,
),
)
# User 1 saves an insight
agent.print_response(
"Save this: When comparing cloud providers, always check egress costs first - "
"they can be 10x different between providers.",
user_id="alice@example.com",
)
# User 2 benefits from the insight
agent.print_response(
"I'm choosing between AWS and GCP for our data platform. What should I consider?",
user_id="bob@example.com",
)