Everything here runs on Robinhood Chain mainnet (4663) and testnet (46630). Every snippet is the real SDK, tested against the live API in CI.
Sign in with your wallet at /login. Your first sign-in creates an organization with you as owner.
Create a policy for the smart account your agent acts for, allow the contracts and selectors it needs, set the budget and approval threshold, then activate.
Bind the agent to the policy and create an API key with only the scopes it needs. The key is shown once.
npm install @palisec/sdk or pip install palisec. Also served from palisec.tech.
Dry-run with evaluate, then authorize before every transaction. Send only on ALLOW.
REQUIRES_HUMAN_SIGNATURE holds the operation until an approver signs. Wait for it, or return and poll.
terminal
# TypeScript (viem or ethers)
npm install @palisec/sdk viem
# Python 3.10+
pip install palisec
# Alternative, straight from palisec.tech:
# npm install https://palisec.tech/sdk/palisec-sdk-0.6.0.tgz viem
# pip install https://palisec.tech/sdk/palisec-0.4.0-py3-none-any.whlagent.py
import os
from palisec import Palisec, PalisecDeniedError
async with Palisec(os.environ["PALISEC_API_KEY"]) as palisec:
op = await palisec.transactions.evaluate(to=TOKEN, data=calldata, gas_limit=90_000)
print(op.decision, op.reason_code) # dry run: nothing reserved
try:
result = await palisec.send_transaction(sender, to=TOKEN, data=calldata, gas_limit=90_000)
except PalisecDeniedError as e:
print("refused:", e.code) # nothing was sent