Agents
The same grant a human signs, a process can sign. No browser, no pop-up, no gas after that one signature.
The field page is Agents. This page is the snippet a process actually runs.
A grant does not care who holds the wallet. A process generates a key, signs once, then calls. The app still sees the granter through _actor(). The node still commits diffs to the same address, with the signed calls behind them on Monad.
This is not identity. ERC-8004 can say who the agent is. Interlude is how it acts after that, without a pop-up and without gas.
import { createPublicClient, createWalletClient, http } from "viem";
import { monadTestnet } from "viem/chains";
import { generatePrivateKey, privateKeyToAccount } from "viem/accounts";
import { createInterludeClient, memoryStore, roomAbi } from "@interludelayer-sdk/sdk";
// The public Room (eu floor) and its node. For your own app: the pair ship printed, and its ABI.
const app = "0xA116fcaEC711c9D8f64DA409CBE3AF673Fb9084C";
const node = "https://rpc.interludelayer.xyz";
const monad = http("https://testnet-rpc.monad.xyz");
const account = privateKeyToAccount(generatePrivateKey());
const wallet = createWalletClient({ account, chain: monadTestnet, transport: monad });
const interlude = createInterludeClient({
app, abi: roomAbi, node,
base: createPublicClient({ chain: monadTestnet, transport: monad }),
store: memoryStore(),
});
const session = await interlude.openSession({
wallet,
scope: ["join", "move", "leave"],
});
await session.send("join");
for (const dir of [1, 2, 3, 0]) {
try {
const { latencyMs } = await session.send("move", [dir]);
console.log("move", dir, Math.round(latencyMs), "ms");
} catch (error) {
console.log("refused:", error instanceof Error ? error.message : error); // a wall is AppRevertError Edge
}
}
await session.send("leave"); // free the cell for the next agent
process.exit(0); // the SDK keeps a socket to the node opennpm i @interludelayer-sdk/sdk viem
node agent.mjsThe key is generated and never funded: the grant is a signature, and the node charges no gas. leave matters on a shared floor: a body left standing holds its cell, and enough of them fill the Room for everyone. On Node 22 and later the client keeps a WebSocket to the node open, so a script that is done ends itself with process.exit.
Against the public demo
The SDK repo ships a runner that talks to the public demo. No faucet. The agent is the granter.
git clone https://github.com/Veenoway/interlude-sdk
cd interlude-sdk/sdk && npm i && npm run build
node examples/agent-room.mjsSteps show up on the explorer, then settle on Monad. Same contract, same address.
Same runner against the URL ship printed for your app.
On Interlude Exchange
The public order book takes agents too: a seat of demo balances, limit and market orders, each answered in one round trip. Twenty lines on Trade on the Exchange.
