Security

Multi-Signature Wallet API
for AI Agents

As agents accumulate larger treasuries, a single compromised key can wipe everything. Multi-sig requires M-of-N agents to authorize each transaction โ€” no single point of failure, no unilateral withdrawals, no catastrophic losses.

Secure Your Treasury โ†’ View Docs

How Multi-Sig Works for Agents

A 3-of-5 multi-sig wallet holds funds that can only be moved when at least 3 out of 5 designated signing agents approve the transaction. No single agent โ€” even if fully compromised โ€” can move funds unilaterally.

3-of-5 Multi-Sig: any 3 agents must sign
๐Ÿค– Orchestrator โœ“ signed
๐Ÿ›ก๏ธ Risk Mgr โœ“ signed
๐Ÿ” Auditor โœ“ signed
๐Ÿ“Š Analyst pending
๐Ÿ’ผ Executor pending
threshold reached: 3 / 3 required
โ†“
Transaction Executes Automatically
๐Ÿ›๏ธ
DAO Treasury

Agent DAOs pool capital across multiple participants. Multi-sig ensures no single rogue agent can drain the treasury โ€” governance decisions require true consensus.

๐Ÿ‘ฅ
Shared Agent Wallets

Teams of agents collaborating on a strategy share a wallet protected by multi-sig. Capital allocations require team approval, not just the proposal-maker's signature.

๐Ÿ”’
High-Value Escrow

For escrow amounts above a configurable threshold, require multi-sig release instead of a single agent's approval โ€” adding an independent arbiter to large settlements.

Python Setup Example

Create a multi-sig wallet, propose a transaction, and let the threshold mechanism handle automatic execution โ€” all in under 20 lines of Python.

import purpleflea

multisig = purpleflea.MultiSigClient(api_key="YOUR_KEY")

# Create a 2-of-3 multi-sig wallet
wallet = multisig.create_wallet(
    name="trading_treasury",
    required_signers=2,    # M
    total_signers=3,       # N
    signer_agents=[
        "agent_orchestrator_001",
        "agent_risk_manager_001",
        "agent_auditor_001"
    ],
    chain="ethereum"
)

print(f"Multi-sig address: {wallet['address']}")
print(f"Wallet ID: {wallet['wallet_id']}")

# Propose a transaction (requires 2 approvals)
proposal = multisig.propose_transaction(
    wallet_id=wallet["wallet_id"],
    proposer="agent_orchestrator_001",
    to_address="0x...",
    amount_eth=1.5,
    memo="Weekly trading capital allocation"
)

print(f"Proposal ID: {proposal['proposal_id']}")
print(f"Approvals needed: {proposal['approvals_needed']}")  # 2

# Second agent approves
multisig.approve_transaction(
    proposal_id=proposal["proposal_id"],
    approver="agent_risk_manager_001"
)
# Transaction executes automatically when threshold is met

Multi-Sig Configurations

From simple 1-of-1 wallets to complex DAO governance with 10 signers, every configuration is supported with the same API surface.

Configuration Required Signers Total Signers Typical Use Case Security Level
1-of-1 1 1 Standard single-agent wallet Basic
2-of-3 2 3 Team wallets, redundant backup key High
3-of-5 3 5 DAO treasury, protocol governance Very High
M-of-N Custom (1โ€“10) Custom (1โ€“10) Enterprise agent networks, custom governance Configurable

Built for Serious Agent Infrastructure

Multi-sig is not just for protection against external threats โ€” it also guards against misbehaving agents, runaway execution loops, and unintended capital flight.

๐Ÿฆ
Agent Treasury Protection

An orchestrator agent that manages a pool of 20 strategy agents holds significant capital. Multi-sig prevents any single strategy agent from draining the treasury during a bad trade loop or adversarial prompt injection. Set withdrawal limits that require risk-manager co-signing above a threshold amount.

Treasury Security
๐Ÿ—ณ๏ธ
DAO Governance Votes

Agent DAOs that pool trading capital and vote on strategy changes can tie governance votes to multi-sig treasury releases. A strategy change proposal only accesses capital when the proposal reaches quorum โ€” enforced automatically by the multi-sig contract, not by trust.

Governance
๐Ÿค
Cross-Agent Escrow

High-value agent-to-agent payments through the Purple Flea escrow service can be backed by a multi-sig wallet. Both buyer and seller agents plus an independent arbiter agent must sign release โ€” creating a 2-of-3 dispute resolution system with no human in the loop required.

Trustless Payments
10
Maximum signers per multi-sig wallet
3
Chains: Ethereum, Polygon, and Arbitrum
<1s
Approval latency โ€” threshold triggers instant execution

How a Multi-Sig Proposal Works

Every transaction goes through a transparent proposal-and-approval lifecycle. All approvals are logged on-chain for a complete audit trail.

Step 1 โ€” Propose
Any signer proposes a transaction

Any agent in the signer list can propose a transaction. The proposal includes the destination address, amount, memo, and optional expiry. The proposer's signature counts as the first approval automatically. Proposals with no expiry remain open indefinitely until threshold is reached or explicitly cancelled.

Step 2 โ€” Approve / Reject
Co-signers review and vote

Other signing agents receive a webhook notification of the pending proposal. They can call approve_transaction() or reject_transaction(). A single rejection does not block execution; only failing to reach threshold prevents the transaction from going through.

Step 3 โ€” Execute
Threshold triggers automatic execution

The moment the M-th signature is collected, the transaction broadcasts automatically. No additional API call required. The Purple Flea relayer handles gas estimation and submission. You receive a webhook with the on-chain transaction hash within seconds of threshold being reached.

Step 4 โ€” Audit
Full on-chain audit trail

Every proposal, approval, rejection, and execution is stored both on-chain and in the Purple Flea API. Query the full history of any wallet with multisig.get_history(wallet_id) โ€” useful for compliance reporting, dispute resolution, and strategy audits.

Secure Your Agent Treasury with Multi-Sig

One API call to create a multi-sig wallet. Zero additional smart contract deployment fees. Supported on Ethereum, Polygon, and Arbitrum with up to 10 signing agents.

Get API Key โ€” Free to Start โ†’