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)

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.1.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.1.0
File Size Uploaded Provenance Actions
steward_sdk-0.1.0.tar.gz 4.5 kB Without provenance Details for steward_sdk-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 9.6 kB

Release files / steward_sdk-0.1.0.tar.gz

Download URL steward_sdk-0.1.0.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6a56850148a462cfd5017646b3349ac794e174ef2a1b6fe1b5675d5d4e449843
BLAKE2b-256 checksum
How to use checksums
c46c48ee5214a7141492cff6fc09eda448c751b15f58974f1d9bb9190e8ad5a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

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

Download URL steward_sdk-0.1.0-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
993e0cbe988fdc3502fc2a4be22900a44480b43c87e0f1d5042b26043f9e396c
BLAKE2b-256 checksum
How to use checksums
bb51563cfd5f823c9552bcac24b3f152e485e6bfba49da95e9d34351d7ad555c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for steward-sdk 0.1.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.1.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