AgentOS turns the agent into that API.
Start PgVector on port 5532 before running this example.
data_agent.py
python data_agent.py. The app="data_agent:app" import string has to match the module name. Every surface then calls the same endpoint:
Surfaces a data agent lives on
The serving model is identical to a product agent. The difference is what the agent does, not how it is served.
user_id and session_id select the conversation history for a run.
Shared learnings, separate sessions
A data agent’s value compounds when corrections are shared across the team. Conversation threads stay scoped byuser_id and session_id. learning=True only enables the per-user profile and memory stores, so to share what the agent learns, pass a knowledge base to LearningMachine instead. That enables the Learned Knowledge store, whose namespace defaults to "global", so a fix triggered by one analyst’s question helps everyone.
AGENTIC mode: the model decides when to call save_learning and search_learnings. To keep learnings inside one team or tenant, set namespace on LearningMachine.