
{"id":174096,"date":"2026-06-03T08:24:43","date_gmt":"2026-06-03T08:24:43","guid":{"rendered":"https:\/\/mycryptomania.com\/?p=174096"},"modified":"2026-06-03T08:24:43","modified_gmt":"2026-06-03T08:24:43","slug":"guide-to-deploying-a-trustless-eliza-agent-with-oasis-rofl","status":"publish","type":"post","link":"https:\/\/mycryptomania.com\/?p=174096","title":{"rendered":"Guide To Deploying A Trustless Eliza Agent With Oasis ROFL"},"content":{"rendered":"<p>Oasis introduced the framework for runtime off-chain logic (ROFL) to help build and run apps off-chain while ensuring privacy and maintaining trust with on-chain verifiability. For most people, this <a href=\"https:\/\/www.youtube.com\/watch?v=JFYnEyMFgRE\">explainer video<\/a> would be enough. But for developers and dApp builders, who want to try things out themselves, a deeper dive is worth\u00a0it.<\/p>\n<p>In this tutorial, I will demonstrate how to build and deploy a trustless Eliza agent with Oasis\u00a0ROFL.<\/p>\n<h3>Objective<\/h3>\n<p>The objective is to have a working Eliza agent running inside a ROFL Trusted Execution Environment (TEE). I will also show how to get it registered and validated as a trustless agent in the <a href=\"https:\/\/eips.ethereum.org\/EIPS\/eip-8004\">ERC-8004<\/a> registry. The agent\u2019s code will be fully auditable, and anyone can verify the authenticity of the origin of the deployed instance, which is immutable and tamper-proof.<\/p>\n<h3>Prerequisites<\/h3>\n<p>Refer to the prerequisite section in the <a href=\"https:\/\/medium.com\/coinmonks\/how-to-enhance-your-app-with-oasis-rofl-a-quickstart-tutorial-e0eaf729c1be\">ROFL quickstart tutorial<\/a> for setup details.<br \/>So, right now, we need these to get\u00a0started.<\/p>\n<p><strong>Docker<\/strong> (or Podman) with credentials. It can be on docker.io, ghcr.io, or any other public OCI registry.<strong>Oasis CLI<\/strong> and at least <strong>120 TEST<\/strong> tokens in your wallet. Since we are building in the testnet environment, you can get these tokens for free from the <a href=\"https:\/\/faucet.testnet.oasis.io\/\">official\u00a0faucet<\/a>.<strong>Node.js 22+<\/strong>. It is for Eliza and helper\u00a0scripts.<strong>OpenAI API\u00a0key<\/strong><strong>RPC URL<\/strong>. It is to access the ERC-8004 registry (e.g.\u00a0Infura).<strong>Pinata JWT<\/strong>. It is to store agent information in\u00a0IPFS.At least <strong>2 GiB of memory<\/strong> and <strong>10 GB of\u00a0storage<\/strong>.<\/p>\n<h3>Eliza Agent\u00a0Creation<\/h3>\n<p>The first step is to initialize a project using the ElizaOS CLI. Next, prepare it for\u00a0ROFL.<\/p>\n<p># Install bun and ElizaOS CLI<br \/>bun &#8211;version || curl -fsSL https:\/\/bun.sh\/install | bash<br \/>bun install -g @elizaos\/cli<\/p>\n<p># Create and configure the agent<br \/>elizaos create -t project rofl-eliza<br \/># 1) Select Pqlite database<br \/># 2) Select the OpenAI model and enter your OpenAI key<\/p>\n<p># Test the agent locally<br \/>cd rofl-eliza<br \/>elizaos start<br \/># Visiting http:\/\/localhost:3000 with your browser should open Eliza UI<\/p>\n<h3>Containerize<\/h3>\n<p>In this step, you will need to containerize both the app and the ERC-8004 wrapper. <br \/>You will notice that the Eliza agent startup wizard has already generated:<\/p>\n<p><strong>Dockerfile<\/strong>\u200a\u2014\u200athis packs your agent into a container.<strong>docker-compose.yaml<\/strong>\u200a\u2014\u200athis automatically configures, connects, and manages the interdependent <strong>postgres<\/strong> and <strong>elizaos<\/strong> containers.<\/p>\n<p>The next step is to make some changes to <strong>docker-compose.yaml<\/strong>.<\/p>\n<p>In the PostgreSQL section, you need to replace relative <strong>image: ankane\/pgvector:latest<\/strong> with <strong>image: docker.io\/ankane\/pgvector:latest<\/strong>.You need to name the <strong>elizaos<\/strong> image with a corresponding absolute path, e.g. <strong>image: docker.io\/YOUR_USERNAME\/elizaos:latest<\/strong>.You need to register the Eliza agent as a trustless agent in the ERC-8004 registry using the <a href=\"https:\/\/github.com\/oasisprotocol\/erc-8004\"><strong>rofl-8004<\/strong><\/a> snippet. Ensure that the environment variables are mapped as\u00a0is.<\/p>\n<p><strong>docker-compose.yaml<\/strong><\/p>\n<p>  rofl-8004:<br \/>    image: ghcr.io\/oasisprotocol\/rofl-8004@sha256:f57373103814a0ca4c0a03608284451221b026e695b0b8ce9ca3d4153819a349<br \/>    platform: linux\/amd64<br \/>    environment:<br \/>      &#8211; RPC_URL=${RPC_URL}<br \/>      &#8211; PINATA_JWT=${PINATA_JWT}<br \/>    volumes:<br \/>      &#8211; \/run\/rofl-appd.sock:\/run\/rofl-appd.sock<\/p>\n<p>The validation flow looks something like\u00a0this:<\/p>\n<p>Once you have edited <strong>docker-compose.yaml<\/strong>, it is time to build and\u00a0push.<\/p>\n<p>docker compose build<br \/>docker compose push<\/p>\n<p>If you are looking for full verifiability, you need to pin the digest by appending <strong>image:\u00a0\u2026<\/strong><a href=\"https:\/\/dev.to\/sha256\"><strong>@sha256<\/strong><\/a><strong>:\u2026<\/strong> to all images in <strong>docker-compose.yaml<\/strong>.<\/p>\n<h3>Init &amp;\u00a0Create<\/h3>\n<p>Once all previous steps are complete, you will find that the agent is running in a container within a TEE. In this setup, ROFL handles the startup attestation of the container and the secrets in the form of environment variables. As a result, the TEE is completely transparent to the Eliza agent\u00a0app.<\/p>\n<p>oasis rofl init<br \/>oasis rofl create &#8211;network testnet<\/p>\n<p>You can check out on-chain activity and app details in the <a href=\"https:\/\/explorer.oasis.io\/testnet\/sapphire\">Oasis Explorer<\/a>.<\/p>\n<h3>Build ROFL\u00a0bundle<\/h3>\n<p>This is where the memory and storage prerequisites come in handy.<br \/> First, you need to update the resources section.<\/p>\n<p><strong>rofl.yaml<\/strong><\/p>\n<p>resources:<br \/>  memory: 2048<br \/>  cpus: 1<br \/>  storage:<br \/>    kind: disk-persistent<br \/>    size: 10000<\/p>\n<p>Now, you can build the ROFL bundle by invoking this\u00a0command.<\/p>\n<p>oasis rofl build<\/p>\n<h3>Secrets<\/h3>\n<p>In this step, we take care of encryption. It involves:<\/p>\n<p>End-to-end encrypting of <strong>OPENAI_API_KEY<\/strong> and storing it on-chain.Providing the <strong>RPC_URL<\/strong> and <strong>PINATA_JWT<\/strong> values for ERC-8004 registration.echo -n &#8220;&lt;your-openai-key-here&gt;&#8221; | oasis rofl secret set OPENAI_API_KEY &#8211;<br \/>echo -n &#8220;https:\/\/sepolia.infura.io\/v3\/&lt;YOUR_KEY&gt;&#8221; | oasis rofl secret set RPC_URL &#8211;<br \/>echo -n &#8220;&lt;your-pinata-key-here&gt;&#8221; | oasis rofl secret set PINATA_JWT &#8211;<\/p>\n<p>Then comes the important step of storing the secrets as well as the previously built enclave identities on-chain.<\/p>\n<p>oasis rofl update<\/p>\n<h3>Deploy<\/h3>\n<p>This completes the building of the Eliza agent. Now, we need to deploy it to an ROFL provider.<\/p>\n<p>oasis rofl deploy<\/p>\n<p>The Oasis-maintained provider is selected on Testnet, which rents a node for 1 hour by default. You can extend the rental period for more hours, say for 6 hours, by invoking <strong>oasis rofl machine top-up\u200a\u2014\u200aterm hour\u200a\u2014\u200aterm-count 6<\/strong>\u00a0<a href=\"https:\/\/docs.oasis.io\/build\/tools\/cli\/rofl#deploy\">command<\/a>.<\/p>\n<h3>Test<\/h3>\n<p>You have successfully built and deployed your very own Eliza agent. You can test if it is running properly with this CLI\u00a0check.<\/p>\n<p># Show machine details (state, proxy URLs, expiration).<br \/>oasis rofl machine show<\/p>\n<p>A successful agent boot means the <strong>Proxy:<\/strong> section will show the URL where the agent is accessible. So, for example, if it\u00a0shows:<\/p>\n<p>Proxy:<br \/>  Domain: m1058.opf-testnet-rofl-25.rofl.app<br \/>  Ports from compose file:<br \/>    3000 (elizaos): https:\/\/p3000.m1058.opf-testnet-rofl-25.rofl.app<\/p>\n<p>In this case, the app would be accessible at <a href=\"https:\/\/p3000.m1058.opf-testnet-rofl-25.rofl.app\/\"><strong>https:\/\/p3000.m1058.opf-testnet-rofl-25.rofl.app<\/strong><\/a>.<\/p>\n<h3>ERC-8004 Registration and Validation<\/h3>\n<p>This is not an automatic step and needs to be completed to get this Eliza agent registered and validated as a trustless agent in the ERC-8004 registry. When you are running the agent for the first time, the <strong>rofl-8004<\/strong> service will derive the Ethereum address for registering it. To go ahead, you will need to fund that account with some ETH to pay for the gas\u00a0fees.<\/p>\n<p>Use this command to fetch your app\u00a0logs.<\/p>\n<p>oasis rofl machine logs<\/p>\n<p>The <strong>Please top it up<\/strong> line will show the derived address. After funding it, your agent is registered and validated, and ready to\u00a0go.<\/p>\n<p><strong>Please note<\/strong>: All logs here are accessible to the app admin, as they are stored <strong>unencrypted on the ROFL node<\/strong>. So, remember not to put any private information here.<\/p>\n<h3>Demo<\/h3>\n<p>This guide shows how you can build your own agent, but if you need to check out a full-fledged demo of how it looks and works, there is an example in the official Oasis repository.<br \/><a href=\"https:\/\/github.com\/oasisprotocol\/demo-trustless-agent\"><strong>Trustless Agent\u00a0Demo<\/strong><\/a><\/p>\n<p>For a quick chat with the Oasis engineering team for help with specific issues, you can drop your comments in the <strong>dev-central channel<\/strong> in the official\u00a0<a href=\"https:\/\/discord.com\/invite\/BQCxwhT5wS\">Discord<\/a>.<\/p>\n<p><em>Originally published at <\/em><a href=\"https:\/\/dev.to\/dc600\/guide-to-deploying-a-trustless-eliza-agent-with-oasis-rofl-48hh\"><em>https:\/\/dev.to<\/em><\/a><em> on May 28,\u00a02026.<\/em><\/p>\n<p><a href=\"https:\/\/medium.com\/coinmonks\/guide-to-deploying-a-trustless-eliza-agent-with-oasis-rofl-50c3f26c6843\">Guide To Deploying A Trustless Eliza Agent With Oasis ROFL<\/a> was originally published in <a href=\"https:\/\/medium.com\/coinmonks\">Coinmonks<\/a> on Medium, where people are continuing the conversation by highlighting and responding to this story.<\/p>","protected":false},"excerpt":{"rendered":"<p>Oasis introduced the framework for runtime off-chain logic (ROFL) to help build and run apps off-chain while ensuring privacy and maintaining trust with on-chain verifiability. For most people, this explainer video would be enough. But for developers and dApp builders, who want to try things out themselves, a deeper dive is worth\u00a0it. In this tutorial, [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":174097,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-174096","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-interesting"],"_links":{"self":[{"href":"https:\/\/mycryptomania.com\/index.php?rest_route=\/wp\/v2\/posts\/174096"}],"collection":[{"href":"https:\/\/mycryptomania.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mycryptomania.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/mycryptomania.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=174096"}],"version-history":[{"count":0,"href":"https:\/\/mycryptomania.com\/index.php?rest_route=\/wp\/v2\/posts\/174096\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mycryptomania.com\/index.php?rest_route=\/wp\/v2\/media\/174097"}],"wp:attachment":[{"href":"https:\/\/mycryptomania.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=174096"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mycryptomania.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=174096"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mycryptomania.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=174096"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}