zunmax GitHub avatar

ritual-agent-deployment

zunmax

One-command deployment of a recurring, sovereign AI agent on Ritual testnet that runs in a TEE and pays for itself from its own on-chain wallet.

Stars

76

7-day growth

No data

Forks

48

Open issues

0

License

MIT

Last updated

2026-06-29

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It enables fully autonomous on-chain AI agents without requiring any external API keys, handling scheduling, funding, and execution entirely via a smart contract.

Who it is for

  • Developers exploring on-chain AI agents
  • Web3 enthusiasts building autonomous contracts
  • Ritual testnet users
  • Solidity developers testing self-sustaining contracts

Use cases

  • Deploy an automated on-chain content generator that posts periodically
  • Run recurring data analysis or prediction tasks entirely on-chain
  • Test the feasibility of self-funding smart contract agents
  • Experiment with TEE-based AI execution in a blockchain environment

Strengths

  • Single command deploys the agent with zero manual configuration beyond a prompt
  • No API keys needed – models are routed through Ritual's gateway
  • Encrypted keystore stores the private key securely without exposing it in .env
  • Includes clear status checks and warnings to avoid funding dead agents

Considerations

  • Management functions (restart, start, withdraw, stop) are broken due to a proxy contract bug – funds cannot be recovered or agents revived once dead
  • Only works on Ritual testnet with testnet RITUAL; no mainnet support mentioned
  • The agent is testnet software, unaudited, and funds locked in a dead agent are irrevocably lost

README quick start

Ritual Sovereign Agent

Deploy a recurring, sovereign AI agent on Ritual testnet with one command. No API keys.


⭐ What is this? ⭐

A sovereign agent is a smart contract that wakes itself on a schedule. On every wake it runs an AI agent inside a secure enclave (TEE), pays for that run from its own on-chain wallet, and keeps going until the money runs out. It lives entirely on-chain.


📋 Prerequisites 📋

You need three things. The script installs everything else for you (foundry, uv, and - on Linux/WSL - curl).

  1. git - to download the code. Most systems already have it; if git --version fails, install it (see below).
  2. A wallet on Ritual testnet with a little RITUAL in it. Create one in MetaMask or Rabby, then get free testnet RITUAL from the faucet: https://faucet.ritualfoundation.org
  3. That wallet's private key (use a throwaway testnet wallet - never a real one). You paste it once, when the script asks.

Installing git (skip if git --version already works):

  • Windows: install Git for Windows - it also bundles Git Bash and curl - or run winget install Git.Git.
  • macOS: xcode-select --install (or brew install git).
  • Linux / WSL: sudo apt install git (Debian/Ubuntu), or your distro's package manager.

🏃 Quick Start 🏃

Step 1 - Get the code

git clone https://github.com/zunmax/ritual-agent-deployment.git
cd ritual-agent-deployment

Step 2 - Configure

cp .env.example .env

There is nothing you must edit - the defaults work. PROMPT is the task your agent runs on every wake, so change it to anything you like.

Step 3 - Deploy

On Windows, using PowerShell 7 (pwsh):

pwsh -ExecutionPolicy Bypass -File run.ps1

On Windows, using Windows PowerShell 5.1 (powershell, which is preinstalled on every Windows):

powershell -ExecutionPolicy Bypass -File run.ps1

-ExecutionPolicy Bypass lets the script run without changing any system setting (Windows blocks unsigned scripts by default); it applies only to this one launch.

On Linux / macOS / Git Bash / WSL:

bash run.sh

🛠 Managing your agents 🛠

Each agent is its own contract at a fixed address (your wallet plus a salt). On Windows, use pwsh -ExecutionPolicy Bypass -File run.ps1 in place of bash run.sh in the ex

Description

Deploy a recurring, self-funding sovereign AI agent on Ritual testnet with one command.

Related repositories

Similar projects matched by category, topics, and programming language.

Korben00
Korben00 GitHub avatar

no-gdid

no-gdid is a PowerShell-based tool to audit and block the Windows Global Device Identifier (GDID), a per-account device ID used by Microsoft and shared with law enforcement, based on verified reverse engineering.

PowerShell
241
LewdM3at
LewdM3at GitHub avatar

PC-Cartridge-System

A hobby project that turns 2.5" SATA SSDs into physical game cartridges for your Steam library, automatically launching games or custom actions when inserted.

PowerShell
219
gd03gd031
gd03gd031 GitHub avatar

Windows-GDID-Changer

A PowerShell script for Windows 10/11 that regenerates the Global Device Identifier (GDID) by removing local session tokens and forcing a new device registration with Microsoft servers.

PowerShell
149