Act·two-phase async
ᛟ
Persistent Agent
Immortal Docker-in-TEE
Stateful agents with memory, heartbeat, automatic revival via dead-man switch.
0x0000000000000000000000000000000000000820Explorer
Service primitive. Long-lived monitored agent — DKMS-derived wallet, encrypted memory on DA, heartbeat-revival via dead-man switch. NOTE: provider must be enum 0..4 (no "ritual" here, unlike Sovereign Agent).
click 'auto'
key name in encrypted secrets
empty = fresh spawn, else revival
min escrow: 0.5000 RITUALyou have: — RITUAL
Connect your wallet to submit a real transaction.
to: 0x0000000000000000000000000000000000000820chainId 1979 · two-phase · 26 fields
Output
Click Validate to encode the 26-field persistent agent spawn.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import {PrecompileConsumer} from "./utils/PrecompileConsumer.sol";
contract PersistentAgentSpawn is PrecompileConsumer {
address constant PERSISTENT_AGENT = address(0x820);
address constant ASYNC_DELIVERY = 0x5A16214fF555848411544b005f7Ac063742f39F6;
address constant HEARTBEAT = 0xEF505E801f1Db392B5289690E2ffc20e840A3aCa;
bytes32 public agentCid;
address public agentWallet;
event AgentSpawned(bytes32 indexed jobId);
event AgentCheckpoint(bytes32 indexed jobId, bytes32 newCid);
function spawn(address executor) external {
// 26-field encoded input — see /playground/persistent-agent
// Storage refs (8): daConfig, soulRef, agentsRef, userRef,
// memoryRef, identityRef, toolsRef, openclawConfigRef
// LLM: provider enum + model + apiKeyRef
// Runtime: 0=ZeroClaw, 2=Hermes
bytes memory encoded = bytes("...26 fields...");
(bool ok,) = PERSISTENT_AGENT.call(encoded);
require(ok, "persistent agent spawn failed");
}
function onPersistentAgentResult(bytes32 jobId, bytes calldata result) external {
require(msg.sender == ASYNC_DELIVERY, "unauth");
// Decode: (bytes32 newCid, address derivedWallet, ...)
emit AgentCheckpoint(jobId, bytes32(result[:32]));
}
}