Skip to content
OFFICIAL CA0xdafaa1ed0b9f5746a0cfa2be80371cf06a986977

Documentation

ElizaOS plugin

npm: @upoch/plugin-elizaosElizaOS 1.7+

Add one plugin to an ElizaOS character: every swap, transfer or trade is checkpointed before and after it runs, and the agent can roll back to the last good state.

What it does

  • Automatic checkpoints. Before and after every consequential action (swaps, transfers, bridges, staking, lending, trades, mints, launches and approvals), the plugin saves a verified checkpoint on Robinhood Chain, with the transaction hash when there is one. No code changes.
  • Recovery on start. When the agent starts, it restores its last checkpoint after checking it against the chain, and knows which actions already happened.
  • Rollback. “That swap was wrong, roll back” takes the agent back to the checkpoint right before the last swap, or to one you name (“roll back to #12”), and it continues from there.
  • Every checkpoint opens in the Time-Travel Debugger.

Setup

Once, in your own terminal (Node.js 24 or later):

terminal
npm install -g @upoch/guard
upoch setup                      # keys, funding, registration

upoch setup creates two keys on your machine: the owner, which registers the agent, and the executor, the agent's key, which can only submit checkpoints. It waits while you send the owner a little ETH on Robinhood Chain (0.001 ETH is plenty), then registers the agent and gives the executor gas for checkpoints. Then add the plugin to your character:

character.ts
// npm install @upoch/plugin-elizaos
export const character = {
  name: "Trader",
  plugins: ["@elizaos/plugin-evm", "@upoch/plugin-elizaos"],
};

Rollback

A rollback verifies the earlier checkpoint, saves it again as the latest one with your reason, and the agent continues from it. It restores the agent's state and memory; it cannot reverse transactions that already happened on-chain. The agent is told which actions ran after that checkpoint and were not undone, so it can account for them, and that list is saved in the rollback checkpoint, so it survives a restart.

Settings

SettingDefault
UPOCH_HOME~/.upochFolder created by upoch setup
UPOCH_WATCH_ACTIONSvalue-moving actionsComma-separated action names to checkpoint around
UPOCH_AUTO_CHECKPOINTtrueTurn automatic checkpoints off and use the actions only
UPOCH_STRICTfalseStop an action when its pre-action checkpoint fails

The plugin adds the actions UPOCH_ROLLBACK, UPOCH_CHECKPOINT and UPOCH_STATUS, and the UPOCH_GUARD provider. If Upoch is not set up, the plugin stays off and the agent runs normally.

Safety

  • Each checkpoint is one transaction from the executor key, with a daily limit (100 by default, maxCheckpointsPerDay in ~/.upoch/config.json).
  • State that looks like private keys, seed phrases or API tokens is refused before anything is stored: checkpoints are permanent.
  • Keys stay on your machine in ~/.upoch/secrets.json, unencrypted (owner-only permissions on macOS and Linux). Back it up, and keep only small amounts on these keys.
  • The Upoch contracts have not been audited.