[论文翻译]Eliza: 一个 Web3 友好的 AI 智能体操作系统


原文地址:https://arxiv.org/pdf/2501.06781


Eliza: A Web3 friendly AI Agent Operating System

Eliza: 一个 Web3 友好的 AI 智能体操作系统

Abstract

摘要

AI Agent, powered by large language models (LLMs) as its cognitive core, is an intelligent agentic system capable of autonomously controlling and determining the execution paths under user’s instructions. With the burst of capabilities of LLMs and various plugins: i.e. RAG, text-to-image/video/3D and etc, the potential of AI Agents has been vastly expanded, with their capabilities growing stronger by the day. However, at the intersection between AI and web3, there is currently no ideal agentic framework that can seamlessly integrate web3 applications into AI agent functionalities. In this paper, we propose Eliza, the first open-source web3-friendly Agentic frameworks that make the deployment of web3 applications effortless. We emphasize that every aspect of Eliza is a regular Typescript program under the full control of its user, and it seamlessly integrates with web3 (i.e. reading and writing blockchain data, interacting with smart contracts and etc). Furthermore, we show how stable performance is achieved through the pragmatic implementation of the key components of Eliza’s runtime. Our code is publicly available at elizaOS/eliza.

AI智能体 (AI Agent) 以大语言模型 (LLMs) 作为其认知核心,是一种能够在用户指令下自主控制和确定执行路径的智能体系统。随着大语言模型能力的爆发以及各种插件(如 RAG、文本到图像/视频/3D 等)的出现,AI智能体的潜力得到了极大的扩展,其能力日益增强。然而,在 AI 与 web3 的交汇处,目前还没有一个理想的智能体框架能够无缝地将 web3 应用程序集成到 AI 智能体功能中。在本文中,我们提出了 Eliza,这是第一个开源且对 web3 友好的智能体框架,使得 web3 应用程序的部署变得轻而易举。我们强调,Eliza 的每个方面都是一个完全由用户控制的常规 Typescript 程序,并且它与 web3 无缝集成(即读取和写入区块链数据、与智能合约交互等)。此外,我们展示了如何通过 Eliza 运行时关键组件的务实实现来达到稳定的性能。我们的代码公开在 elizaOS/eliza。

1 Introduction

1 引言

In the rapidly evolving landscape of AI, the advent of AI Agent, a system driven by large language models (LLMs) [2, 5, 3, 26, 13] as its cognitive foundation, marks a significant milestone. This intelligent agentic system is not only capable of autonomously controlling and determining the execution paths under user instructions but also possesses the adaptability to navigate complex tasks with ease. The surge in capabilities of LLMs, coupled with the integration of diverse plugins such as RAG [8, 15], text-to-image/video/3D [22, 18, 25] tools, and more, has exponentially expanded the potential of AI Agents (i.e. AutoGPT [29], LangGraph [7], Camel [16], OpenAI Swarm [6] and MiniChain [24]). Their capabilities are advancing at a pace that is nothing short of remarkable, with new functionalities being added and refined on a daily basis.

在快速发展的 AI 领域,AI 智能体 (AI Agent) 的出现标志着一个重要的里程碑。这一智能系统以大语言模型 (LLMs) [2, 5, 3, 26, 13] 作为其认知基础,不仅能够自主控制和确定用户指令下的执行路径,还具备轻松应对复杂任务的适应性。LLMs 能力的激增,加上 RAG [8, 15]、文本到图像/视频/3D [22, 18, 25] 工具等多种插件的集成,极大地扩展了 AI 智能体的潜力(例如 AutoGPT [29]、LangGraph [7]、Camel [16]、OpenAI Swarm [6] 和 MiniChain [24])。它们的能力以惊人的速度发展,每天都有新功能被添加和完善。

However, despite the significant advancements in AI technology, a conspicuous gap persists at the confluence of AI and web3. The web3 domain is notably lacking an ideal agentic framework capable of seamlessly integrating web3 applications into its ecosystem, thereby fully unleashing the transformative potential of decentralized AI. This represents a critical void, as the successful integration of AI Agents with web3 technologies has the potential to revolutionize our engagement

然而,尽管AI技术取得了显著进展,但在AI与web3的交汇处仍存在一个明显的空白。web3领域明显缺乏一个理想的智能体框架,能够将web3应用无缝集成到其生态系统中,从而充分释放去中心化AI的变革潜力。这是一个关键的空白,因为AI智能体与web3技术的成功整合有可能彻底改变我们的参与方式。

Figure 1: Eliza is a straightforward yet efficient AI agent operating system, offering a seamless experience for developers to effortlessly launch their first-ever web3-oriented AI Agent.

图 1: Eliza 是一个简单而高效的 AI 智能体操作系统,为开发者提供了无缝体验,使他们能够轻松启动首个面向 web3 的 AI 智能体。

Table 1: Comparison with trending AI Agent frameworks.

表 1: 与热门 AI 智能体框架的对比

LangGraph 9t AutoGPT CAMEL Eliza
多智能体系统
社交媒体 X
Web3 支持 X X
人在回路
Github 趋势
语言 Python Python Python TypeScript
工作流 手动 手动 手动 手动, 自动

with decentralized applications and blockchain networks. By doing so, it could pave the way for a more equitable world where the benefits of technological progress are more broadly and fairly distributed among humanity.

通过去中心化应用和区块链网络,它可以为构建一个更加公平的世界铺平道路,在这个世界中,技术进步的好处能够更广泛、更公平地分配给全人类。

In this paper, we introduce Eliza, a pioneering open-source web3-friendly agentic operating system designed to bridge this gap. Eliza is the first of its kind, offering a platform that makes the deployment of web3 applications not only possible but also effortless. We emphasize that every aspect of Eliza is crafted as a regular Typescript program, ensuring that it remains under the full control of its users while also providing seamless integration with web3 functionalities. This includes, but is not limited to, reading and writing blockchain data, interacting with smart contracts, and much more.

在本文中,我们介绍了Eliza,这是一个开创性的开源Web3友好型AI智能体操作系统,旨在弥合这一差距。Eliza是同类产品中的首个,提供了一个平台,使得Web3应用程序的部署不仅成为可能,而且变得轻而易举。我们强调,Eliza的每个方面都是作为一个常规的Typescript程序精心设计的,确保它完全处于用户的控制之下,同时还能与Web3功能无缝集成。这包括但不限于读取和写入区块链数据、与智能合约交互等。

Furthermore, we delve into how the key components of Eliza’s runtime are implemented. As shown in Fig. 1, we explain how these components are designed to work in harmony, enabling the framework to achieve stable performance while maintaining the flexibility required to adapt to the ever-changing demands of web3 applications. By solving the challenges of integrating AI with web3, Eliza stands at the forefront of a new era in technology, where the possibilities are as boundless as the imagination of its users.

此外,我们深入探讨了Eliza运行时的关键组件是如何实现的。如图1所示,我们解释了这些组件如何设计以协同工作,使框架在保持适应web3应用不断变化需求的灵活性的同时,实现稳定的性能。通过解决将AI与web3集成的挑战,Eliza站在了技术新时代的前沿,其可能性与用户的想象力一样无限。

2 Background

2 背景

Decentralized Trading Bots: At the heart of the crypto or web3 world lies the functionality of trading, such as transferring tokens and participating in Token Generation Events (TGEs), minting

去中心化交易机器人:在加密或Web3世界的核心是交易功能,例如转移代币(Token)和参与代币生成事件(TGEs)、铸造等。

NFTs, and swapping tokens through decentralized exchanges (DEXs). With the proliferation of blockchain public chains like ETH, SOL, BASE and others, managing and operating one’s investment portfolio over fragmented block chains has become increasingly challenging. Individual investors are in dire need of a system to help manage their portfolios and conduct intelligent operations and trades. Platforms like GMGN, Dex screener, and Bull X have filled this gap to a great extent, but for intermediate to advanced users with customized needs, the basic functionalities of these platforms may fall short.

NFTs,以及通过去中心化交易所 (DEXs) 进行代币交换。随着 ETH、SOL、BASE 等区块链公链的普及,在分散的区块链上管理和操作投资组合变得越来越具有挑战性。个人投资者迫切需要一种系统来帮助他们管理投资组合并进行智能操作和交易。GMGN、Dex screener 和 Bull X 等平台在很大程度上填补了这一空白,但对于有定制需求的中高级用户来说,这些平台的基本功能可能还不够。

Business Insights: Secondly, blockchain data itself contains a wealth of crucial information for traders to make decisions. From simple metrics like changes in token holder counts, token prices, market capitalization, and Total Value Locked (TVL), to more advanced indicators such as the proportion of whale accounts, market-maker styles, and candlestick patterns, all can provide effective assistance to different types of crypto currency investors. The emergence of AI agents has brought hope for structuring the complex data on block chains into high-quality insights to aid investors in making wiser decisions. However, extracting data intelligence is a challenging task, and using a general AI Agent framework for this purpose demands a high level of expertise from users. Therefore, there is an urgent need for a Web3-native AI Agent framework to achieve this.

商业洞察:其次,区块链数据本身包含了丰富的关键信息,供交易者做出决策。从简单的指标如Token持有者数量的变化、Token价格、市值和总锁定价值(TVL),到更高级的指标如鲸鱼账户比例、做市商风格和K线图形态,都可以为不同类型的加密货币投资者提供有效帮助。AI智能体的出现为将区块链上的复杂数据结构化,转化为高质量的洞察以帮助投资者做出更明智的决策带来了希望。然而,提取数据智能是一项具有挑战性的任务,使用通用的AI智能体框架来实现这一目标对用户提出了较高的专业要求。因此,迫切需要一种Web3原生的AI智能体框架来实现这一目标。

Interaction: Finally, for the Web3 industry, social media platforms like Twitter, Discord, and Farcaster are essential for connecting with users, obtaining cutting-edge information, and making trading decisions. As an increasing number of Key Opinion Leaders (KOLs) flock to these platforms, the information they disseminate becomes more complex and fragmented. Navigating this landscape to acquire organic insights and critically assess the credibility of KOLs is a universal challenge for traders. An exemplary Agent would enable users to sift through the vast information pool, distilling valuable intelligence without succumbing to information overload, and serving as a genuine intermediary in social media interactions with other users or agents.

交互:最后,对于 Web3 行业而言,Twitter、Discord 和 Farcaster 等社交媒体平台对于连接用户、获取前沿信息和做出交易决策至关重要。随着越来越多的关键意见领袖 (KOL) 涌入这些平台,他们传播的信息变得更加复杂和碎片化。在这样的环境中获取有机见解并批判性地评估 KOL 的可信度,是交易者面临的普遍挑战。一个优秀的 AI 智能体将使用户能够筛选庞大的信息池,提炼出有价值的情报,而不会陷入信息过载的困境,并在与其他用户或智能体的社交媒体互动中充当真正的中介。

In consideration of the needs above, Eliza emerges as the premier open-source, web3-friendly AI Agent Operating System, boasting a modular design that empowers developers and users to tailor solutions to their specific requirements. By harnessing the robust capabilities of AI models and a variety of add-ons, Eliza democratizes access to advanced AI functionalities, significantly reducing the barrier to entry for the general public without the need for extensive coding expertise.

考虑到上述需求,Eliza 作为首款开源、Web3 友好的 AI 智能体操作系统应运而生,其模块化设计使开发者和用户能够根据特定需求定制解决方案。通过利用 AI 模型的强大功能和多种插件,Eliza 实现了对高级 AI 功能的普及,显著降低了公众进入的门槛,无需广泛的编程专业知识。

3 Design Principles

3 设计原则

Eliza is a powerful multi-agent simulation framework designed for creating, deploying, and managing autonomous AI agents. It is built using TypeScript and is capable of interacting across multiple platforms. Numerous projects have been developed based on our framework.

Eliza 是一个强大的多智能体模拟框架,专为创建、部署和管理自主 AI 智能体而设计。它使用 TypeScript 构建,能够跨多个平台进行交互。基于我们的框架已经开发了许多项目。

Eliza’s success is attributed to its integration of the strong demands of web3 into a design that balances utility and ease of use. There are three main principles behind our choices:

Eliza 的成功归功于其将 web3 的强大需求整合到一个平衡实用性和易用性的设计中。我们的选择背后有三个主要原则:

Put Web3 Developers First Since web3 primarily utilizes JavaScript/TypeScript, which is the dominant language for web development, Eliza allows developers to easily integrate blockchain functionality into existing web applications and build decentralized applications (dApps) by leveraging familiar tools and frameworks. Eliza should be a first-class member of that ecosystem. It adheres to the commonly established design goals of keeping interfaces simple and consistent, ideally with one idiomatic way of doing things.

将 Web3 开发者放在首位
由于 Web3 主要使用 JavaScript/TypeScript,这是 Web 开发的主导语言,Eliza 允许开发者轻松地将区块链功能集成到现有的 Web 应用程序中,并利用熟悉的工具和框架构建去中心化应用程序 (dApps)。Eliza 应该是该生态系统中的一等公民。它遵循了普遍确立的设计目标,即保持接口简单一致,理想情况下有一种惯用的方式来完成事情。

Pluggable Modular Design Eliza decouples its structure into a core Runtime along with four key components: Adapter (data), Character (agent personality), Client (message interaction), and Plugin (universal functionality). This design allows developers or users to freely add their own plugins, clients, characters, and adapters as they wish, without worrying about the details within the core Runtime. It makes extension incredibly easy and paves the way for Eliza to support the most model providers (i.e. OpenAI, Llama, Qwen and etc.), platform integration s (i.e. Twitter, Discord, Telegram and etc.), chain comp a tibi li ties (i.e. Solana, Ethereum, Ton and etc.), and highly equipped functions (i.e. Text2Image/Video/3D, Web Search, TEE and etc.).

可插拔模块化设计
Eliza 将其结构解耦为核心运行时 (Runtime) 以及四个关键组件:适配器 (Adapter)(数据)、角色 (Character)(智能体个性)、客户端 (Client)(消息交互)和插件 (Plugin)(通用功能)。这种设计允许开发者或用户根据需要自由添加自己的插件、客户端、角色和适配器,而无需关心核心运行时的内部细节。这使得扩展变得极其简单,并为 Eliza 支持最多的模型提供商(如 OpenAI、Llama、Qwen 等)、平台集成(如 Twitter、Discord、Telegram 等)、链兼容性(如 Solana、Ethereum、Ton 等)以及高度配备的功能(如文本生成图像/视频/3D、网络搜索、TEE 等)铺平了道路。

Roughness is better Given a fixed amount of engineering resources, and all else being equal, the time saved by keeping the internal implementation of Eliza simple can be used to implement additional features, adapt to new situations, and keep up with the fast pace of progress in the field of AI and web3. Therefore it is better to have a simple but slightly incomplete solution than a comprehensive but complex and hard to maintain design.

粗糙但更好
在工程资源固定的情况下,且其他条件相同的情况下,保持Eliza内部实现的简单性所节省的时间可以用于实现额外的功能、适应新情况,并跟上AI和web3领域的快速发展步伐。因此,拥有一个简单但略微不完整的解决方案比一个全面但复杂且难以维护的设计更好。

4 Related Works

4 相关工作

As an AI Agent operating system focusing on web3 and social media, we aim to define our position and differentiate ourselves from both industrial AI Agent frameworks (i.e. Bedrock (AWS), Swarm (OpenAI), and smolagent (Hugging face) [23]]) and academic-oriented projects [12, 27, 31, 16]. Specifically, we will mainly discuss plugins and frameworks below.

作为一个专注于 web3 和社交媒体的 AI 智能体操作系统,我们旨在明确自身定位,并与工业界的 AI 智能体框架(即 Bedrock (AWS)、Swarm (OpenAI) 和 smolagent (Hugging face) [23])以及学术导向的项目 [12, 27, 31, 16] 区分开来。具体而言,我们将在下文主要讨论插件和框架。

4.1 Plugins

4.1 插件

Along with the rapid growth of off-the-shelf plugins, the agent’s enhancement can be categoried into two principle forms: Internal and External. Internally, the core principle is to tap into the full potential of the LLM itself, yielding more organized and logical answers and alleviating the long-standing issue of hallucination. Representative works within this paradigm include Chain-ofThoughts (CoT) [28], along with its successful descendants: Zero-shot CoT [14], Tree-of-Thoughts (ToT) [32], Graph-of-Thoughts (GoT) [4], and Layer-of-Thoughts (LoT) [9]. CoT introduced step-by-step explanations, ToT allowed branching to explore multiple solutions, and GoT connected reasoning pathways in a network. LoT, released in October 2024, is a hierarchical reasoning AI that organizes thoughts into layers for structured problem-solving. It filters information through layers of constraints to efficiently and transparently find the most relevant solutions.

随着现成插件的快速增长,AI智能体的增强可以分为两种主要形式:内部和外部。在内部,核心原则是充分利用大语言模型本身的潜力,产生更有条理和逻辑性的答案,并缓解长期存在的幻觉问题。这一范式中的代表性工作包括思维链 (Chain-of-Thoughts, CoT) [28],以及其成功的衍生品:零样本思维链 (Zero-shot CoT) [14]、思维树 (Tree-of-Thoughts, ToT) [32]、思维图 (Graph-of-Thoughts, GoT) [4] 和思维层 (Layer-of-Thoughts, LoT) [9]。CoT 引入了逐步解释,ToT 允许分支探索多种解决方案,GoT 将推理路径连接成网络。LoT 于 2024 年 10 月发布,是一种分层推理 AI,将思维组织成层次结构以进行结构化问题解决。它通过层层约束过滤信息,以高效且透明地找到最相关的解决方案。

While "X-of-T" techniques have significantly enhanced the problem-solving prowess of LLMs, paving the way for more intelligent and insightful AI systems, the role of external information is also crucial. Externally, integrating knowledge from various sources greatly enhances an AI agent’s ability to solve real-world practical problems. This includes Retrieval Augmented Generations (RAGs) [15, 8], vector databases [11], and web searches [1]. Furthermore, as AI-Generated Content (AIGC) matures, the ability to convert text into images [22, 21], videos [30, 10], and 3D models [20, 25] opens up new possibilities for AI agents, adding a fresh dimension to the capabilities of LLMs.

虽然 "X-of-T" 技术显著增强了大语言模型 (LLM) 的解决问题能力,为更智能和更具洞察力的 AI 系统铺平了道路,但外部信息的作用同样至关重要。在外部,整合来自各种来源的知识极大地增强了 AI 智能体解决现实世界实际问题的能力。这包括检索增强生成 (Retrieval Augmented Generations, RAGs) [15, 8]、向量数据库 [11] 和网络搜索 [1]。此外,随着生成式 AI (AIGC) 的成熟,将文本转换为图像 [22, 21]、视频 [30, 10] 和 3D 模型 [20, 25] 的能力为 AI 智能体开辟了新的可能性,为大语言模型的能力增添了新的维度。

As shown in Fig. 1, Eliza offers robust support for a variety of blockchain plugins, encompassing everything from on-chain transactions to Trusted Execution Environments (TEEs). The comprehensive web3 toolkit is designed to be user-friendly and easily extensible, even for junior developers, thus achieving a balance between simplicity and efficiency. Additionally, the integration of social media support broadens the range of application scenarios, which constitutes the primary arena where these web3-oriented agents can actively participate and demonstrate their value.

如图 1 所示,Eliza 为各种区块链插件提供了强大的支持,涵盖了从链上交易到可信执行环境 (TEE) 的所有内容。全面的 web3 工具包设计得用户友好且易于扩展,即使是初级开发者也能轻松上手,从而在简单性和效率之间实现了平衡。此外,社交媒体支持的集成拓宽了应用场景的范围,这些面向 web3 的智能体可以在这些场景中积极参与并展示其价值。

4.2 Frameworks

4.2 框架


Comprehensive Score (o-10) Figure 2: Comparison with AI agent frameworks focuses on web3. Score ranging from 0 (worst) to 10 (best), reflect the views of senior developers come from AI and web3 industry.

图 2: 与专注于 web3 的 AI 智能体框架的比较。评分范围从 0 (最差) 到 10 (最好),反映了来自 AI 和 web3 行业的高级开发者的观点。

AI agent frameworks flourished at the emergence of ChatGPT, has rallied in 2023, where AutoGPT, LangGraph (LangChain) and Camel released their first version on. People from all walks of life have find the potential and benefit in leveraging AI Agent or Workflow to promote their efficiencies in coping with tedious routine jobs.

AI智能体框架在ChatGPT出现时蓬勃发展,并在2023年迎来了高潮,AutoGPT、LangGraph (LangChain) 和 Camel 都发布了它们的首个版本。各行各业的人们都发现了利用AI智能体或工作流来提升处理繁琐日常工作效率的潜力和好处。

For web3 industry, due to its highly time-sensitive property and complexity within blockchain interactions, a series of web3-oriented AI Agent frameworks start to emerge:

对于 web3 行业,由于其高度的时间敏感性和区块链交互的复杂性,一系列面向 web3 的 AI 智能体框架开始涌现:

As an open source framework, Eliza should be compared with its rivals of the same kind: including RIG, G.A.M.E, ZerePy, Heurist, REI. As shown in Fig. 2, we collect the feedbacks from over ${50+}$ AI researchers and senior blockchain developers to acquire their subjective assessment toward current trending web3 AI agent frameworks, it can be easily observed that Eliza outperforms other frameworks in terms of key indictors: model providers, chain compatibility, functionality and social media.

作为一个开源框架,Eliza 应该与同类竞争对手进行比较:包括 RIG、G.A.M.E、ZerePy、Heurist、REI。如图 2 所示,我们收集了超过 ${50+}$ 位 AI 研究人员和资深区块链开发者的反馈,以获取他们对当前流行的 web3 AI智能体框架的主观评估。可以明显看出,Eliza 在关键指标上优于其他框架:模型提供商、链兼容性、功能性和社交媒体。

5 ElizaOS

5 ElizaOS

As general frameworks often limited to its highly abstract low-level details and use cases, the direction moving from generic to specialize becomes evident as time goes on. Plus, it is well-known that AI and LLMs are fields that evolve rapidly, with new concepts and ideas emerging every week. Abstractions like LangChain or AutoGPT, which are built around a variety of emerging technologies, find it difficult to withstand the test of time with their framework design.

随着时间的推移,从通用框架向专用框架转变的趋势变得愈发明显,因为通用框架往往受限于其高度抽象的低层细节和用例。此外,众所周知,AI 和大语言模型是快速发展的领域,每周都有新的概念和想法涌现。像 LangChain 或 AutoGPT 这样的抽象框架,围绕多种新兴技术构建,其框架设计难以经受时间的考验。

In the highly time-sensitive web3 industry, developers often need to interact with block chains for various activities such as transferring tokens, deploying and interacting with smart contracts, and staying updated with the latest information, including crypto currency prices, recent statements from Key Opinion Leaders (KoLs), and the holdings of major investors, often referred to as "whales". Almost all of these tasks can be automated through rule-based systems. Prior to the advent of AI Agents, it was challenging to account for all these details and create a comprehensive automated process.

在高度时效性的 web3 行业中,开发者经常需要与区块链进行交互,以进行各种活动,例如转移代币 (Token)、部署和交互智能合约,以及获取最新信息,包括加密货币价格、关键意见领袖 (KoLs) 的最新声明以及主要投资者(通常称为“鲸鱼”)的持仓情况。几乎所有这些都是可以通过基于规则的系统实现自动化的。在 AI 智能体 (AI Agent) 出现之前,很难考虑到所有这些细节并创建一个全面的自动化流程。

Based on the philosophy derived from previous AI Agent frameworks, we build a highly controllable and well-orchestrated framework that primarily focus on the web3 industry, serves for a simple expression: sweeping away the hurdles for developers in turning the mighty AI Agents into life.

基于以往AI智能体框架的理念,我们构建了一个高度可控且协调良好的框架,主要面向web3行业,旨在实现一个简单的目标:为开发者扫清将强大的AI智能体变为现实的障碍。

5.1 Core Concepts

5.1 核心概念

5.1.1 Agents

5.1.1 AI智能体

Agents are the core carriers of Eliza that handle autonomous interactions. Each agent runs in a runtime and can interact through various clients (Discord, Twitter, etc.) while maintaining consistent behavior and memory.

AI智能体是Eliza处理自主交互的核心载体。每个AI智能体在一个运行时环境中运行,可以通过各种客户端(如Discord、Twitter等)进行交互,同时保持行为一致性和记忆。

From an implementation perspective, Agent Runtime class is the primary implementation of the I Agent Runtime interface, which manages the agent’s core functions, including:

从实现角度来看,Agent Runtime 类是 IAgent Runtime 接口的主要实现,它管理着 AI 智能体的核心功能,包括:

Eliza provides fully functional but not over-designed agent runtime with corresponding state management, memory system and message processing, makes runtime serviced to function in a sound operating state. Here is the minimal code snippet to instantiate a runtime:

Eliza 提供了一个功能完备但不过度设计的智能体运行时环境,包含相应的状态管理、内存系统和消息处理,确保运行时在良好的操作状态下运行。以下是实例化运行时环境的最小代码片段:

5.1.2 Character Files

5.1.2 字符文件

Character files are JSON-formatted configurations that define an AI agent’s personality, knowledge, and behavior within Eliza. Specifically, Eliza convert a Zod schema (Character Schema) into a TypeScript type (Character Config). The basic attributes to define a character are:

角色文件是以 JSON 格式定义的配置,用于在 Eliza 中定义 AI 智能体的个性、知识和行为。具体来说,Eliza 将 Zod 模式 (Character Schema) 转换为 TypeScript 类型 (Character Config)。定义角色的基本属性包括:

By meticulously crafting the character file, users can create an exclusive AI Agent that possesses unique skills and personalities. This process is akin to creating J.A.R.V.I.S. in Iron Man, laying down the most crucial foundation for an autonomous agent.

通过精心设计角色文件,用户可以创建一个拥有独特技能和个性的专属AI智能体。这一过程类似于在《钢铁侠》中创造J.A.R.V.I.S.,为自主智能体奠定了最重要的基础。

5.1.3 Providers

5.1.3 提供商

Providers are essential components that infuse agent interactions with dynamic context and real-time data. Acting as intermediaries, they link the agent to a plethora of external systems, facilitating access to a range of critical information including market data, wallet details, sentiment analysis, and temporal context.

提供者是关键组件,它们为智能体交互注入动态上下文和实时数据。作为中介,它们将智能体连接到众多外部系统,便于访问包括市场数据、钱包详情、情感分析和时间上下文在内的一系列关键信息。

To draw an analogy, providers can be likened to the human perceptual system, with their primary function being to:

打个比方,提供者可以被比作人类的感知系统,其主要功能是:

• Obtain dynamic contextual information • Integrate with the agent runtime • Format information for conversation templates • Maintain consistent data access

• 获取动态上下文信息
• 与智能体运行时集成
• 为对话模板格式化信息
• 保持数据访问的一致性

In Eliza, we have three basic built-in providers: Time Provider (provide temporal context for agent interactions), Facts Provider (maintain conversation facts) and a degen Boredom Provider (manage conversation dynamics and engagement by calculating the boredom level of an agent based on recent messages). Moreover, with built-in registration system, we can mount provider with an instantiated runtime with only one line of code:

在Eliza中,我们有三个基本的内置提供者:时间提供者(为智能体交互提供时间上下文)、事实提供者(维护对话事实)和一个退化的无聊提供者(通过根据最近的消息计算智能体的无聊程度来管理对话动态和参与度)。此外,通过内置的注册系统,我们可以用一行代码将提供者挂载到实例化的运行时中:

runtime.register Context Provider(custom Provider);

runtime.register Context Provider(custom Provider);

5.1.4 Actions

5.1.4 动作

Actions serve as the foundational elements within Eliza, dictating the agents’ responses and interactions with messages. They empower agents to engage with external systems, adjust their behavior, and execute complex tasks that extend beyond straightforward message exchanges.

动作是Eliza中的基本元素,决定了AI智能体对消息的响应和交互方式。它们使AI智能体能够与外部系统互动、调整自身行为,并执行超越简单消息交换的复杂任务。

An Action encompasses a wealth of functionalities, including but not limited to:

一个动作 (Action) 包含丰富的功能,包括但不限于:

• Placing Buy & Sell Orders • Analyzing PDF documents • Transcribing audio files • Generating NFTs (Non-Fungible Tokens)

• 下达买卖订单
• 分析PDF文档
• 转录音频文件
• 生成NFT(非同质化代币)

It’s crucial to recognize that the execution of Actions is often pivotal, with financial implications at stake. Each Action must be meticulously designed with a clear and defined purpose. To safeguard against any potential issues, incorporating robust validation mechanisms and comprehensive error handling is not just advisable but essential. These measures are indispensable when configuring user-defined Actions, ensuring the integrity and reliability of the agent’s operations in the web3 domain, can be registered through:

必须认识到,执行操作(Actions)通常是关键性的,涉及财务影响。每个操作都必须精心设计,具有明确的目的。为了防止任何潜在问题,加入强大的验证机制和全面的错误处理不仅是可取的,而且是必不可少的。这些措施在配置用户定义的操作时是不可或缺的,确保智能体在 web3 领域操作的完整性和可靠性,可以通过以下方式注册:

runtime.register Action(custom Action);

runtime.register Action(自定义 Action);

5.1.5 Evaluators

5.1.5 评估器

Evaluators represent the final core component of Eliza, tasked with assessing and extracting valuable information from conversations and integrating seamlessly into the Agent Runtime’s evaluation system. Much like Providers, the integration of Evaluators is streamlined and can be executed with a single line of code:

评估器是Eliza的最后一个核心组件,负责从对话中评估和提取有价值的信息,并无缝集成到Agent Runtime的评估系统中。与提供者类似,评估器的集成过程非常简化,只需一行代码即可完成:

runtime.register Eva lu at or(custom Eva lu at or);

runtime.registerEvaluator(customEvaluator);

In practice, Evaluators empower agents with the ability to:

在实践中,评估者赋予智能体以下能力:

• Build long-term memory • Track goal progress • Extract facts and insights • Maintain contextual awareness

• 构建长期记忆
• 跟踪目标进度
• 提取事实和见解
• 保持上下文感知

In service, Evaluators are d is pensi ble and commonest find under such scenarios: fact extraction to identify key information, goal tracking to monitor progress, and verifying agent functionality under edge cases.

在服务中,评估者在以下场景中是不可或缺且最常见的:事实提取以识别关键信息,目标跟踪以监控进度,以及在边缘情况下验证智能体功能。

5.2 Intent Recognition

5.2 意图识别

Intent Recognition is the ability of an AI assistant or an AI system, to understand the purpose or goal of a user’s request. As shown in Fig. 3, Eliza employs a multi-layered approach to intent recognition, combining symbolic action definitions with contextual understanding and memoryaugmented processing. At its core, the system utilizes a hierarchical action structure, where each intent is defined by a primary identifier accompanied by a collection of semantic similes. This allows for flexible recognition of user intentions across varying linguistic expressions. The primary mechanism is further enhanced by a context-aware evaluation system, which leverages both the immediate conversational state and long-term memory through vector-based retrieval mechanisms.

意图识别是AI助手或AI系统理解用户请求目的或目标的能力。如图3所示,Eliza采用多层方法进行意图识别,将符号化动作定义与上下文理解及记忆增强处理相结合。系统的核心是一个层次化的动作结构,其中每个意图由一个主要标识符和一组语义相似词定义。这使得系统能够灵活识别不同语言表达中的用户意图。主要机制通过上下文感知评估系统进一步增强,该系统利用即时对话状态和基于向量的检索机制来访问长期记忆。

The framework’s intent processing pipeline integrates template-driven context building with platformspecific interaction managers. This enables consistent intent recognition across diverse communication channels while maintaining platform-specific optimization s. The architecture is further augmented by a sophisticated memory system that maintains conversational history, knowledge bases, and relationship tracking. This allows the system to perform con textually relevant intent recognition, adapting to both the immediate conversation flow and the broader interaction history.

该框架的意图处理管道将模板驱动的上下文构建与平台特定的交互管理器相结合。这使得系统能够在不同的通信渠道上实现一致的意图识别,同时保持平台特定的优化。该架构还通过一个复杂的内存系统进一步增强,该系统维护对话历史、知识库和关系跟踪。这使得系统能够执行与上下文相关的意图识别,适应即时的对话流程和更广泛的交互历史。

The combination of these components results in a robust intent recognition system that can effectively process and respond to user intentions while maintaining contextual awareness and conversational coherence.

这些组件的结合形成了一个强大的意图识别系统,能够有效处理并响应用户意图,同时保持上下文感知和对话连贯性。

![](https://u254848-88c6-e493554b.yza1.seetacloud.com/miner/v2/analysis/pdf_img?as_attachment=False&user_id=931&pdf=1750d057bd901fe253f455ecce62572f7ee8b992972b2f53a0160931e32a55601736845121_2501.06781v1.pdf&filename=aaac3b8320e28a7465442e58073066bfbe05751720d2cbaaaa4