19.2K星超级Agent震撼登场,性能超越LangGraph 5000倍!

图片

  • Agno 是一个轻量级的多模态智能体(multi-modal Agent)

  • 支持多种数据模态(如文本、图像、音频和视频),并且可以快速创建智能体。

  • 提供了内存管理和知识库支持,能够将用户会话和智能体状态存储在数据库中,基于向量数据库实现动态少样本学习。

  • 支持多智能体协作,帮助用户实时跟踪智能体会话和性能。

  • 纯 Python 实现,开发者可以轻松上手并快速构建高效的智能体应用。


Agno的特点

图片

  • 急速:创建智能体的速度比传统框架(如 LangGraph)快 5000 倍。

  • 支持多种模态:支持文本、图像、音频和视频等多种数据模态。

  • 多智能体协作:支持将任务分配给多个专业化的智能体,实现高效的分工和协作。

  • 支持知识库:基于向量数据库实现检索增强生成(RAG)或动态少样本学习,提升智能体的知识检索能力。

  • 结构化输出:支持结构化数据格式响应,方便与其他系统集成。


Agno的用法

1、 创建一个基本的智能体

from agno.agent import Agent
from agno.models.openai import OpenAIChat

agent = Agent(
    name="new reporter",
    model=OpenAIChat(id="gpt-4o"),
    description="You are an enthusiastic news reporter with a flair for storytelling!"
    markdown=True
)
agent.print_response("Tell me about a breaking news story from New York.", stream=True)

直接运行python agent_1.py即可

2、在此基础上,可以给agent添加工具tool

from agno.tools.duckduckgo import DuckDuckGoTools

agent = Agent(
    name="new reporter",
    model=OpenAIChat(id="gpt-4o"),
    description="You are an enthusiastic news reporter with a flair for storytelling!"
    tools=[DuckDuckGoTools()], 
    show_tool_calls=True,
    markdown=True
)
agent.print_response("Tell me about a breaking news story from New York.", stream=True)

3、再给agent绑定到知识库上

from agno.embedder.openai import OpenAIEmbedder
from agno.sources.pdf import PdfSource
from agno.vectorstores.lancedb import LanceDb, SearchType

vector_store = LanceDb(
    uri="tmp/lancedb",
    table_name="recipes",
    search_type=SearchType.hybrid
    embedder=OpenAIEmbedder(id="text-embedding-3-samll")
)
vector_store.ingest(PdfSource("example.pdf"))

agent = Agent(
    name="new reporter",
    model=OpenAIChat(id="gpt-4o"),
    description="You are a Thai cuisine expert!", 
    instructions=[
        "Search your knowledge base for Thai recipes.", 
        "If the question is better suited for the web, 
        search the web to fill in gaps.", 
        "Prefer the information in your knowledge base over the web results. 
        ],    
    tools=[DuckDuckGoTools()], 
    show_tool_calls=True,
    markdown=True
    vector_store=vector_store
)

4、 多智能体协作

from agno.tools.duckduckgo import DuckDuckGoTools 
from agno.tools.yfinance import YFinanceTools 

web_agent = Agent(
    name="Web Agent", 
    role="Search the web for information", 
    model=OpenAIChat(id="gpt-4o"), 
    tools=[DuckDuckGoTools()], 
    instructions="Always include sources", 
    show_tool_calls=True, 
    markdown=True, 
    ) 

finance_agent = Agent(
    name="Finance Agent", 
    role="Get financial data", 
    model=OpenAIChat(id="gpt-4o"), 
    tools=[
        YFinanceTools(stock_price=True, analyst_recommendations=True, company_info=True)
    ], 
    instructions="Use tables to display data", show_tool_calls=True, markdown=True, ) 
    
agent_team = Agent(
    team=[web_agent, finance_agent], 
    model=OpenAIChat(id="gpt-4o"), 
    instructions=[
        "Always include sources", 
        "Use tables to display data"
        ], 
    show_tool_calls=True, 
    markdown=True, 
    ) 

agent_team.print_response("What's the market outlook and financial performance of AI semiconductor companies?", stream=True)

 

 

 如何学习AI大模型?

我在一线互联网企业工作十余年里,指导过不少同行后辈。帮助很多人得到了学习和成长。

我意识到有很多经验和知识值得分享给大家,也可以通过我们的能力和经验解答大家在人工智能学习中的很多困惑,所以在工作繁忙的情况下还是坚持各种整理和分享。但苦于知识传播途径有限,很多互联网行业朋友无法获得正确的资料得到学习提升,故此将并将重要的AI大模型资料包括AI大模型入门学习思维导图、精品AI大模型学习书籍手册、视频教程、实战学习等录播视频免费分享出来。

第一阶段: 从大模型系统设计入手,讲解大模型的主要方法;

第二阶段: 在通过大模型提示词工程从Prompts角度入手更好发挥模型的作用;

第三阶段: 大模型平台应用开发借助阿里云PAI平台构建电商领域虚拟试衣系统;

第四阶段: 大模型知识库应用开发以LangChain框架为例,构建物流行业咨询智能问答系统;

第五阶段: 大模型微调开发借助以大健康、新零售、新媒体领域构建适合当前领域大模型;

第六阶段: 以SD多模态大模型为主,搭建了文生图小程序案例;

第七阶段: 以大模型平台应用与开发为主,通过星火大模型,文心大模型等成熟大模型构建大模型行业应用。


👉学会后的收获:👈
• 基于大模型全栈工程实现(前端、后端、产品经理、设计、数据分析等),通过这门课可获得不同能力;

• 能够利用大模型解决相关实际项目需求: 大数据时代,越来越多的企业和机构需要处理海量数据,利用大模型技术可以更好地处理这些数据,提高数据分析和决策的准确性。因此,掌握大模型应用开发技能,可以让程序员更好地应对实际项目需求;

• 基于大模型和企业数据AI应用开发,实现大模型理论、掌握GPU算力、硬件、LangChain开发框架和项目实战技能, 学会Fine-tuning垂直训练大模型(数据准备、数据蒸馏、大模型部署)一站式掌握;

• 能够完成时下热门大模型垂直领域模型训练能力,提高程序员的编码能力: 大模型应用开发需要掌握机器学习算法、深度学习框架等技术,这些技术的掌握可以提高程序员的编码能力和分析能力,让程序员更加熟练地编写高质量的代码。


1.AI大模型学习路线图
2.100套AI大模型商业化落地方案
3.100集大模型视频教程
4.200本大模型PDF书籍
5.LLM面试题合集
6.AI产品经理资源合集

👉获取方式:
😝有需要的小伙伴,可以保存图片到wx扫描二v码免费领取【保证100%免费】🆓

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

程序员辣条

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值