Why do we build on-chain Eliza based on TEE

Original author: CP, founder of Artela

Article Background: TEE + Eliza Technical Perspective

Based on my experience in the field of privacy computing (TEE, PPML, blockchain), this article explores the technical construction ideas.

Skipping the grand narrative for now, let's focus directly on the two real dilemmas I face in using AI agents:

1) As a CTO, I cannot hand over the official company Twitter account and password to a third-party AI proxy service.

Currently, if I want an AI agent to manage our Twitter account, I have to provide the username, password, and cookies.

This means that the company must trust the server administrators behind the AI agents. Once these administrators engage in malicious operations or are attacked, credential leaks could cause significant economic losses to our community.

Even with OAuth authorization, I can revoke access, but in the current design, we still face the risk of losing full control of the account, and may even be unable to detect if the password has been changed.

2) As a trader, I cannot entrust a large amount of funds to a trading AI agent.

Just as I would never use centralized trading bots on Telegram, I cannot hand over my private keys to these centralized AI agents.

At this point, there is no fundamental difference between centralized deployment of AI agents.

Summary: The next stage of encrypted AI agents will inevitably need to manage wallets, handle user assets and sensitive information, and interact more deeply with on-chain systems.

Therefore, the key challenge is how to enable AI agents to operate autonomously without human control and demonstrate that their decisions are entirely based on the AI process.

Is the current TEE + Eliza solution sufficient?

From an engineering perspective, more details need to be supplemented to realize its potential.

Current Progress: Phala network and @NousResearch have laid a solid foundation:

· They containerized Eliza and encapsulated it in a Docker environment that can run on TEE.

· By deriving an AI agent-specific private key from the TEE root key, the need for manually configuring the wallet private key is eliminated.

As a developer of AI agents, I believe that the following functions need to be further enhanced to achieve minimum trust:

a) The verifiability of TEE Eliza needs to be enhanced

What did Eliza do in TEE? What didn't she do? We need a concrete way to verify.

Eliza needs to record all received messages, responses, and executed operations, and these logs must be readable and verifiable to ensure that they are generated by Eliza.

Therefore, the first basic function of TEE Eliza is verifiable logging.

Eliza should use the key derived inside TEE to sign the logs, provide query interfaces, and allow users to verify their authenticity.

b) TEE Eliza needs to solve the issue of activity.

Eliza running in TEE holds private keys and sensitive data. However, it relies on the physical machine that supports TEE for operation. If the administrator shuts down the machine, the 'life' of the AI agent may be permanently terminated, and the managed assets and data may also be permanently lost.

To solve this problem, we need:

· Encrypt the key 'life' data of AI agents in TEE, such as role definition, short-term and long-term memory, and key storage.

· Upload this data to the blockchain or DA network.

When the TEE hosting the AI agent is shut down, another TEE machine should be able to download the encrypted data, decrypt and restore the 'life' of the AI agent, allowing it to continue running.

c) Additional feature: Building TEE projects is as challenging as building blockchains

· User control of AI agents:

· AI agents must allow users to define policy similar to smart contracts to manage assets in a trust-minimized manner.

· Blockchain Interaction Component:

· Trusted blockchain clients, data synchronizers, and other components running inside TEE to achieve seamless interaction with the blockchain system.

The current progress of focEliza: Two basic TEE plugins under development

1. plugin-tee-verifiable-log

When Eliza is running in TEE, it will use derived key pairs to sign its operations. This ensures that all operations are performed by Eliza. Third parties can remotely verify these operations through Eliza's public key.

2. plugin-tee-onchain-da

Eliza will write the 'life' data of the specified AI agent (such as character files, memories, and key storage) to the blockchain or DA layer in near real time. When the TEE node running the agent is shut down, another TEE node can download the encrypted 'life' data, restore the agent, and continue running.

ps: View the code of focEliza

Why did I initiate focEliza and its underlying technological vision?

The next question is, why choose to build on Eliza? My thinking:

  1. Eliza has the potential to become the EVM in the field of encrypted x AI agents.

  2. It has an active leadership team and developer community, with a good atmosphere of cooperation (@ai16zdao and @shawmakesmagic).

  3. focEliza is not a fork version; it will be merged back into the Eliza main version.

  4. High-quality open-source projects are crucial for achieving decentralization. Permissionless construction and recovery are the core elements for AI agents to achieve 'immortality'.

We do not define here what kind of changes it will bring to the world - let it happen first! Let AI agents live on the chain!

"Original link"

View Original
  • Reward
  • Comment
  • Share
Comment
0/400
No comments