v2.2.4
Changelog
New Features:
- Granular control of history messages: Add 
num_history_messagesto control how many messages to consider when getting them from history. - Update AgentOS instances from lifespan functions: You can know gain access to the contextual AgentOS instance in lifespan functions. This is useful to update anything inside the AgentOS instance after it has already been initialized and run.
 
Improvements:
- Handle media in dict inputs: Media instances are now supported when providing the input for a run as a dictionary, instead of as a list of Messages.
 
Bug Fixes:
OllamaEmbeddernot respecting custom dimensions parameter: FixedOllamaEmbedderto properly pass thedimensionsparameter to the Ollama API during embedding generation.- Metrics calculation: Fix a problem when persisting metrics calculations when using a model with 
:in its name. - Agentic memory deletion: Fix a bug related to user memory deletion when using agentic memory management.
 
What's Changed
- Fix: OllamaEmbedder not respecting custom dimensions parameter by @ron-42 in #5222
 - fix: handle images in dict input by @manuhortet in #4963
 - [fix] Persist model clients and improve http_client type safety [SDK-60] by @harshsinha03 in #5168
 - Revert "fix: Persist model clients and improve http_client type safety [SDK-60]" by @manuhortet in #5235
 - feat: Num history messages by @dirkbrnd in #5120
 - [fix] : change file name from agent_os/mcp to agent_os/mcp_demo by @pritipsingh in #5238
 - fix: calculate_date_metrics model id and provider parse error by @sangxiaolong in #5084
 - fix: add id param to AsyncPostgresDb by @manuhortet in #5243
 - feat: enable memory deletion by default by @manuhortet in #5234
 - feat: support updating an OS instance in a FastAPI lifespan function by @manuhortet in #5237
 - chore: v2.2.4 by @manuhortet in #5245
 
New Contributors
- @sangxiaolong made their first contribution in #5084
 
Full Changelog: v2.2.3...v2.2.4