github agno-agi/agno v2.1.0

20 hours ago

Changelog

New Features:

  • AgentOS Custom Middleware: Allow setting of any custom FastAPI-compatible middleware on the AgentOS. See the docs.
  • AgentOS JWT Middleware: We have a built-in JWT Middleware that can validate tokens, extract claims to pass into AgentOS endpoints, and more. See the docs.
  • Pre/Post Hooks: Configure a custom hook that runs at the start or end of an agent/team run. This is useful for input/output validation, or transforming the input/output of the agent. See the docs.
  • Guardrails: Guardrails are specific built-in pre-hooks that you can configure. See the docs. We have added support for:
    • Prompt Injection checks (docs)
    • PII detections (SSN, credit cards, phone numbers, emails) (docs)
    • OpenAI Moderation (docs)
    • You can create your own custom guardrails (docs)
  • Requesty LLM Gateway: Added support for Requesty, an affordable LLM gateway with advanced governance.

Improvements:

  • AgentOS Updates for Clarity:
    • None of the below deprecated parameters have been removed, only new attributes added. It will likely be removed in v2.3.0 and after.
    • Deprecated fastapi_app and added base_app → For configuring a custom FastAPI app for the AgentOS.
    • Deprecated replace_routes and added on_route_conflict → For how to handle conflicting routes when you set base_app.
    • Deprecated enable_mcp and added enable_mcp_server → For converting the AgentOS into an MCP server.
    • Deprecated os_id and added id → The ID of the OS.
  • Async Tool Execution In Streaming: For tools that are AsyncGenerators (i.e. they are async and yield content or events), they are now executed in parallel.
  • Team Async Member Execution: Because of the above update, member execution during async team execution with streaming (i.e. Team.arun(..., stream=True)) is now also concurrent.
    • Note: This means member events are received concurrently and the order is not guaranteed. If you previously depended on the order of events of team members, take note of this.
  • Whatsapp Interface Sessions: The user’s unique phone number is now used as the session ID by default. This would enable session history for Whatsapp conversations.
  • Update Workflows to not swallow exceptions: workflows now raise exceptions where necessary so that they can be correctly caught in the front end.
  • Batch Embeddings: Support for batch embeddings to speed up embedding process and reduce API calls to embeddings providers. See the docs.
    • Removed unused use_batch parameter from PGVectorDB class

Bug Fixes:

  • Team History in Context: Fixed issues where team history was not correctly added to team context.
  • Gemini Metrics Calculation Fix For Gemini 2.5 Models: Fixed a bug where thought tokens count were added later to output tokens before total token calculation
  • Fix for workflow async pipeline to correctly accept file input: Updated the Workflow class to include a parameter files in the async pipeline input creation, enhancing the flexibility of input handling.
  • InMemoryDb mutable references: Fixes a bug where some DB methods unexpectedly returned shared object references.
  • Fix tool_choice bug on Gemini: Agno now convert tool_choice values for none and auto correctly to what Gemini expects.
  • Fix for a bug on Agent OS when output schema includes a non serializable type:

What's Changed

New Contributors

Full Changelog: v2.0.11...v2.1.0

Don't miss a new agno release

NewReleases is sending notifications on new releases.