> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-update-deprecated-models.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Agno v2.0 Changelog

<img height="200" src="https://mintcdn.com/agno-v2-update-deprecated-models/pmcAegusM2TuIVwq/images/changelogs/agent_os_stack.png?fit=max&auto=format&n=pmcAegusM2TuIVwq&q=85&s=ca619978b99023aebe58fe0995905d8c" data-path="images/changelogs/agent_os_stack.png" />

This is a major release that introduces a completely new approach to building multi-agent systems. It also introduces the AgentOS, a runtime for agents.

This is a major rewrite of the Agno library and introduces various new concepts and updates to the existing ones.

Some of the major changes are:

* Agents, Teams and Workflows are now fully stateless.
* Knowledge is now a single solution that supports many forms of content.
* Storage of sessions, memories, evals, etc. has been simplified

## General Changes

<Accordion title="Repo Updates">
  * `/libs/agno` has been restructured to fit the new concepts in Agno and for better organization.
  * All code related to managing workspaces and agent deployment in Agno has been moved to a new package called `agno-infra`. This is a combination of the previous `agno-aws` and `agno-docker` packages, as well as the CLI and other tools.
  * `agno-aws` and `agno-docker` packages have been deprecated and will no-longer be maintained.
  * All code related to the Agno CLI (`ag`) has been moved to this new `agno-infra` package.
  * Added `AgentOS` to `agno` as a comprehensive API solution for building multi-agent systems. This also replaces `Playground` and other Apps. See details below.
  * Cookbook has been completely restructured, with new and more valuable READMEs, better coverage of concepts, and more examples.
</Accordion>

<Accordion title="AgentOS">
  * Introducing `AgentOS`, a system for hosting agents, teams and workflows as a production-ready API. See full details in the [AgentOS](/agent-os/introduction) section.
  * This adds routes for session management, memory management, knowledge management, evals management, and metrics.
  * This enables you to host agents, teams and workflows, and use the [Agent OS UI](https://os.agno.com) to manage them.
</Accordion>

<Accordion title="Apps Deprecations">
  * Removed `Playground`. Its functionality has been replaced by `AgentOS`.
  * Removed `AGUIApp` and replace with `AGUI` interface on `AgentOS`.
  * Removed `SlackApi` and replace with `Slack` interface on `AgentOS`.
  * Removed `WhatsappApi` and replace with `Whatsapp` interface on `AgentOS`.
  * Removed `FastAPIApp`. Its functionality has been replaced by `AgentOS`.
  * `DiscordClient` has been moved to `/integrations/discord`.
</Accordion>

## Session & Run State

* We have made significant changes to the innerworkings of `Agent`, `Team` and `Workflow` to make them completely stateless.
* This means that `agent_session`, `session_metrics`, `session_state`, etc. should not be seen as stateful variables that would be updated during the course of a run, but rather as "defaults" for the agent if they can be set on initialisation.
* `CustomEvent` is now supported and you can inherit from it to create your own custom events that can be yielded from your own tools. See the [documentation](/agents/running-agents#custom-events) for more details.

<Accordion title="Updates to Run Objects">
  For agents:

  * `RunResponse` -> `RunOutput`
  * `RunResponseStartedEvent` -> `RunStartedEvent`
  * `RunResponseContentEvent` -> `RunContentEvent`
  * `RunResponseCompletedEvent` -> `RunCompletedEvent`
  * `IntermediateRunResponseContentEvent` -> `IntermediateRunContentEvent`
  * `RunResponseErrorEvent` -> `RunErrorEvent`
  * `RunResponseCancelledEvent` -> `RunCancelledEvent`

  For teams:

  * `TeamRunResponse` -> `TeamRunOutput`
  * `RunResponseStartedEvent` -> `RunStartedEvent`
  * `RunResponseContentEvent` -> `RunContentEvent`
  * `RunResponseCompletedEvent` -> `RunCompletedEvent`
  * `IntermediateRunResponseContentEvent` -> `IntermediateRunContentEvent`
  * `RunResponseErrorEvent` -> `RunErrorEvent`
  * `RunResponseCancelledEvent` -> `RunCancelledEvent`

  For workflows:

  * `WorkflowRunResponse` -> `WorkflowRunOutput`

  * `WorkflowRunResponseStartedEvent` -> `WorkflowRunStartedEvent`

  * `WorkflowRunResponseContentEvent` -> `WorkflowRunContentEvent`

  * `WorkflowRunResponseCompletedEvent` -> `WorkflowRunCompletedEvent`

  * `WorkflowRunResponseErrorEvent` -> `WorkflowRunErrorEvent`

  * `WorkflowRunResponseCancelledEvent` -> `WorkflowRunCancelledEvent`

  * The import location for `RunOutput` (and events) has been moved to `agno.run.agent`.

  * For `RunOutput`, `TeamRunOutput` and `WorkflowRunOutput` the `extra_data` attribute has been removed and the internal attributes are now top-level. This is `references`, `additional_input`, `reasoning_steps`, and `reasoning_messages`.

  * `metadata` added to `RunOutput`, `TeamRunOutput` and `WorkflowRunOutput`. This represents all the set metadata for the run.
</Accordion>

<Accordion title="Updates to Session Objects">
  * Session storage now stores `AgentSession`, `TeamSession` and `WorkflowSession` with new schemas. See full details in the [Session](/sessions/overview) section.
  * Session objects now have `runs` directly on it.
  * Session objects support new convenience methods:
    * `get_run` -> Get a specific run by ID.
    * `get_session_summary` -> Get the session summary.
    * `get_chat_history` -> Get an aggregated view of all messages for all runs in the session.
</Accordion>

<Accordion title="Updates to Metrics">
  * `SessionMetrics` and `MessageMetrics` have been unified as a single `Metrics` class.
  * `audio_tokens` has been renamed to `audio_total_tokens`.
  * `input_audio_tokens` has been renamed to `audio_input_tokens`.
  * `output_audio_tokens` has been renamed to `audio_output_tokens`.
  * `cached_tokens` has been renamed to `cache_read_tokens`.
  * `prompt_tokens` and `completion_tokens` have been removed (only `input_tokens` and `output_tokens` should be used)
  * `prompt_tokens_details` and `completion_tokens_details` have been removed. Instead `provider_metrics` captures any provider-specific metrics.
  * `time` has been renamed to `duration`.
</Accordion>

<Accordion title="Cancelling Runs">
  * You can now cancel a run by calling `cancel_run` on the `Agent`, `Team` or `Workflow`.
  * This will cancel the run and return a `RunCancelledEvent` during streaming, or set the `RunOutput.status` to `"cancelled"`.
</Accordion>

## Storage

* `Agent`, `Team`, `Workflow` and the various evals now all support a single `db` parameter. This is to enable storage for the instance of that class. This is required for persistence of sessions, memories, metrics, etc.
* `storage` and `memory` have been removed from `Agent`, `Team` and `Workflow`.

<Accordion title="Updates to Storage Classes">
  - This means all previous storage providers have been reworked. Also session storage, memory storage and eval storage are all a single solution now referred to as a "DB".
  - `PostgresStorage` -> `PostgresDb`
  - `SqliteStorage` -> `SqliteDb`
  - `MysqlStorage` -> `MysqlDb`
  - `RedisStorage` -> `RedisDb`
  - `MongoStorage` -> `MongoDb`
  - `DynamoDBStorage` -> `DynamoDb`
  - `SingleStoreStorage` -> `SingleStoreDb`
  - `InMemoryStorage` -> `InMemoryDb`
  - `JsonStorage` -> `JsonDb`
  - `GCSJsonStorage` -> `GCSJsonDb`
</Accordion>

## Memory

* With the above changes to storage, memory has been simplified.
* `memory` has been removed from `Agent` and `Team`. Instead memory is enabled with `enable_user_memories: bool` (like before) and persisted in the `db` instance.
* Changes to how memories are created can still be done by overriding the `MemoryManager` class on `Agent` or `Team`. E.g. `Agent(memory_manager=MyMemoryManager())`.
* `AgentMemory` and `TeamMemory` have been removed.

## Knowledge

* Knowledge has been completely reworked. See full details in the [Knowledge](/knowledge/overview) section.
* You now define a single `Knowledge` instance for all types of content. Files (PDF, CSV, etc.), URLs, and other.
* The agent can still use your knowledge base to search for information at runtime. All existing RAG implementations are still supported.
* Added **full `async` support** for embedding models and vector DBs. This has a significant impact on performance and is a major speed improvement when adding content to the knowledge base using `knowledge.ainsert(...)`.
* `AgentKnowledge` and all other knowledge base classes have been removed.
* Import locations for `embedder`, `document`, `chunking`, `reranker` and `reader` have been moved to `agno.knowledge`. See [examples](/knowledge/overview) for more details.

## Tools updates

* General:
  * Since Agents and Teams are now stateless, using attributes from the agent/team object inside a function will give you access to the attributes set on initialisation of that agent/team. E.g. `agent.session_state` should not be used, instead `session_state` can now be directly accessed and would have the "current" state of the session.
  * A new flow allows images, audio and video files generated during tool execution to be passed back in a `FunctionExecutionResult` object and this will ensure these artifacts are made available to the model and agent as needed.
* All tools that handle media (e.g. image generation tools) now correctly add this generated media to the `RunOutput`, but also make it available for subsequent model calls.
* The interface of almost all the toolkits have been updated for a more consistent experience around switching specific tools on and off. The list of changes is too long to list here. We suggest you take a look at the toolkits you use specifically and how they have been updated.
* `show_results` is now `True` by default for all tools. If you just set `stop_after_tool_call=True` then `show_results` will be automatically set to `True`.
* `images`, `videos`, `audio` and `files` are now available as parameters to tools. See the [documentation](/tools/overview) for more details.

## Media

#### Removals

* **Removed legacy artifact classes**: `ImageArtifact`, `VideoArtifact`, `AudioArtifact`, and `AudioResponse` classes have been completely removed in favor of unified media classes.

#### New Unified Media Architecture

* **Unified `Image` class**: Now serves all use cases (input, output, artifacts) with standardized `content: Optional[bytes]` field for raw image data
* **Unified `Audio` class**: Replaces both `AudioArtifact` and `AudioResponse` with consistent byte-based content storage and additional fields like `transcript`, `expires_at`, `sample_rate`, and `channels`
* **Unified `Video` class**: Updated to handle all video use cases with standardized content handling and metadata fields
* **Enhanced `File` class**: Updated to work seamlessly across agent, team, workflow, and toolkit contexts

#### New Methods and Features

* **`from_base64()` class method**: Added to `Image`, `Audio`, and `Video` classes for creating instances from base64-encoded content (automatically converts to raw bytes)
* **`get_content_bytes()` method**: Retrieves content as raw bytes, handling loading from URLs or file paths
* **`to_base64()` method**: Converts content to base64 string for transmission/storage
* **`to_dict()` method**: Enhanced serialization with optional base64 content inclusion

#### Content Standardization

* **Byte-based storage**: All media content is now stored as raw bytes (`Optional[bytes]`) instead of mixed string/bytes formats
* **Automatic validation**: Model validators ensure exactly one content source (`url`, `filepath`, or `content`) is provided
* **Auto-generated IDs**: Media objects automatically generate UUIDs when not provided

## Logging

* Added support for custom loggers. See the [documentation](/custom-logging) for more details.

## Agent updates

<Accordion title="Updates to Agent Class">
  * `agent_id` -> `id` -> If `id` is not set, it is autogenerated using the `name` of the agent, or a random UUID if the `name` is not set.
  * `search_previous_sessions_history` -> `search_session_history`
  * `context` -> `dependencies`
  * `add_context` -> `add_dependencies_to_context`
  * `add_history_to_messages` -> `add_history_to_context`
  * `add_name_to_instructions` -> `add_name_to_context`
  * `add_datetime_to_instructions` -> `add_datetime_to_context`
  * `add_location_to_instructions` -> `add_location_to_context`
  * `add_messages` -> `additional_input`
  * `extra_data` -> `metadata`
  * `create_default_system_message` -> `build_context`
  * `create_default_user_message` -> `build_user_context`
  * Added `send_media_to_model` -> `True` by default. Set to False if you don't want to send media (image, audio, video, files) to the model.  This is useful if you only want media for tools.
  * Added `store_media` -> `True` by default. Set to False if you don't want to store any media in the `RunOutput` that is persisted with sessions.
  * `num_history_responses` -> `num_history_runs`
  * Removed `success_criteria` and `goal`
  * Removed `team_session_id` and `workflow_session_id`.
  * Removed `introduction`
  * Removed `show_tool_calls` -> This is now just always enabled.
  * Removed `team` and `team_data`
  * Removed `respond_directly`, `add_transfer_instructions`, `team_response_separator` and `team_session_id` (since team has been removed from `Agent`)
  * Removed all `team` functionality from inside `Agent` (i.e. the deprecated teams implementation has been removed)
  * Removed all `monitoring` from `Agent`. With the new AgentOS platform, monitoring is done using your own data. Go to [os.agno.com](https://os.agno.com) to get started.
</Accordion>

<Accordion title="Updates to Input & Output">
  * `response_model` -> `output_schema`
  * Added `input_schema` (a pydantic model) to validate the input to the agent.
  * Changed `message` to `input` (which also replaces `messages`). `input` can be of type `str`, `list`, `dict`, `Message`, `BaseModel`, or `list[Message]`.
  * If a `dict` and `input_schema` is provided, the dict will be validated against the schema.
  * If a `BaseModel` and `input_schema` is provided, the model will be validated against the schema.
  * `arun` and `acontinue_run` with `stream=True` now return an async iterator of `RunOutputEvent` directly and is not a coroutine anymore.
  * `debug_mode: bool` added to `run`, `arun`, `print_response` and `aprint_response` to enable debug mode for a specific run.
  * `add_history_to_context` added to `run`, `arun`, `print_response` and `aprint_response` to add the chat history to the context for the current run.
  * `dependencies` added to `run`, `arun`, `print_response` and `aprint_response` to add dependencies to the context for the current run.
  * `metadata` added to `run`, `arun`, `print_response` and `aprint_response` to set the metadata for the current run. This is merged with the metadata set on the `Team` object.
  * Added `get_run_output` and `get_last_run_output` to `Agent` to retrieve a run output by ID.
</Accordion>

<Accordion title="Updates to Metrics">
  * Metrics have been simplified and cleaned up.
  * There are now 3 levels of metrics:
    * `Message.metrics` -> Metrics for each message (assistant, tool, etc.).
    * `RunOutput.metrics` -> Aggregated metrics for the whole run.
    * `AgentSession.metrics` -> Aggregated metrics for the whole session.
</Accordion>

<Accordion title="Updates to Knowledge">
  * `knowledge` is now an instance of `Knowledge` instead of `AgentKnowledge`.
  * `retriever` -> `knowledge_retriever` -> For a custom retriever.
  * `add_references` -> `add_knowledge_to_context` -> To enable traditional RAG.
</Accordion>

<Accordion title="Updates to Memory">
  * `add_memory_references` -> `add_memories_to_context`
  * You can set a custom `memory_manager` to use when creating memories.
  * Added `get_user_memories` to retrieve the user memories.
</Accordion>

<Accordion title="Updates to Sessions">
  * `add_session_summary_references` -> `add_session_summary_to_context`
  * You can set a custom `session_summary_manager` to use when creating session summaries.
  * Removed `session_name` and replace with functions `get_session_name` and `rename_session`.
  * Added `get_session` to retrieve a session by ID.
  * Added `get_chat_history` to retrieve the chat history from a session.
  * Added `get_session_metrics` to retrieve the metrics for a session.
  * Added `get_session_state` to retrieve the session state from a session.
  * Added `get_session_summary` to retrieve the session summary from a session.
  * Because `Agent` is now stateless, `agent_session`, `session_metrics`, `run_id`, `run_input`, `run_messages` and `run_response` as "sticky" agent attributes have been removed.
  * Because `Agent` is now stateless, `images`, `videos`, `audio` are no longer available as agent attributes. Instead these can be accessed on the `RunOutput` for a particular run.
  * Removed `team_session_state` and `workflow_session_state`. Only `session_state` is used.
  * Added `enable_agentic_state` to `Agent` and `Team` to allow the agent to update the session state with a tool call.
</Accordion>

## Team updates

<Accordion title="Updates to Team Class">
  * Removed `mode` from `Team`. Instead there are attributes that can be used to control the behavior of the team:
    * `respond_directly` -> If True, the team leader won't process responses from the members and instead will return them directly
    * `delegate_to_all_members` -> If True, the team leader will delegate tasks to all members simultaneously, instead of one by one. When running async (using `arun`) members will run concurrently.
    * `determine_input_for_members` -> `True` by default. Set to False if you want to send the run input directly to the member agents without the team leader synthesizing its own input.
  * `team_id` -> `id` -> If `id` is not set, it is autogenerated using the `name` of the team, or a random UUID if the `name` is not set.
  * `search_previous_sessions_history` -> `search_session_history`
  * `context` -> `dependencies`
  * `add_context` -> `add_dependencies_to_context`
  * `add_history_to_messages` -> `add_history_to_context`
  * `add_name_to_instructions` -> `add_name_to_context`
  * `add_datetime_to_instructions` -> `add_datetime_to_context`
  * `add_location_to_instructions` -> `add_location_to_context`
  * `add_member_tools_to_system_message` -> `add_member_tools_to_context`
  * `extra_data` -> `metadata`
  * Added `additional_input` (works the same as for `Agent`)
  * Added `store_member_responses: bool` to optionally store the member responses on the team run output object.
  * Added `acli_app` to `Team` to enable the CLI app for the team in async mode.
  * Added `send_media_to_model` -> `True` by default. Set to False if you don't want to send media (image, audio, video, files) to the model.  This is useful if you only want media for tools.
  * Added `store_media` -> `True` by default. Set to False if you don't want to store any media in the `RunOutput` that is persisted with sessions.
  * `num_history_responses` -> `num_history_runs`
  * Removed `success_criteria`
  * Removed `team_session_id` and `workflow_session_id`.
  * Removed `enable_team_history`
  * Removed `num_of_interactions_from_history`
  * Removed `show_tool_calls` -> This is now just always enabled.
  * Removed `enable_agentic_context`. `session_state` and `enable_agentic_state` should rather be used to manage state shared between the team and the members.
  * Removed all `monitoring` from `Team`. With the new AgentOS platform, monitoring is done using your own data. Go to [os.agno.com](https://os.agno.com) to get started.
</Accordion>

<Accordion title="Updates to Input & Output">
  * `response_model` -> `output_schema`
  * Added `input_schema` (a pydantic model) to validate the input to the agent.
  * Changed `message` to `input` (which also replaces `messages`). `input` can be of type `str`, `list`, `dict`, `Message`, `BaseModel`, or `list[Message]`.
  * If a `dict` and `input_schema` is provided, the dict will be validated against the schema.
  * If a `BaseModel` and `input_schema` is provided, the model will be validated against the schema.
  * `arun` with `stream=True` now return an async iterator of `TeamRunOutputEvent` directly and is not a coroutine anymore.
  * `debug_mode: bool` added to `run`, `arun`, `print_response` and `aprint_response` to enable debug mode for a specific run.
  * `add_history_to_context` added to `run`, `arun`, `print_response` and `aprint_response` to add the chat history to the context for the current run.
  * `dependencies` added to `run`, `arun`, `print_response` and `aprint_response` to add dependencies to the context for the current run.
  * `metadata` added to `run`, `arun`, `print_response` and `aprint_response` to set the metadata for the current run. This is merged with the metadata set on the `Team` object.
  * Added `get_run_output` and `get_last_run_output` to `Team` to retrieve a run output by ID.
</Accordion>

<Accordion title="Updates to Metrics">
  * Metrics have been simplified and cleaned up.
  * There are now 3 levels of metrics:
    * `Message.metrics` -> Metrics for each message (assistant, tool, etc.).
    * `RunOutput.metrics` -> Aggregated metrics for the whole run.
    * `TeamSession.metrics` -> Aggregated metrics for the whole session.
</Accordion>

<Accordion title="Updates to Knowledge">
  * `knowledge` is now an instance of `Knowledge` instead of `AgentKnowledge`.
  * `retriever` -> `knowledge_retriever` -> For a custom retriever.
  * `add_references` -> `add_knowledge_to_context` -> To enable traditional RAG.
  * Added `update_knowledge` tool to update the knowledge base. Works the same as for `Agent`.
</Accordion>

<Accordion title="Updates to Memory">
  * `add_memory_references` -> `add_memories_to_context`
  * You can set a custom `memory_manager` to use when creating memories.
  * Added `get_user_memories` to retrieve the user memories.
</Accordion>

<Accordion title="Updates to Sessions">
  * `add_session_summary_references` -> `add_session_summary_to_context`
  * You can set a custom `session_summary_manager` to use when creating session summaries.
  * Removed `session_name` and replace with functions `get_session_name` and `rename_session`.
  * Added `get_session` to retrieve a session by ID.
  * Added `get_chat_history` to retrieve the chat history from a session.
  * Added `get_session_metrics` to retrieve the metrics for a session.
  * Added `get_session_state` to retrieve the session state from a session.
  * Added `get_session_summary` to retrieve the session summary from a session.
  * Because `Team` is now stateless, `team_session`, `session_metrics`, `run_id`, `run_input`, `run_messages` and `run_response` as "sticky" team attributes have been removed.
  * Because `Team` is now stateless, `images`, `videos`, `audio` are no longer available as team attributes. Instead these can be accessed on the `TeamRunOutput` for a particular run.
  * Removed `team_session_state` and `workflow_session_state`. Only `session_state` is used.
  * Added `enable_agentic_state` to `Team` to allow the agent to update the session state with a tool call.
</Accordion>

## Workflow updates

<Accordion title="Updates to Workflow Class">
  * `workflow_id` -> `id` -> If `id` is not set, it is autogenerated using the `name` of the workflow, or a random UUID if the `name` is not set.
  * Workflows "v1" has been completely removed and replaced with `Workflows v2`. See full details in the [Workflows](/workflows) section.
  * This means the import locations for "Workflows v2" is now `agno.workflows`.
  * `extra_data` -> `metadata`
  * Added `store_events` to `Workflow` to optionally store the events on the workflow run output object. Also added `events_to_skip` to skip certain events from being stored. This works the same as for `Agent` and `Team`.
  * Added `store_executor_outputs` to `Workflow` to optionally store the agent/team responses on the workflow run output object.
  * Added `input_schema` to `Workflow` to validate the input to the workflow.
  * Added support for WebSocket streaming of the workflow. This is appropriate for long-running workflows that need to be streamed to a client. This is only available for `arun`.
  * Removed all `monitoring` from `Workflow`. With the new AgentOS platform, monitoring is done using your own data. Go to [os.agno.com](https://os.agno.com) to get started.
</Accordion>

<Accordion title="Updates to Input & Output">
  * Changed `message` to `input` (which also replaces `messages`). `input` can be of type `str`, `list`, `dict`, or `BaseModel`.
  * If a `dict` and `input_schema` is provided, the dict will be validated against the schema.
  * If a `BaseModel` and `input_schema` is provided, the model will be validated against the schema.
  * `arun` with `stream=True` now return an async iterator of `WorkflowRunOutputEvent` directly and is not a coroutine anymore.
  * `debug_mode: bool` added to `run`, `arun`, `print_response` and `aprint_response` to enable debug mode for a specific run.
  * Added `get_run_output` and `get_last_run_output` to `Workflow` to retrieve a run output by ID.
</Accordion>

<Accordion title="Updates to Sessions">
  * Removed `session_name` and replace with functions `get_session_name` and `rename_session`.
  * Because `Workflow` is now stateless, `workflow_session`, `session_metrics`, `run_id`, `run_input`, `run_messages` and `run_response` as "sticky" workflow attributes have been removed.
  * Because `Workflow` is now stateless, `images`, `videos`, `audio` are no longer available as workflow attributes. Instead these can be accessed on the `WorkflowRunOutput` for a particular run.
  * Added `get_session` to retrieve a session by ID.
  * Added `get_session_metrics` to retrieve the metrics for a session.
  * Added `get_session_state` to retrieve the session state from a session.
  * Added `get_session_summary` to retrieve the session summary from a session.
</Accordion>
