General Namespace Updates
This refactor includes comprehensive updates to namespaces to improve clarity and consistency. Pay close attention to the following changes:- All
phinamespaces are now replaced withagnoto reflect the updated structure. - Submodules and classes have been renamed to better represent their functionality and context.
Interface Changes
Module and Namespace Updates
- Models:
phi.model.x➔agno.models.x- All model classes now reside under the
agno.modelsnamespace, consolidating related functionality in a single location.
- All model classes now reside under the
- Knowledge Bases:
phi.knowledge_base.x➔agno.knowledge.x- Knowledge bases have been restructured for better organization under
agno.knowledge.
- Knowledge bases have been restructured for better organization under
- Document Readers:
phi.document.reader.xxx➔agno.document.reader.xxx_reader- Document readers now include a
_readersuffix for clarity and consistency.
- Document readers now include a
- Toolkits:
- All Agno toolkits now have a
Toolssuffix. For example,DuckDuckGo➔DuckDuckGoTools.- This change standardizes the naming of tools, making their purpose more explicit.
- All Agno toolkits now have a
Multi-Modal Interface Updates
The multi-modal interface now uses specific types for different media inputs and outputs:Inputs
-
Images:
- Images are now represented by a dedicated
Imageclass, providing additional metadata and control over image handling.
- Images are now represented by a dedicated
-
Audio:
- Audio files are handled through the
Audioclass, allowing specification of content and format.
- Audio files are handled through the
-
Video:
- Videos have their own
Videoclass, enabling better handling of video data.
- Videos have their own
Outputs
RunResponsenow includes updated artifact types:-
RunResponse.imagesis a list of typeImageArtifact: -
RunResponse.audiois a list of typeAudioArtifact: -
RunResponse.videosis a list of typeVideoArtifact: -
RunResponse.response_audiois of typeAudioOutput:- This response audio corresponds to the model’s response in audio format.
-
Model Name Changes
Hermes➔OllamaHermesAzureOpenAIChat➔AzureOpenAICohereChat➔CohereDeepSeekChat➔DeepSeekGeminiOpenAIChat➔GeminiOpenAIHuggingFaceChat➔HuggingFace
Storage Class Updates
- Agent Storage:
PgAgentStorage➔PostgresAgentStorageSqlAgentStorage➔SqliteAgentStorageMongoAgentStorage➔MongoDbAgentStorageS2AgentStorage➔SingleStoreAgentStorage
- Workflow Storage:
SqlWorkflowStorage➔SqliteWorkflowStoragePgWorkflowStorage➔PostgresWorkflowStorageMongoWorkflowStorage➔MongoDbWorkflowStorage
Knowledge Base Updates
phi.knowledge.pdf.PDFUrlKnowledgeBase➔agno.knowledge.pdf_url.PDFUrlKnowledgeBasephi.knowledge.csv.CSVUrlKnowledgeBase➔agno.knowledge.csv_url.CSVUrlKnowledgeBase
Embedders updates
Embedders now all take id instead of model as a parameter. For example:OllamaEmbedder(model="llama3.2")->OllamaEmbedder(id="llama3.2")
Reader Updates
phi.document.reader.arxiv➔agno.document.reader.arxiv_readerphi.document.reader.docx➔agno.document.reader.docx_readerphi.document.reader.json➔agno.document.reader.json_readerphi.document.reader.pdf➔agno.document.reader.pdf_readerphi.document.reader.s3.pdf➔agno.document.reader.s3.pdf_readerphi.document.reader.s3.text➔agno.document.reader.s3.text_readerphi.document.reader.text➔agno.document.reader.text_readerphi.document.reader.website➔agno.document.reader.website_reader
Agent Updates
guidelines,prevent_hallucinations,prevent_prompt_leakage,limit_tool_access, andtaskhave been removed from theAgentclass. They can be incorporated into theinstructionsparameter as you see fit.
CLI and Infrastructure Updates
Command Line Interface Changes
The Agno CLI has been refactored fromphi to ag. Here are the key changes:
The commands
ag ws up dev and ag ws up prod have to be used instead of ag ws up to start the workspace in development and production mode respectively.New Commands
ag ping-> Check if you are authenticated
Removed Commands
phi ws setup-> Replaced byag setup
Infrastructure Path Changes
The infrastructure-related code has been reorganized for better clarity:- Docker Infrastructure: This has been moved to a separate package in
/libs/infra/agno_dockerand has a separate PyPi packageagno-docker. - AWS Infrastructure: This has been moved to a separate package in
/libs/infra/agno_awsand has a separate PyPi packageagno-aws.
import phi.aws.resource.xxx➔import agno.aws.resource.xxximport phi.docker.xxx➔import agno.docker.xxx
Follow the steps above to ensure your codebase is compatible with the latest version of Agno AI. If you encounter any issues, don’t hesitate to contact us on Discourse or Discord.