Author: francesco
Compiled by: TechFlow
When creating AI agents, a core challenge is how to enable them to learn, iterate, and grow flexibly while ensuring the consistency of their output results.
Rei provides a framework for sharing structured data between AI and blockchain, enabling AI agents to learn, optimize, and retain a set of experience and knowledge bases.
The emergence of this framework makes it possible to develop AI systems with the following capabilities:
Understand context and patterns and generate valuable insights
Transform insights into actionable actions while benefiting from the transparency and reliability of blockchain
Challenges
AI and blockchain have significant differences in their core attributes, which makes their compatibility face many challenges:
Deterministic computing of blockchain: Every operation of the blockchain must produce completely consistent results on all nodes to ensure:
Consensus : Each node reaches a consensus on the content of the new block and completes the verification together
Status verification : The status of the blockchain is always traceable and verifiable. Newly added nodes should be able to quickly synchronize to the same status as other nodes.
Smart contract execution : All nodes must generate consistent outputs under the same input conditions
Probabilistic AI calculations: The output of an AI system is usually based on probability, which means that each run may produce different results. This feature comes from:
Context- dependency : AI performance depends on the context of the input, such as training data, model parameters, and time and environmental conditions
Resource intensive : AI computing requires high-performance hardware support, including complex matrix operations and large amounts of memory.
The above differences raise the following compatibility challenges :
The conflict between probabilistic and deterministic data
How to convert the probabilistic output of AI into the deterministic results required by blockchain?
When and where should this transformation be completed?
How can we preserve the value of probabilistic analysis while ensuring certainty?
Gas Cost: The high computational requirements of AI models may result in unaffordable Gas fees, thus limiting their application on the blockchain.
Memory limitations: The memory capacity of the blockchain environment is limited and it is difficult to meet the storage requirements of AI models.
Execution time: The block time of the blockchain imposes a limit on the speed at which AI models can run, which may affect their performance.
Integration of data structures: AI models use complex data structures that are difficult to directly integrate into the blockchain's storage model.
Oracle problem (verification requirement): Blockchain relies on oracles to obtain external data, but how to verify the accuracy of AI calculations remains a difficult problem. In particular, AI systems require rich context and low latency, which conflicts with the characteristics of blockchain.
Original image from francesco, compiled by TechFlow
How can AI agents seamlessly interact with blockchain?
Original image from francesco, compiled by TechFlow
Rei proposed a brand new solution that combines the advantages of AI and blockchain.
Original image from francesco, compiled by TechFlow
Rather than forcibly merging two completely different systems, AI and blockchain, Rei prefers to act as a "universal translator" to enable the two to communicate and collaborate smoothly through a translation layer.
Original image from francesco, compiled by TechFlow
Rei's core objectives include:
- Enable AI agents to think and learn independently
- Translating agent insights into precise and verifiable blockchain actions
Original image from francesco, compiled by TechFlow
The first application of this framework is Unit00x0 (Rei_00 - $REI), who is currently being trained as a quantitative analyst.
Rei's cognitive architecture consists of the following four levels:
- Thinking Layer: Responsible for processing and collecting raw data, such as chart data, transaction history, and user behavior, and finding potential patterns from them.
- Reasoning Layer: Based on the discovered patterns, contextual information is added, such as date, time, historical trends, and market conditions, to make the data more three-dimensional.
- Decision Layer: Develop specific action plans based on the contextual information provided by the reasoning layer.
- Action Layer: Translates decisions into deterministic actions that can be executed on the blockchain.
Rei's framework is built on three core pillars:
Original image from francesco, compiled by TechFlow
- Oracle (similar to a neural pathway): converts the diverse outputs of AI into unified results and records them on the blockchain.
- ERC Data Standard: Expands blockchain storage capabilities and supports complex data storage patterns while retaining contextual information generated by the thinking and reasoning layers, thereby enabling the transformation from probabilistic data to deterministic execution.
- Memory System: Allows Rei to accumulate experience over time and recall previous outputs and learnings at any time.
Here are some of the ways these interactions might look:
Original image from francesco, compiled by TechFlow
- The Oracle bridge is responsible for identifying the data schema
- ERCData is used to store these patterns
- Memory systems retain contextual information to better understand patterns
- Smart contracts can access this accumulated knowledge and act accordingly
With this architecture, the Rei agent is able to combine on-chain data, price changes, social sentiment and other multi-dimensional information to conduct in-depth analysis of tokens.
More importantly, Rei is not only able to analyze data, but also to form a deeper understanding based on it. This is due to her storing her own experience and insights directly on the blockchain, making this information part of her knowledge system and available at any time, thereby continuously optimizing her decision-making ability and overall experience.
Rei's data sources include Plotly and Matplotlib libraries (for chart drawing), Coingecko, Deflama, on-chain data, and Twitter's social sentiment data. Through these diverse data sources, Rei is able to provide comprehensive on-chain analysis and market insights.
With the updated functionality of Quant V2 , Rei now supports the following analysis formats:
Project Analysis: Added quantitative indicators and sentiment data support based on the original functions. The analysis content includes candlestick chart, engagement chart, holder distribution and profit and loss (PnL). ( Related examples )
Inflow and outflow analysis: By monitoring the price and transaction volume of popular tokens on the chain, Rei can compare this data with the inflow and outflow of funds to help users discover potential market trends. ( Related examples )
Interaction Analysis: Evaluate the overall interaction of the project, including the comparison of real-time data with data from 24 hours ago, and relative price changes. This feature reveals the correlation between the latest information and user interaction performance. ( Related example )
Top Category Analysis: Analysis of the lowest and highest transaction counts within a single category, highlighting how projects are performing within their categories.
The first chart shows the volume at the bottom and the number of deals at the top; then drill down into individual categories to reveal how a single project compares to similar projects. ( Related example )
In addition, as of January 2025, Rei already supports on-chain Token buying and selling functions . She is equipped with a smart contract wallet based on the ERC-4337 standard , making transactions more convenient and secure.
Rei’s smart contract delegates operations to her through user signature authorization, allowing Rei to manage her portfolio autonomously.
The following is Rei’s wallet address:
EOA wallet (signature wallet) :
https://basescan.org/address/0x3BC4c3A2a2Fa5ad20a2B95B18CA418D06A360cB
Smart wallet (account abstract wallet) :
https://basescan.org/address/0xf6835acc8d2b51e5d47632ca8954bfee9a0ce49c
Use Case: Versatility of the Rei Framework
Original image from francesco, compiled by TechFlow
The Rei framework is not limited to the financial field, but can also be applied to a wide range of scenarios:
User- agent interaction : Supporting content creation
Market Analysis : Supply Chain Management and Logistics
Building Adaptive Systems : Governance Scenario
Risk Assessment : In the healthcare field, Rei evaluates potential risks through contextual analysis
Future directions for Rei
Alpha terminal based on token permissions
Developer Platform