The threat model
An autonomous agent that holds a private key to a funded wallet is a single point of failure in three distinct ways:- Prompt injection — something in the agent’s input convinces it to construct and sign a transaction its operator never intended.
- Logic errors — a bug or a bad model output computes a wrong amount or a wrong recipient.
- A compromised framework — a vulnerability in whatever orchestrates the agent (LangChain, an MCP server, a custom runner) leaks the key outright.
Separating ownership from execution authority
The agent never receives funds, never holds an SPL token delegate authority, and never has any on-chain permission beyond “may call Shugo’sexecute_pull instruction.” The actual authority to move tokens belongs to a Policy PDA — an account Shugo’s program controls, with no private key at all.
The human grants that authority exactly once, by creating a real Subscriptions & Allowances FixedDelegation and naming the Policy PDA’s own address as delegatee:
From that point on, S&A will only honor a transfer_fixed call where the signer matches the address on file as delegatee — the Policy PDA. The agent’s own keypair is never that signer. The only way to produce a valid signature from the Policy PDA is invoke_signed from inside Shugo’s own program, which only happens after execute_pull’s policy checks pass. An agent with a leaked key, a bad prompt, or a wrong computed amount can sign all the transactions it wants — none of them can move a token unless they go through execute_pull, and execute_pull enforces the policy regardless of what the agent asked for.
Instant revocation
Shugo adds a kill switch S&A doesn’t have on its own. A delegation itself can only be revoked through S&A’s own instructions, one delegation at a time — fine for a single relationship, unwieldy if a human has granted several delegations to the same agent across different mints or policies.set_paused is Shugo’s answer: one instruction, one signature from the human, and every future execute_pull against that policy is denied immediately — checked before anything else, including the amount or the destination.
AnchorError: Paused), not a client-side check that could be bypassed by talking to the program directly. See the Quickstart for the actual transcript.(1).png?fit=max&auto=format&n=qzWg2aQwcoMXkrks&q=85&s=7bd9594b6c05a51ce5a41a26f4cb7e42)
(1).png?fit=max&auto=format&n=qzWg2aQwcoMXkrks&q=85&s=f7ad867613529ca7109dfe0b0dabd815)