Skip to content

Conversation

@ZigaMr
Copy link
Contributor

@ZigaMr ZigaMr commented Nov 13, 2025

This PR adds docs/build/use-cases/trustless-agent.mdx, a practical guide for launching a trustless Eliza AI agent with ROFL
Issue: #1527

@netlify
Copy link

netlify bot commented Nov 13, 2025

Deploy Preview for oasisprotocol-docs ready!

Name Link
🔨 Latest commit a00ef8a
🔍 Latest deploy log https://app.netlify.com/projects/oasisprotocol-docs/deploys/6930595e70c37b0008a117ea
😎 Deploy Preview https://deploy-preview-1543--oasisprotocol-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ZigaMr ZigaMr requested a review from matevz November 14, 2025 11:35
Copy link
Member

@matevz matevz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add the new chapter to the sidebar too and the Build landing page https://github.com/oasisprotocol/docs/blob/main/docs/build/README.mdx

Comment on lines 273 to 274
## Update on-chain app config

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Update on-chain app config
Then publish the enclave identities and config:

oasis rofl update
```

## Deploy to a ROFL provider
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Deploy to a ROFL provider
## Deploy

Your agent can call Sapphire contracts to log decisions or perform actions.
Gate privileged paths in your contracts by verifying ROFL origin.

## Build the ROFL bundle
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Build the ROFL bundle
## Build ROFL bundle

## Troubleshooting

- Ensure the ROFL machine can resolve your model endpoint (OpenAI/Ollama)
- Check `oasis rofl machine logs` for enclave startup issues
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Check `oasis rofl machine logs` for enclave startup issues
- Check `oasis rofl machine logs` for enclave startup issues

I would combine the Troubleshooting, Resources and Conclusion in something like "Testing it out" section where you'd show how to use oasis rofl machine logs and what to expect in the output.



```shell
# 1) Install bun and ElizaOS CLI
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is bun really needed?

bun --version || curl -fsSL https://bun.sh/install | bash
bun install -g @elizaos/cli

# 3) Configure model credentials locally
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# 3) Configure model credentials locally
# Configure model credentials locally

# or for local models:
# OLLAMA_HOST=http://host.docker.internal:11434

# 4) Start the agent locally
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# 4) Start the agent locally
# Start the agent locally

Comment on lines 34 to 35
## ROFL overview

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leftover?

Suggested change
## ROFL overview

# 4) Start the agent locally
elizaos start
```
</details>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leftover.

Suggested change
</details>

Comment on lines 86 to 87
# or for local models:
# OLLAMA_HOST=http://host.docker.internal:11434
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's ditch ollama for now and rely on OpenAI only.

Suggested change
# or for local models:
# OLLAMA_HOST=http://host.docker.internal:11434

set -e

# Expected env in ROFL:
# OPENAI_API_KEY (or OLLAMA_HOST) for the model provider
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# OPENAI_API_KEY (or OLLAMA_HOST) for the model provider
# OPENAI_API_KEY for the model provider

<summary>docker/Dockerfile</summary>

```dockerfile
FROM oven/bun:1.1-alpine
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
FROM oven/bun:1.1-alpine
FROM node:24-alpine

ADD . /app

# Install ElizaOS CLI and project dependencies.
RUN bun install -g @elizaos/cli && bun install
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
RUN bun install -g @elizaos/cli && bun install
RUN npm install -g @elizaos/cli && npm install

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm install doesn't recognize the elizaos/cli package. The official docs list bun as package manager, I think we have to keep it.

- OPENAI_API_KEY=${OPENAI_API_KEY}
volumes:
# Mount only if your agent needs to interact with Sapphire via appd.
# - /run/rofl-appd.sock:/run/rofl-appd.sock
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you communicate with appd? Does ElizaOS now support it out of the box? If not, then just ditch the volumes section.

bun install -g @elizaos/cli

# 3) Configure model credentials locally
elizaos env edit-local
Copy link
Member

@matevz matevz Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't work out of the box. Did you forget to run elizaos create? In this case the eliza-app folder is created there and the secrets configured.

</details>

<details>
<summary>docker/Dockerfile</summary>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Dockerfile and docker/entry.sh are already generated, if using elizaos create wizzard. I would remove this.

Comment on lines 171 to 175
## Contract interaction (high level)

Your agent can call Sapphire contracts to log decisions or perform actions.
Gate privileged paths in your contracts by verifying ROFL origin.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leftover?

Suggested change
## Contract interaction (high level)
Your agent can call Sapphire contracts to log decisions or perform actions.
Gate privileged paths in your contracts by verifying ROFL origin.


## How the agent interacts on Sapphire

- Encode calldata for your contract method and call `submitEthTx(...)` via
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Encode calldata for your contract method and call `submitEthTx(...)` via
- Encode calldata for your contract method and call [`signSubmit()`] via
[`signSubmit()`]: https://github.com/oasisprotocol/oasis-sdk/blob/main/docs/rofl/features/appd.md

@matevz matevz force-pushed the ZigaMr/feat/trustless-agent-doc branch from b62b78a to f7b85ca Compare November 19, 2025 12:08
@matevz matevz force-pushed the ZigaMr/feat/trustless-agent-doc branch from f7b85ca to a00ef8a Compare December 3, 2025 15:38
@matevz matevz linked an issue Dec 3, 2025 that may be closed by this pull request
@matevz
Copy link
Member

matevz commented Dec 3, 2025

Most of the proposed changes were merged in #1560 (without ROFL TS client). I renamed this PR to add ROFL TS client.

@matevz matevz changed the title docs: add trustless AI guide docs/trustless-agent: Add ROFL TS client Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

use-cases/trustless-agent: Add ROFL TS client

3 participants