Skip to main content

steward-sdk

If your agent pays anyone in USDC on Arc, put STEWARD in front of it: one contract call gives you per-payee caps + period limits + expiry the agent can't exceed, an on-chain decision log, and an escalation path. Ten lines.

Contracts + docs: https://github.com/big14way/steward (Tameion Agents Hackathon, Canteen × Circle × Arc).

TypeScript

npm i steward-arc-sdk viem
import { Steward } from "steward-arc-sdk";
import { privateKeyToAccount } from "viem/accounts";

const s = new Steward({
  allowanceManager: "0x…",   // the owner created an allowance for your agent address + the payee
  auditLog: "0x…",
  account: privateKeyToAccount(process.env.AGENT_PK as `0x${string}`),
});

// rules → canonical hash → AuditLog.record() → pay() | escalate()
const r = await s.decide({
  allowanceId: 0n, amount: 150_000_000n, memo: "logo v2",
  inputs: { milestone: "logo v2", evidence: "ipfs://…" }, evidence: true, screenOk: true,
  reason: "Milestone delivered with evidence; within per-tx and period caps.",   // your LLM's text, never an amount
});
console.log(r.action, r.hash, r.payTx ?? r.escalateTx);

What decide does: SCREEN_FAIL if screenOk === false · HOLD if evidence === false · ESCALATE if over the per-tx cap or no room · PARTIAL if only part fits (pays that part, escalates the rest under keccak256("STEWARD/remainder" ‖ hash)) · else PAY. Every outcome is record()ed on AuditLog with the keccak256 of a canonical JSON record you get back (r.canonical), so an auditor can replay it. A decision hash pays once, even if you retry. Arc's 20 gwei floor is handled.

Python

pip install steward-sdk
from steward_sdk import Steward

s = Steward(allowance_manager="0x…", audit_log="0x…", agent_private_key=os.environ["AGENT_PK"])
r = s.decide(allowance_id=0, amount=150_000_000, memo="logo v2",
             inputs={"milestone": "logo v2", "evidence": "ipfs://…"}, evidence=True, screen_ok=True)
print(r.action, r.hash, r.pay_tx or r.escalate_tx)

Agent on a Circle wallet (no raw key)

Most Arc agents sign with a Circle Developer-Controlled wallet. Pass the Circle client you already have instead of account; STEWARD sends record, pay and escalate through Circle's contract-execution API and waits for the on-chain hash. The allowance's agent must be that wallet's address. Same rules, same hashes.

import { initiateDeveloperControlledWalletsClient } from "@circle-fin/developer-controlled-wallets";
import { Steward } from "steward-arc-sdk";

const client = initiateDeveloperControlledWalletsClient({ apiKey: process.env.CIRCLE_API_KEY!, entitySecret: process.env.CIRCLE_ENTITY_SECRET! });
const s = new Steward({
  allowanceManager: "0x3AAfC635a1D1391c9FD8b5B9d8A518Fe980cb7E6",   // Arc Testnet
  auditLog: "0x89264D27AFbCb2Ac90b8a3802340C26Ea1326866",
  circle: { client, walletId: process.env.AGENT_WALLET_ID! },
});
const r = await s.decide({ allowanceId: 0n, amount: 150_000_000n, memo: "logo v2", inputs: { milestone: "logo v2" } });
# pip install "steward-sdk[circle]"
from circle.web3 import utils
from steward_sdk import Steward

client = utils.init_developer_controlled_wallets_client(api_key=os.environ["CIRCLE_API_KEY"], entity_secret=os.environ["CIRCLE_ENTITY_SECRET"])
s = Steward(allowance_manager="0x3AAfC635a1D1391c9FD8b5B9d8A518Fe980cb7E6", audit_log="0x89264D27AFbCb2Ac90b8a3802340C26Ea1326866",
            circle_client=client, circle_wallet_id=os.environ["AGENT_WALLET_ID"])
r = s.decide(allowance_id=0, amount=150_000_000, memo="logo v2", inputs={"milestone": "logo v2"})

Tested live on Arc Testnet with both SDKs (a HOLD recorded through a Circle wallet: TypeScript, Python).

Owner side

The owner (a Circle Developer-Controlled wallet in the reference app) calls create(agent, payee, capPerPeriod, perTxCap, period, expiry), fund(id, amount), approveAndPay(id, amount, hash) for escalations, and revoke(id) to pull unspent funds and lock the agent out. The reference FastAPI service + Telegram bot in the main repo does this with one tap.

Metadata

Release files for steward-sdk 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for steward-sdk 0.2.0
File Size Uploaded Provenance Actions
steward_sdk-0.2.0.tar.gz 7.0 kB Without provenance Details for steward_sdk-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for steward-sdk 0.2.0
File Interpreter ABI Platform Actions
steward_sdk-0.2.0-py3-none-any.whl Python 3 none any Details for steward_sdk-0.2.0-py3-none-any.whl

Total release size: 14.8 kB

Release files / steward_sdk-0.2.0.tar.gz

Download URL steward_sdk-0.2.0.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
27f498aa9862152360367c6c3dcf278ff31889085b2873311ca37e75d71fe658
BLAKE2b-256 checksum
How to use checksums
988598e9c9211021978d32508fb8252ebce47c66bad87d6fbb5937967cd2eba3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / steward_sdk-0.2.0-py3-none-any.whl

Download URL steward_sdk-0.2.0-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
750e463a3f0f5a8fd01672df2ca19db53e89d4c1d564d9551b9073898b7936b2
BLAKE2b-256 checksum
How to use checksums
5e4cd7ff32e80dd113088045df611c189103666d15a0b19f892a3cd979df102c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for steward-sdk 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page