VoltAgent 是一个开源 TypeScript 框架,用于构建和编排 AI 代理

​一、软件介绍

文末提供程序和源码下载

      VoltAgent 是一个开源 TypeScript 框架,用于构建和编排 AI 代理

二、什么是 VoltAgent?

AI 代理框架提供了构建由自主代理提供支持的应用程序所需的基础结构和工具。这些代理通常由大型语言模型 ()LLMs 驱动,可以感知其环境、做出决策并采取行动来实现特定目标。从头开始构建此类代理涉及管理复杂的交互LLMs、处理状态、连接到外部工具和数据以及编排工作流程。

VoltAgent 是一个开源的 TypeScript 框架,充当这个必不可少的工具包。它通过提供模块化构建块、标准化模式和抽象来简化 AI 代理应用程序的开发。无论您是创建聊天机器人、虚拟助手、自动化工作流程还是复杂的多代理系统,VoltAgent 都能处理底层的复杂性,让您专注于定义代理的功能和逻辑。

VoltAgent 不是从头开始构建所有内容,而是提供现成的模块化构建块:

  • Core Engine (@voltagent/core): The heart of VoltAgent, providing fundamental capabilities for your AI agents Define individual agents with specific roles, tools, and memory.
    核心引擎 ( @voltagent/core ):VoltAgent 的核心,为您的 AI 代理提供基本功能定义具有特定角色、工具和内存的单个代理。
  • Multi-Agent Systems: Architect complex applications by coordinating multiple specialized agents using Supervisors.
    多代理系统:通过使用 Supervisor 协调多个专用代理来构建复杂的应用程序。
  • Extensible Packages: Enhance functionality with packages like @voltagent/voice for voice interactions.
    可扩展包:使用包增强功能,例如 @voltagent/voice 用于语音交互。
  • Tooling & Integrations: Equip agents with tools to connect to external APIs, databases, and services, enabling them to perform real-world tasks. Supports the Model Context Protocol (MCP) for standardized tool interactions.
    工具和集成:为代理配备工具以连接到外部API、数据库和服务,使他们能够执行实际任务。支持用于标准化工具交互的模型上下文协议 (MCP)。
  • Data Retrieval & RAG: Implement specialized retriever agents for efficient information fetching and Retrieval-Augmented Generation (RAG).
    数据检索和RAG:实施专门的检索代理,以实现高效的信息获取和检索增强生成(RAG)。
  • Memory: Enable agents to remember past interactions for more natural and context-aware conversations.
    内存:使座席能够记住过去的交互,以实现更自然和上下文感知的对话。
  • LLM Compatibility: Works with popular AI models from OpenAI, Google, Anthropic, and more, allowing easy switching.
    LLM兼容性: 可与 OpenAI、Google、Thropic 等流行的 AI 模型配合使用,轻松切换。
  • Developer Ecosystem: Includes helpers like create-voltagent-app@voltagent/cli, and the visual VoltAgent Console for quick setup, monitoring, and debugging.
    开发人员生态系统:包括 、 @voltagent/cli 等 create-voltagent-app 帮助程序,以及用于快速设置、监控和调试的可视化 VoltAgent 控制台。

In essence, VoltAgent helps developers build sophisticated AI applications faster and more reliably, avoiding repetitive setup and the limitations of simpler tools.
从本质上讲,VoltAgent 可帮助开发人员更快、更可靠地构建复杂的 AI 应用程序,避免重复设置和更简单工具的限制。

三、为什么选择 VoltAgent?

构建 AI 应用程序通常涉及权衡:

  1. DIY Approach: Using basic AI provider tools offers control but leads to complex, hard-to-manage code and repeated effort.
    DIY 方法:使用基本的 AI 提供商工具可以提供控制权,但会导致复杂、难以管理的代码和重复的工作。
  2. No-Code Builders: Simpler initially but often restrictive, limiting customization, provider choice, and complexity.
    无代码构建器:最初更简单,但通常具有限制性,限制了定制、提供商选择和复杂性。

VoltAgent provides a middle ground, offering structure and components without sacrificing flexibility:
VoltAgent 提供了一个中间地带,在不牺牲灵活性的情况下提供结构和组件:

  • Build Faster: Accelerate development with pre-built components compared to starting from scratch.
    更快地构建:与从头开始相比,使用预构建的组件加速开发。
  • Maintainable Code: Encourages organization for easier updates and debugging.
    可维护代码:鼓励组织更轻松地进行更新和调试。
  • Scalability: Start simple and easily scale to complex, multi-agent systems handling intricate workflows.
    可扩展性:从简单开始,然后轻松扩展到处理复杂工作流程的复杂多代理系统。
  • Flexibility: Full control over agent behavior, LLM choice, tool integrations, and UI connections.
    灵活性:完全控制代理行为、LLM选择、工具集成和 UI 连接。
  • Avoid Lock-in: Freedom to switch AI providers and models as needed.
    避免锁定:根据需要自由切换 AI 提供商和模型。
  • Cost Efficiency: Features designed to optimize AI service usage and reduce redundant calls.
    成本效益:旨在优化 AI 服务使用和减少冗余调用的功能。
  • Visual Monitoring: Use the VoltAgent Console to track agent performance, inspect state, and debug visually.
    可视化监控:使用 VoltAgent 控制台跟踪代理性能、检查状态并直观地进行调试。

VoltAgent empowers developers to build their envisioned AI applications efficiently, from simple helpers to complex systems.
VoltAgent 使开发人员能够高效地构建他们设想的 AI 应用程序,从简单的帮助程序到复杂的系统。

四、Quick Start ⚡ 快速开始

使用 CLI 工具在几秒钟内创建一个新的 create-voltagent-app VoltAgent 项目:

npm create voltagent-app@latest

This command guides you through setup.
此命令将指导您完成设置。

You'll see the starter code in src/index.ts to get you started with the VoltAgent framework.
您将在 中看到 src/index.ts 起始代码,以帮助您开始使用 VoltAgent 框架。

import { VoltAgent, Agent } from "@voltagent/core";
import { VercelAIProvider } from "@voltagent/vercel-ai"; // Example provider
import { openai } from "@ai-sdk/openai"; // Example model// Define a simple agent
const agent = new Agent({name: "my-agent",instructions: "A helpful assistant that answers questions without using tools",// Note: You can swap VercelAIProvider and openai with other supported providers/modelsllm: new VercelAIProvider(),model: openai("gpt-4o-mini"),
});// Initialize VoltAgent with your agent(s)
new VoltAgent({agents: {agent,},
});

Afterwards, navigate to your project and run:
然后,导航到您的项目并运行:

npm run dev

When you run the dev command, tsx will compile and run your code. You should see the VoltAgent server startup message in your terminal:
当您运行 dev 命令时,tsx 将编译并运行您的代码。您应该会在终端中看到 VoltAgent 服务器启动消息:

<span style="background-color:var(--bgColor-muted, var(--color-canvas-subtle))"><span style="color:#1f2328"><span style="color:var(--fgColor-default, var(--color-fg-default))"><span style="background-color:var(--bgColor-muted, var(--color-canvas-subtle))"><code>══════════════════════════════════════════════════
VOLTAGENT SERVER STARTED SUCCESSFULLY
══════════════════════════════════════════════════
✓ HTTP Server: http://localhost:3141Developer Console: https://console.voltagent.dev
══════════════════════════════════════════════════
</code></span></span></span></span>

Your agent is now running! To interact with it:
您的代理现在正在运行!要与之交互,请执行以下作:

  1. Open the Console: Click the VoltAgent Console link in your terminal output (or copy-paste it into your browser).
    打开控制台:单击终端输出中的 VoltAgent 控制台链接(或将其复制粘贴到浏览器中)。
  2. Find Your Agent: On the VoltAgent Console page, you should see your agent listed (e.g., "my-agent").
    找到您的代理:在 VoltAgent 控制台页面上,您应该会看到您的代理列出(例如,“my-agent”)。
  3. Open Agent Details: Click on your agent's name.
    打开 Agent Details(代理详细信息):单击您的代理名称。
  4. Start Chatting: On the agent detail page, click the chat icon in the bottom right corner to open the chat window.
    开始聊天:在坐席详情页面,点击右下角的聊天图标,打开聊天窗口。
  5. Send a Message: Type a message like "Hello" and press Enter.
    发送消息:键入类似于“Hello”的消息,然后按 Enter。

五、Key Features 主要特点

  • Agent Core: Define agents with descriptions, LLM providers, tools, and memory management.
    Agent Core:使用描述、LLM提供程序、工具和内存管理定义代理。
  • Multi-Agent Systems: Build complex workflows using Supervisor Agents coordinating multiple specialized Sub-Agents.
    多代理系统:使用协调多个专用子代理的 Supervisor Agent 构建复杂的工作流程。
  • Tool Usage & Lifecycle: Equip agents with custom or pre-built tools (functions) with type-safety (Zod), lifecycle hooks, and cancellation support to interact with external systems.
    工具使用和生命周期:为代理配备自定义或预构建的工具(函数),具有类型安全(Zod)、生命周期钩子和取消支持,以便与外部系统交互。
  • Flexible LLM Support: Integrate seamlessly with various LLM providers (OpenAI, Anthropic, Google, etc.) and easily switch between models.
    灵活的LLM支持:与各种LLM提供商(OpenAI、Anthropic、Google 等)无缝集成,并在模型之间轻松切换。
  • Memory Management: Enable agents to retain context across interactions using different configurable memory providers.
    内存管理:使代理能够使用不同的可配置内存提供程序在交互中保留上下文。
  • Observability & Debugging: Visually monitor agent states, interactions, logs, and performance via the VoltAgent Console.
    可观察性和调试:通过VoltAgent控制台直观地监控代理状态、交互、日志和性能。
  • Voice Interaction: Build voice-enabled agents capable of speech recognition and synthesis using the @voltagent/voice package.
    语音交互:使用 @voltagent/voice 软件包构建能够进行语音识别和合成的支持语音的代理。
  • Data Retrieval & RAG: Integrate specialized retriever agents for efficient information fetching and Retrieval-Augmented Generation (RAG) from various sources.
    数据检索和RAG:集成专门的检索代理,以便从各种来源高效获取信息和检索增强生成(RAG)。
  • Model Context Protocol (MCP) Support: Connect to external tool servers (HTTP/stdio) adhering to the MCP standard for extended capabilities.
    模型上下文协议 (MCP) 支持:连接到符合 MCP 标准的外部工具服务器 (HTTP/stdio),以实现扩展功能。
  • Prompt Engineering Tools: Leverage utilities like createPrompt for crafting and managing effective prompts for your agents.
    提示工程工具: 利用实用程序 createPrompt 为您的座席制作和管理有效的提示。
  • Framework Compatibility: Designed for easy integration into existing Node.js applications and popular frameworks.
    框架兼容性:旨在轻松集成到现有的 Node.js 应用程序和流行的框架中。

六、Use Cases 使用案例

VoltAgent 用途广泛,可以为各种 AI 驱动的应用程序提供支持:

  • Complex Workflow Automation: Orchestrate multi-step processes involving various tools, APIs, and decision points using coordinated agents.
    复杂的工作流程自动化:使用协调的代理编排涉及各种工具、API 和决策点的多步骤流程。
  • Intelligent Data Pipelines: Build agents that fetch, process, analyze, and transform data from diverse sources.
    Intelligent Data Pipelines:构建代理,用于从不同来源获取、处理、分析和转换数据。
  • AI-Powered Internal Tools & Dashboards: Create interactive internal applications that leverage AI for analysis, reporting, or task automation, often integrated with UIs using hooks.
    AI驱动的内部工具和仪表板:创建利用AI进行分析、报告或任务自动化的交互式内部应用程序,通常使用钩子与UI集成。
  • Automated Customer Support Agents: Develop sophisticated chatbots that can understand context (memory), use tools (e.g., check order status), and escalate complex issues.
    自动化客户支持代理:开发复杂的聊天机器人,这些机器人可以理解上下文(记忆)、使用工具(例如,检查订单状态)并上报复杂问题。
  • Repository Analysis & Codebase Automation: Analyze code repositories, automate refactoring tasks, generate documentation, or manage CI/CD processes.
    存储库分析和代码库自动化:分析代码存储库,自动化重构任务,生成文档或管理CI/CD流程。
  • Retrieval-Augmented Generation (RAG) Systems: Build agents that retrieve relevant information from knowledge bases (using retriever agents) before generating informed responses.
    检索增强生成 (RAG) 系统:构建代理,在生成明智的响应之前从知识库中检索相关信息(使用检索代理)。
  • Voice-Controlled Interfaces & Applications: Utilize the @voltagent/voice package to create applications that respond to and generate spoken language.
    语音控制界面和应用程序:利用该 @voltagent/voice 软件包创建响应并生成口语的应用程序。
  • Personalized User Experiences: Develop agents that adapt responses and actions based on user history and preferences stored in memory.
    个性化用户体验:开发代理,根据存储在内存中的用户历史记录和偏好调整响应和作。
  • Real-time Monitoring & Alerting: Design agents that continuously monitor data streams or systems and trigger actions or notifications based on defined conditions.
    实时监控和警报:设计持续监控数据流或系统并根据定义条件触发作或通知的代理。
  • And Virtually Anything Else...: If you can imagine an AI agent doing it, VoltAgent can likely help you build it! ⚡
    以及几乎任何其他...:如果您能想象一个 AI 代理来做这件事,VoltAgent 可能会帮助您构建它!⚡

七、软件下载

夸克网盘分享

本文信息来源于GitHub作者地址:GitHub - VoltAgent/voltagent: Open Source TypeScript AI Agent Framework

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.pswp.cn/news/907378.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

《仿盒马》app开发技术分享-- 订单详情页(端云一体)

开发准备 在之前的章节中我们实现了订单的提交&#xff0c;以及提交之后跳转到确认订单页面&#xff0c;在确认订单页面我们添加了一个入口&#xff0c;这个入口是查询订单&#xff0c;当我们点击入口时&#xff0c;我们需要跳转到一个新的界面&#xff0c;这个界面通过接收上…

传统项目管理总拖延?Scrum敏捷全流程拆解

在互联网高速发展的时代&#xff0c;企业竞争的核心要素正逐渐向 "速度" 倾斜。市场环境瞬息万变&#xff0c;用户需求呈现出多元化、动态化的显著特征&#xff0c;而传统管理模式固有的滞后性与僵化性&#xff0c;已难以匹配快速迭代的市场需求。在此背景下&#xf…

GelSight Mini触觉传感器:7μm精度+3D 映射,赋能具身智能精密操作

GelSight Mini 高分辨率视触觉传感器采用先进的光学成像与触觉感知技术&#xff0c;赋予机器人接近人类的触觉能力。该设备可捕捉物体表面微观细节&#xff0c;并生成高精度的2D/3D数字映射&#xff0c;帮助机器人识别形状、纹理及接触力&#xff0c;从而执行更复杂、精准的操作…

【电路笔记 TMS320F28335DSP】McBSP 从源时钟得到 生成时钟 CLKG 帧同步信号 FSG

对应于原文 Multichannel Buffered Serial Port (McBSP)的 2.5.3 Data Clock Generation。 CLKG Figure 2-4. Sample Rate Generator Block Diagram CLKG 是采样率发生器输出的数据位时钟&#xff08;Data Bit Clock&#xff09;&#xff0c;它被用来控制&#xff1a; 数据发…

(25年5.28)ChatGPT Plus充值教程与实用指南:附国内外使用案例与模型排行

更多具体来源&#xff1a;查看原文 ChatGPT Plus 充值教程 由于国内卡无法直接充值 chatgpt&#xff0c;通常需要借助虚拟卡。目前咱们常用的方式是通过虚拟卡平台获取。因平台审核要求这里不细说&#xff0c;具体看原文。 ChatGPT Plus主要使用方向 ChatGPT Plus 提供了更…

38. 自动化测试异步开发之编写客户端异步webdriver接口类

Selenium异步浏览器操作实现原理深度解析 一、AsyncBrowser类核心结构 1.1 类定义与启动方法 class AsyncBrowser(Command):@classmethodasync def start(cls, remote_driver_server: str

国芯思辰| 霍尔电流传感器AH811为蓄电池负载检测系统安全护航

在电动车、储能电站、不间断电源&#xff08;UPS&#xff09;等设备中&#xff0c;蓄电池作为关键的储能单元&#xff0c;其运行状态直接关系到设备的稳定性和使用寿命。而准确监测蓄电池的负载情况&#xff0c;是保障其安全、高效运行的关键。霍尔电流传感器 AH811凭借独特的技…

[Java恶补day8] 3. 无重复字符的最长子串

给定一个字符串 s &#xff0c;请你找出其中不含有重复字符的 最长 子串 的长度。 示例 1: 输入: s “abcabcbb” 输出: 3 解释: 因为无重复字符的最长子串是 “abc”&#xff0c;所以其长度为 3。 示例 2: 输入: s “bbbbb” 输出: 1 解释: 因为无重复字符的最长子串是 “…

kafka学习笔记(三、消费者Consumer使用教程——从指定位置消费)

1.简介 Kafka的poll()方法消费无法精准的掌握其消费的起始位置&#xff0c;auto.offset.reset参数也只能在比较粗粒度的指定消费方式。更细粒度的消费方式kafka提供了seek()方法可以指定位移消费允许消费者从特定位置&#xff08;如固定偏移量、时间戳或分区首尾&#xff09;开…

【JS进阶】JavaScript 中 this 值的确定规则

JavaScript 中 this 值的确定规则 1. 默认绑定&#xff08;独立函数调用&#xff09; 当函数作为普通函数调用时&#xff0c;this 指向全局对象&#xff08;浏览器中是 window&#xff0c;Node.js 中是 global&#xff09;&#xff0c;严格模式下是 undefined。 function sh…

【凌智视觉模块】rv1106 部署 pp-humseg 模型

人像分割简介 ❀ 凌智视觉模块 是一款基于rv1106芯片开发的视觉模块&#xff0c;专注于视觉模型部署与开发。 人像分割是一种基于计算机视觉的技术&#xff0c;通过深度学习算法精准识别图像或视频中的人物主体&#xff0c;将其与背景进行像素级分离。该技术可实时运行于移动端…

wangeditor富文本编辑器+vue3粘贴内容样式处理

又是一个风格和日立的上午&#xff0c;某只菜鸟高高兴兴的骑着小电驴去上班&#xff0c;本着上班只要不迟到的理念飞速前行&#xff08;迟到扣钱啊~&#xff09;&#xff0c;高高兴兴的行走在路上。来到工位刚拴上我的绳子组长就开始滴滴俺&#xff0c;顿时我心中大感不妙&…

实测,大模型谁更懂数据可视化?

大家好&#xff0c;我是 Ai 学习的老章 看论文时&#xff0c;经常看到漂亮的图表&#xff0c;很多不知道是用什么工具绘制的&#xff0c;或者很想复刻类似图表。 实测&#xff0c;大模型 LaTeX 公式识别&#xff0c;出乎预料 前文&#xff0c;我用 Kimi、Qwen-3-235B-A22B、…

深度学习-梯度消失和梯度爆炸

梯度消失 在某些神经网络中&#xff0c;随着网络深度的增加&#xff0c;梯度在隐藏层反向传播时倾向于变小&#xff0c;这就意味着&#xff0c;前面隐藏层中的神经元要比后面的学习起来更慢&#xff0c;这种现象就叫做“梯度消失”&#xff1b; 梯度爆炸 如果我们进行一些特殊…

Go 语言基础 2 Func,流程控制

更多个人笔记见&#xff1a; github个人笔记仓库 gitee 个人笔记仓库 个人学习&#xff0c;学习过程中还会不断补充&#xff5e; &#xff08;后续会更新在github上&#xff09; 文章目录 Func 函数函数栈概念 函数表示类型 Anonymous func 匿名函数closure 闭包基础示例http利…

【Linux 学习计划】-- 倒计时、进度条小程序

目录 \r 、\n、fflush 倒计时 进度条 进度条进阶版 结语 \r 、\n、fflush 首先我们先来认识这三个东西&#xff0c;这将会是我们接下来两个小程序的重点之一 首先是我们的老演员\n&#xff0c;也就是回车加换行 这里面其实包含了两个操作&#xff0c;一个叫做回车&…

从零实现wss通信示例(WebSocket SSL)

客户端和服务端代码框架跟上一篇一致,仅增加了ssl的证书部分用于加密通信,明文通信(ws协议)见上一篇【https://blog.csdn.net/suoxd123/article/details/148093934】 1. 证书创建 1. 安装openssl 【官网地址】:https://slproweb.com/products/Win32OpenSSL.html 1.2 …

mysql 索引失效有哪些

InnoDB存储引擎根据索引类型不同&#xff0c;分为聚簇索引和二级索引 聚簇索引&#xff1a;叶子节点存放的是实际数据 二级索引&#xff1a;存放的是主键值&#xff0c;不是实际数据 1.对索引使用左或者左右模糊匹配 select * from t_user where name like %林‘&#xff1b…

LabVIEW通用测控平台设计

基于 LabVIEW 图形化编程环境&#xff0c;设计了一套适用于工业自动化、科研测试领域的通用测控平台。通过整合研华、NI等品牌硬件&#xff0c;实现多类型数据采集、实时控制及可视化管理。平台采用模块化架构&#xff0c;支持硬件灵活扩展&#xff0c;解决了传统测控系统开发周…

华为OD机试真题——智能驾驶(2025A卷:200分)Java/python/JavaScript/C/C++/GO最佳实现

2025 A卷 200分 题型 本专栏内全部题目均提供Java、python、JavaScript、C、C++、GO六种语言的最佳实现方式; 并且每种语言均涵盖详细的问题分析、解题思路、代码实现、代码详解、3个测试用例以及综合分析; 本文收录于专栏:《2025华为OD真题目录+全流程解析+备考攻略+经验分…