Agno v2.1.0 adds JWT middleware, pre/post hooks, guardrails (PII/prompt-injection/OpenAI Moderation), and Requesty LLM gateway support.
$ git clone --branch v2.1.0 https://github.com/agno-agi/agno.git # already have the repo? check out this version: $ git checkout v2.1.0
- ›Adds built-in JWT Middleware to AgentOS for validating tokens and extracting claims into AgentOS endpoints.
- ›Adds support for any custom FastAPI-compatible middleware on the AgentOS.
- ›Adds
pre_hooksandpost_hooksconfiguration on agents and teams for input/output validation or transformation at the start or end of a run. - ›Adds built-in Guardrails as pre-hooks, including prompt injection checks, PII detection (SSN, credit cards, phone numbers, emails), OpenAI Moderation, and support for custom guardrails.
- ›Adds
base_appparameter to AgentOS for configuring a custom FastAPI app (replacing the now-deprecatedfastapi_app).
+8 moreshow less
- ›Adds
on_route_conflictparameter to AgentOS for controlling behavior when routes conflict onbase_app(replacing deprecatedreplace_routes). - ›Adds
enable_mcp_serverparameter to AgentOS for converting it into an MCP server (replacing deprecatedenable_mcp). - ›Adds
idparameter to AgentOS as the OS identifier (replacing deprecatedos_id). - ›Adds support for the Requesty LLM gateway provider for affordable LLM access with advanced governance.
- ›Adds batch embeddings support to speed up embedding generation and reduce API calls to embedding providers.
- ›Enables concurrent (parallel) execution of async generator tools during streaming.
- ›Enables concurrent member execution during async team streaming via Team.arun(..., stream=True); note that event order is no longer guaranteed.
- ›Uses the user's unique phone number as the default session ID for WhatsApp interface sessions, enabling conversation history.
- !Async team member events during Team.arun(..., stream=True) are now received concurrently — the order of member events is no longer guaranteed. Code depending on a specific event order from team members will behave differently.
- !The
use_batchparameter has been removed from thePGVectorDBclass.