v2.4.0

agno-agi/agnov2.4.0Jan 19, 2026by kausmeows

AI Summary

A major update introducing the Knowledge Protocol, AgentOS database persistence for components, and new events for Model, Compression, and Memory, alongside various bug fixes.

Key Highlights

  • Introduced KnowledgeProtocol interface
  • Agent Builder now supports persistent database management
  • Added new ModelRequestStarted/Completed, CompressionStarted/Completed, and MemoryUpdateCompleted events
  • Added direct GCS and external URL support for Gemini file inputs

Breaking Changes

  • Removed deprecated fields (session_state, dependencies, user_id) replaced by RunContext
  • Renamed stream_intermediate_steps to stream_events
  • Renamed yield_run_response to yield_run_output
  • Removed delegate_task_to_all_members from Team class
  • Replaced DDG websearch tool with Generic WebSearchTools
  • Renamed Knowledge add_content() to insert()
  • Deprecated tracing_db in favor of db parameter on AgentOS

New Features

  • Knowledge Protocol
  • Agent Builder (Persistence)
  • New Events (Model, Compression, Memory)
  • Gemini File Inputs
  • TavilyTools api_base_url parameter

Full Release Notes

# Changelog

## New Features:

- **Knowledge Protocol:** Introduced `KnowledgeProtocol` The main Knowledge implementation now satisfies this interface. Any other implementation may be used with Agent/Team. Note - Only the main Agno Knowledge implementation of this protocol currently supports AgentOS Knowledge management.
- **Agent Builder:** Users can now persist and manage Agent, Team, and Workflow configurations directly in the database. New AgentOS endpoints enable programmatic creation, retrieval, and updates of component definitions.
- **New Events:** Added new events for Model, compression and memory.
    - `ModelRequestStarted` and `ModelRequestCompleted`
    - `CompressionStarted` and `CompressionCompleted`
    - Update `MemoryUpdateCompleted` to contain the memory content.
- **Gemini file inputs:** Add direct GCS and external URL support for Gemini file inputs
- **TavilyTools:** Add `api_base_url` parameter support to TavilyTools for custom hosted usecases.

## Improvements:

- **Default DB on `AgentOS`:** Add `db` to the `AgentOS` class. If populated, it propagates to all
agents, teams and workflows without db. It is also used as tracing db.
- Deprecated `enable_user_memories` : Introduced `update_memory_on_run` for the same behavior.
- **Knowledge config endpoint**: Improved checking for available readers without needing instantiation of the reader classes. Reduced unnecessary warnings and improved response times.
- **Unify dates format on OS API layer:** Unify the format of all dates we send via the OS API. Everything is now a UTC datetime
- **AgentOS Trailing Slash Handling:** Add a  `TrailingSlashMiddleware` that strips trailing slashes from request paths, all endpoints returns identical responses without 307 redirects.
- **Pass instructions as is without XML tags:**
    - **Agent & Team**: Instructions are now added directly to the system message without `<instructions>` tags by default
    - Added `add_instruction_tags=True` option to restore the previous behavior for users who prefer structured prompts

## Bug Fixes:

- **LanceDB:** Fixed a bug for duplicate embeddings during async insert and upsert operations.
- **Qdrant Async Search:** Fixed async search methods which were preventing event loop blocking during concurrent async operations.
- **CSV Reader:** CSVReader and FieldLabeledCSVReader ignored `encoding` parameter for BytesIO inputs - always used hardcoded `"utf-8"` instead of `self.encoding or "utf-8"`.
- **PDF Reader:** Fixed bug where empty string passwords (`""`) were incorrectly treated as `None` due to Python's falsy evaluation
- **Openrouter with Gemini:** Adds support for preserving Gemini's `reasoning_details` field when using OpenRouter, fixing multi-turn conversation issues.
- **MongoDB Async Search:** Fixed `async_search()` to use `async_get_embedding()` instead of blocking `get_embedding()` calls, preventing event loop blocking during concurrent async operations.
- **Gemini vertex ai file upload:** Fixed a bug where on trying to upload files to Gemini via Vertex AI, the API returned a 400 error.
- **Skills System Prompt:** Fixed an issue where agents attempted to call skill names directly as functions, resulting in "Function not found" errors.

## Breaking changes:

- **Remove all deprecated fields:**
    - `session_state, dependencies, user_id` etc in tool functions and hooks where `RunContext` has replaced it
    - `stream_intermediate_steps` → `stream_events`
    - `yield_run_response` → `yield_run_output`
    - `delegate_task_to_all_members` removed from Team class
- **Add WebSearchTools:** Replacing DDG websearch tool with a Generic web search tool which will be the default on for any websearch related cookbooks & docs.
- **Knowledge add_content() renamed to insert():** The `add_content()` method and its variants have been renamed to `insert()` `insert_many` Old method names are still supported, but all examples and docs will soon only reference the new methods.
- AgentOS `tracing_db` : `tracing_db`  has been deprecated in favor of `db` parameter on the AgentOS.

## What's Changed
* fix: gemini vertex ai file upload error by @Mustafa-Esoofally in https://github.com/agno-agi/agno/pull/5857
* chore: Demo script for windows by @VirusDumb in https://github.com/agno-agi/agno/pull/5965
* [fix] Add missing attributes to RemoteAgent for Team compatibility by @AhmedA-afk in https://github.com/agno-agi/agno/pull/5987
* fix: use async embedder in async search methods for qdrant by @uzaxirr in https://github.com/agno-agi/agno/pull/6002
* fix: use async embedder in MongoDB async_search to prevent event loop blocking by @uzaxirr in https://github.com/agno-agi/agno/pull/6003
* fix: prevent duplicate embedding in LanceDB insert() by @pengzy-cosmo in https://github.com/agno-agi/agno/pull/5919
* feat: Add direct GCS and external URL support for Gemini file inputs by @Mustafa-Esoofally in https://github.com/agno-agi/agno/pull/5997
* [feat] Add api_base_url parameter support to TavilyTools by @ormeilu in https://github.com/agno-agi/agno/pull/5962
* feat(cookbook): Revamp 01_demo with new impressive agents by @ashpreetbedi in https://github.com/agno-agi/agno/pull/6010
* fix: add TrailingSlashMiddleware to normalize URL paths by @uzaxirr in https://github.com/agno-agi/agno/pull/5985
* fix: Allow empty string passwords for PDF decryption by @Mustafa-Esoofally in https://github.com/agno-agi/agno/pull/6053
* fix: clarify that skill names are not callable functions by @ysolanky in https://github.com/agno-agi/agno/pull/6062
* feat: v2.4.0 by @kausmeows in https://github.com/agno-agi/agno/pull/5818
* fix: Update failing integration test prompt by @willemcdejongh in https://github.com/agno-agi/agno/pull/6074
* feat: merge v2.4.0 with cookbook refactoring by @ashpreetbedi in https://github.com/agno-agi/agno/pull/6042
* fix: preserve Router client across copies for background tasks by @ysolanky in https://github.com/agno-agi/agno/pull/6064
* fix: correct `openai-agents` install instruction by @harshsinha03 in https://github.com/agno-agi/agno/pull/6076
* chore: Release 2.4.0 by @kausmeows in https://github.com/agno-agi/agno/pull/6066

## New Contributors
* @AhmedA-afk made their first contribution in https://github.com/agno-agi/agno/pull/5987
* @pengzy-cosmo made their first contribution in https://github.com/agno-agi/agno/pull/5919
* @ormeilu made their first contribution in https://github.com/agno-agi/agno/pull/5962

**Full Changelog**: https://github.com/agno-agi/agno/compare/v2.3.26...v2.4.0