How pacts work
The pact flow has three phases: propose, approve, operate.What a pact contains
For the conceptual overview of the four elements, see What is a pact. The following table maps those elements to PactSpec fields:Example PactSpec
A DCA trader pact that allows weekly $500 ETH purchases on Base for 3 months:Pact lifecycle
A pact moves through these states:
When a pact reaches any terminal state (
COMPLETED, EXPIRED, REVOKED), the delegation and its pact-scoped API key are both revoked. The runtime can no longer submit onchain operations.
Pact, delegation, and policy relationship
When you approve a pact, Cobo Agentic Wallet creates the underlying infrastructure automatically:Submit a pact
The example below submits a simple one-time transfer pact that allows a single USDC transfer of up to $101 on Base.- CLI
- Python SDK
- TypeScript SDK
--intent, --execution-plan, --policies, and --completion-conditions. The wallet UUID is resolved from the active wallet profile. The command prints a pact_id — save it to poll for approval and execute transactions.Wait for approval
After submission, the pact is inpending_approval state. If the wallet is paired with the Cobo Agentic Wallet app, the owner must approve it there. If the wallet is not yet paired, it activates automatically.
Poll until the status changes:
- CLI
- Python SDK
- TypeScript SDK
Handle rejection
If the owner rejects the pact, offer to resubmit with a narrower scope — lower spend cap, shorter duration, or a tighter allowlist.Check pact status
- CLI
- Python SDK
- TypeScript SDK
Revoke a pact
- CLI
- Python SDK
- TypeScript SDK
Approval experience
When your runtime submits a pact, the owner receives a notification in the Cobo Agentic Wallet app. The approval screen shows:- Intent — what the agent wants to do, in plain language
- Execution plan — the agent’s detailed strategy and steps, so you understand the reasoning
- Policy scope proposed — what transactions and contract calls the pact would allow in practice
- Spending rules — per-transaction limits, daily budgets, allowed chains and contracts
- Duration — how long the pact lasts
- Completion conditions — what triggers automatic completion
When to use pacts vs. manual delegation
Pact events
Every pact records lifecycle events that you can query:- CLI
- Python SDK
- TypeScript SDK
submitted, activated, rejected, completed, expired, revoked. Each event records a timestamp and relevant details.
Next steps
Once a pact is active, use it to execute transactions:Transfers
Submit token transfers under an active pact.
Contract calls
Call smart contracts under an active pact.
Policy Engine
Deep dive into policy rules — the spending limits enforced by pacts.