惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - ExplorerMan

大模型sft微调参数优化2 大模型RAG实战,从被骂不靠谱到成为部门MVP,这是我的踩坑全记录【转】 推荐 Prompt 模板(大幅提升 JSON 质量) 渐进式SFT内化 [推荐]双塔模型(介绍) Open WebUI:打造友好且强大的自托管 AI 平台 【gradio】使用Gradio快速开发前端界面:基础知识 文本切割方案进化概览:从“机械切割”到“智能解构” 大模型RAG的上下文压缩与过滤 SemanticChunker 语义相似拆分 基于LangChain 实现 Advanced RAG-后检索优化(上)-Reranker 基于LangChain 实现 Advanced RAG-后检索优化(下)-上下文压缩与过滤 多Agent协作入门:基于A2A协议的Agent通信(中) ollama部署与open-webui 0基础也能看懂!从0到1手把手教你本地部署大模型Ollama 什么是 AutoModel 大模型基础应用框架(ReACT\SFT\RAG)技术创新及零售业务落地应用 - ExplorerMan - 博客园 多模态Embedding模型:从文本到多模态的全面选型指南! rag 查询检索轮换
Agno - 轻量级Python多智能体系统框架
ExplorerMan · 2025-10-11 · via 博客园 - ExplorerMan

项目概述

Agno是一个轻量级Python框架,专为构建多智能体系统(MAS)而设计。它支持开发具有不同能力级别的智能体:

  • 基础工具代理
  • 知识增强代理
  • 记忆与推理代理
  • 团队协作代理
  • 确定性工作流代理

框架提供完整的开发生态,包括知识管理、工具集成、向量数据库支持和可视化Playground。

核心特性

  • 多级智能体架构:支持从简单工具调用到复杂团队协作的5个开发级别
  • 知识管理:内置20+知识源连接器(网页/PDF/CSV/YouTube等)
  • 混合搜索:结合向量相似性和关键词搜索的混合检索
  • 多模态支持:处理文本、图像、音频等多种数据类型
  • 推理引擎:实验性分步推理和验证机制
  • 向量数据库集成:支持PgVector、LanceDB、Qdrant等主流向量库
  • 工具生态:预置DuckDuckGo搜索、YFinance等常用工具
  • 开发工具:内置Playground和CLI测试环境

安装指南

基础安装

# 创建虚拟环境
python3 -m venv .venv
source .venv/bin/activate

# 安装核心依赖
pip install agno openai duckduckgo-search

可选组件

# 向量数据库支持
pip install pgvector lancedb qdrant-client

# 多模态扩展
pip install elevenlabs opencv-python

开发环境配置

# 安装开发依赖
pip install -U agno[dev]

# 运行Playground
python playground.py

使用示例

基础代理

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

agent = Agent(
    model=OpenAIChat(id="gpt-4"),
    instructions="你是一个热情的新闻记者"
)
agent.print_response("分享一则纽约新闻")

知识增强代理

from agno.agent import Agent
from agno.knowledge.pdf import PDFKnowledgeBase

knowledge = PDFKnowledgeBase(path="data/docs")
agent = Agent(knowledge=knowledge)
agent.print_response("文档中提到哪些关键技术?")

工具集成代理

from agno.agent import Agent
from agno.tools.yfinance import YFinanceTools

agent = Agent(tools=[YFinanceTools()])
agent.print_response("苹果公司当前股价是多少?")

核心架构

智能体初始化

class Agent:
    def __init__(
        self,
        model: BaseModel,          

知识检索流程

def search_knowledge(query):
    # 混合检索流程
    vector_results = vector_db.semantic_search(query)
    keyword_results = fulltext_search(query)
    
    

工具调用机制

async def execute_tool(tool_name, args):
    tool = self.tools.get(tool_name)
    
    

PYTHON 复制 全屏

应用场景

  • 智能问答系统:基于文档的知识代理
  • 数据分析助手:集成数据库和可视化工具
  • 自动化工作流:多代理协作完成任务
  • 实时信息代理:结合网络搜索和API工具
  • 个性化推荐:利用记忆和用户画像