This guide covers the key implementation decisions for giving AI agents secure access to company wallets, then walks through provisioning an agent end-to-end: creating a scoped wallet, assigning a non-root agent user, and defining policies that constrain exactly what the agent can sign. For basic signing, start with the Quickstart.Documentation Index
Fetch the complete documentation index at: https://turnkey-0e7c1f5b-graham-docs-revamp.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Turnkey Agent Skills
Agent Skills let you operate on Turnkey directly through an AI assistant, no application code required. The agent provisioning workflow skill lets you quickly create a wallet scoped for agent usage through your AI assistant. You can then equip your agent with skills so it can autonomously operate within the boundaries you’ve configured.Agent personas
Turnkey supports different agent roles through policy composition:| Persona | What it can do | Policy approach |
|---|---|---|
| Worker | Signs transactions on a designated wallet | ALLOW with wallet scope + destination/function/value constraints |
| Observer | Read-only access (balance checks, activity monitoring) | No policies needed; default-deny prevents signing. Add explicit DENY if org has shared ALLOWs. |
| Approver | Reviews and approves other agents’ transactions | Narrow ALLOW for APPROVE_ACTIVITY and REJECT_ACTIVITY only. Must NOT have signing permissions. |
Key implementation decisions
| Decision | What to consider |
|---|---|
| Wallet scope | Dedicate a wallet (or specific accounts) to the agent. Never share wallets between agents with different trust levels. |
| Destination allowlist | Restrict which addresses the agent can send to (e.g., only a treasury address, only a specific DEX router) |
| Spending caps | Bound transaction values per-signing to limit blast radius if the agent misbehaves |
| Function restrictions | For smart contract interactions, restrict to specific function selectors or upload the ABI for argument-level control |
| Consensus requirements | For high-value actions, require both the agent and a human (or another agent) to approve before the enclave signs |
| Key management | Store agent API keys in a secrets manager. Plan for rotation without downtime. Use short-lived keys where viable. |
| Transaction management | Enterprise customers can use Turnkey’s transaction management to offload gas sponsorship, nonce management, and broadcasting — so agents only need to handle signing logic. |
Example: autonomous trading agent
An AI agent that analyzes market data and executes trades on a DEX needs scoped signing authority: it should only be able to call specific router functions on approved contracts, with spending limits and human oversight for large trades.| Need | How Turnkey solves it |
|---|---|
| Agent must never access the private key | Keys stay in the secure enclave; the agent authenticates via API key and receives signatures only |
| Signing must be restricted to approved contracts | Policies target specific contract addresses and function selectors |
| Large trades need human approval | Consensus expressions require both the agent and a human approver for transactions above a threshold |
| Must support multiple chains | One agent user with chain-specific policies (EVM, SVM, etc.) covering each network |
| Must be revocable instantly | Delete the agent user to permanently and immediately revoke all access |
Implementation steps
This guide assumes you’ve completed the Quickstart and have a Turnkey client initialized with your root credentials. The agent will get its own separate credentials.
Create a wallet for the agent
Create a dedicated wallet scoped to the agent’s needs. Always check for existing wallets first to avoid creating duplicates.
Create a non-root agent user
The agent gets its own user with a P-256 API key pair. This user is non-root by default, meaning it has zero permissions until you explicitly create policies.Generate a key pair for the agent (the private key never touches Turnkey):Then create a user tag and the agent user.
userTags takes tag IDs (UUIDs), not string labels, so create the tag first:Define scoped policies
With the agent user and wallet created, define policies that scope exactly what the agent can do. Turnkey is default-deny: without an ALLOW policy, the agent cannot sign anything.Base signing policy (scoped to the agent’s wallet):Destination allowlist (restrict to a specific DEX router):Spending cap (limit per-transaction value):Multi-party consensus for large trades: