Skip to main content
Here is what happens when an AI agent sends a transaction through a Functor-protected smart account.

Setup (one-time)

Before the agent can transact, the developer configures the account: The developer has configured:
  • Spending limit: 1000 USDC per day
  • Allowed contracts: Uniswap Router only
  • Rate limit: 10 transactions per hour

The transaction

The agent wants to swap 500 USDC for ETH on Uniswap.

Step 1: Agent signs

The agent signs a UserOp with its session key. The UserOp contains the swap calldata targeting the Uniswap Router.

Step 2: Signature validation

The validator confirms: this is keyId 0xabc, the signature is valid, and the key is active in the KeyStore.

Step 3: Policy enforcement (preCheck)

Step 4: Execution

The smart account executes the Uniswap swap. 500 USDC leaves the account, ETH arrives.

Step 5: Post-execution verification (postCheck)

What each component did

ComponentRole
KeyStoreConfirmed keyId 0xabc is active and valid
WebAuthnValidatorVerified the P-256 signature against the KeyStore
FunctorPolicyHook (pre)Enforced all policies, collected fee, cached state
Smart AccountExecuted the Uniswap swap
FunctorPolicyHook (post)Updated counters, verified outcome, emitted audit event

What if a policy fails?

If the agent had already spent 800 USDC today:
Policy: spending_limit
800 + 500 = 1300 > 1000 daily limit
→ REVERT
→ Transaction never executes
→ No fee charged
→ FunctorTxBlocked event emitted with reason
The agent’s funds stay safe. The developer sees the blocked attempt in the dashboard.