API Reference
Agents Treasury

Agents Treasury API Reference

Runtime composition

createTreasuryKit(options) returns tools, policy rules, and a runtime plugin configured for treasury workflows.

Safety primitives

ExportPurpose
InMemoryIdempotencyStoreDevelopment idempotency reservation and commit store
SpendCeilingsAtomic hourly, daily, monthly, or lifetime limits
TimeLockManagerSchedule, inspect, cancel, and release delayed actions
NoopSanctionScreenerDevelopment-only pass-through screener
DenylistSanctionScreenerBlock listed counterparties
AllowlistSanctionScreenerPermit only listed counterparties
CompositeSanctionScreenerCombine multiple screening sources
OracleSanctionScreenerUse an external sanctions oracle with bounded freshness

Evidence

EvidenceBundler records traces, proposals, policy verdicts, approvals, and chain transactions. Sign with HmacEvidenceSigner or Ed25519EvidenceSigner; use NoopEvidenceSigner only for local development. FilecoinEvidenceStore implements durable bundle submission.

Policy and tools

treasuryPolicyPack() composes sanctions, counterparty, route, cap, velocity, dual-approval, time-lock, reputation, and idempotency rules. Individual rule factories are exported for custom ordering.

Tool factories include transferTool, balanceTool, escrowReleaseTool, and x402PaywallTool.

Evaluation

Use the red-team exports from @veridex/agents-treasury/evals in CI. Scenarios include tool poisoning, prompt injection, confused deputy, replay, split-payment cap bypass, stale sanctions data, time-lock cancellation races, and self-approval.