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
繁體地址,請注明出處:http://hk.pswp.cn/news/907378.shtml
英文地址,請注明出處:http://en.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真題目錄+全流程解析+備考攻略+經驗分…