Introduction

Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.

I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.

I also build and publish a variety of tools, libraries, and open-source projects.

Comparing key management for agents

A payment agent can transfer funds; a research agent should not be able to spend them. When a service runs multiple agents, each role needs a defined set of accounts and permitted operations. Agent key management combines the custody of private keys that control assets with the decision about which requests those keys may sign.

Separating accounts for agents A and B accomplishes little if A receives credentials that can freely operate both accounts: A could still move B's funds. Account isolation establishes spending boundaries only when combined with request authentication and checks on the requested operation. The design must also identify who can halt abnormal requests and who can recover access when credentials are lost.

Comparison of agent key management architectures

Three options for this design are CDP, Coinbase's developer platform; Turnkey, which provides organization-level authorization and signing; and OWS, which standardizes local wallet storage and signing. With CDP and Turnkey, requests go to an external signing platform. With the OWS reference implementation, signing is invoked from a process you operate yourself. Because the deployment models differ, the comparison looks beyond matching feature names to identify who checks each request and where the check happens.

The comparison focuses on agents spending a company's operating funds. Delegation involving users' own funds is treated as a separate path from the company's accounts. Later sections follow a design example that pays a designated recipient 1 USDC and limits daily spending to 10 USDC.

The existing diagrams are retained from the Japanese article; their original labels have not been translated.

Coinbase CDP

CDP provides APIs and SDKs for creating accounts from applications and signing with asset keys. An SDK is a development library that helps applications call an API. The application constructs a request, sends it to CDP, and receives a signing result or an identifier for a submitted transaction.

Asset key generation and signing take place in a trusted execution environment (TEE), isolated from ordinary server processing. CDP uses AWS Nitro Enclaves to sign without exposing the plaintext asset private key to the application's server. The application, meanwhile, authenticates the requester and chooses the account and operation to sign.

Coinbase CDP signing architecture

With this division of responsibilities, the backend can validate requests and connect to CDP instead of distributing asset keys to agent runtimes. CDP also supports signing policies, so checks in the application and checks in CDP must be designed separately. For more on account types and payment-related features, see Connecting wallets and payments to applications with Coinbase CDP.

Authentication and accounts

CDP offers authentication methods according to who controls the funds. One type lets users sign in to spend their own funds; the other lets a backend use API credentials to operate company funds. An agent paying from company funds would use the latter configuration.

API-key authentication combines authentication for accessing CDP with authorization for sensitive wallet operations. The credentials serve different purposes.

Credential What it verifies
Secret API Key Authority to make CDP API requests
Wallet Secret Requests for sensitive signing-related operations
Asset private key Signatures that move assets on-chain

The backend uses the Secret API Key to generate a signed authentication token to attach to API requests. This token takes the form of a JWT. Signing operations additionally require authentication using the Wallet Secret. The Wallet Secret is a credential for authenticating requests; it is not the asset key of the sending address.

Authentication and account selection

Consider a configuration in which the company's backend stores these credentials and accepts only purchase details from agents. The backend stores a mapping between agent IDs authenticated by the service itself and the accounts those agents may use. Even if a request from A names B's account, the backend ignores that claim and selects A's account from the stored mapping.

If this mapping were determined solely by a string supplied with each request, an agent could change the target account simply by claiming another identity. Identify the requester through the service's login mechanism or runtime authentication, then select the account using that result. Keeping privileged CDP credentials out of the agent's runtime also allows the application to limit the operations it accepts.

For a user's own funds, use the path in which the user signs in to operate their account. When the user creates time-limited delegation, the backend can use that delegation to operate even while the user is offline. Delegation may cover all of a user's accounts or an individual account, and the unit of revocation differs accordingly.

Using a user's funds under this delegation and sharing API credentials for a company account involve different controllers of the funds. A decision about company accounts for agents should not automatically be applied to funds held for users.

Signing conditions and results

Once a request is authenticated, CDP uses registered policies to decide whether to permit the operation. A policy is a rule that allows or denies operations according to conditions such as destination and amount. Accounts authenticated by API key have two policy scopes: project for the whole project and account for an individual account.

If a matching rule exists at project level, its result takes precedence over account-level rules. Account-level rules are evaluated when no project-level rule matches. Within a single policy, a request matching both an allow and a deny rule is denied regardless of rule order.

CDP signing conditions and policy results

For example, suppose a project broadly permits signatures for transactions addressed to the USDC contract, while an account policy attempts to narrow the permitted operations. If the request matches the project-level allow rule, evaluation does not proceed to the account-level denial that would narrow it. When setting individual account restrictions, check the project-level allow conditions as well.

If neither policy matches, the result depends on whether rules exist for that operation. For example, when transaction-signing destinations are restricted, a request for a different destination is denied even if neither policy matches. If neither policy contains a rule for the signing operation in question, it is allowed.

Condition Decision
Project policy matches Use the project-level result
Project policy does not match; account policy matches Use the account-level result
Neither matches; rules exist for the operation Deny
Neither matches; no rules exist for the operation Allow

Deny precedence within a single policy is distinct from the evaluation order of project and account policies. Testing only allowed requests makes it easy to miss overly broad permissions or operations for which no policy has been configured. Test requests with changed destinations as well as requests that switch to a different signing method.

The example later uses signEvmTransaction to request transaction signing only from CDP. The returned signedTransaction is the signed transaction. The application submits those bytes to the target chain's RPC endpoint and stores the resulting transaction hash against the order. An RPC endpoint is where an application requests blockchain data or submits transactions.

After receiving the hash, the application still checks whether the transaction was included on-chain and executed successfully. CDP also has operations that handle gas fees, nonce retrieval, and submission, but a signing-only result must not be interpreted as evidence of successful submission.

Distinguishing the quantities being checked

When sending ETH, the transaction's value is the amount of ETH transferred. When sending USDC, the data calling the USDC contract contains the recipient and token amount. A request with zero ETH can still transfer a large amount of USDC.

CDP's evmAddress checks the outer transaction destination, and ethValue checks the native ETH amount. A condition requiring the USDC contract as the destination and zero ETH does not also validate the USDC recipient and amount. In this example, the backend decodes the transfer call data and checks the recipient and 1 USDC amount against the order.

Turnkey

Turnkey is a platform that checks requesters registered with an organization and the applicable authorization conditions, then signs using asset keys within a TEE. Credentials that users or agents use to submit requests are managed separately from the asset keys in wallets. Operators record which users may use which wallets in the organization's configuration.

Sub-organizations can separate assets and administrative scope by agent. Each can contain its own users and wallets, accepting only operations authorized by the organization to which a request is directed. Conditions can also differ by user within a single organization; creating a sub-organization does not by itself define the signing conditions.

Turnkey signing architecture

Besides the number of organizations, examine the credentials valid in each organization and the administrators who can change its conditions. Increasing the number of sub-organizations does not necessarily increase shared API usage limits. For more on wallet structure and signing, see How Turnkey wallets and signing work.

Organizations and operation principals

When creating a sub-organization, define its users and the group authorized to approve administrative operations. The set of administrators and the required number of approvals together form the root quorum. With three administrators and two required approvals, for example, the remaining two can still approve administrative operations if one loses their credentials.

For an agent's everyday operations, create a user with restricted permissions within that organization. If A's user is allowed to sign for A's wallet and A's credentials are not registered in B's sub-organization, A cannot use the same credentials in B's organization. Check first whether the user is registered in the organization and then what operations that organization allows.

Organizations and operation principals

The parent organization can reference sub-organizations and aggregate usage for billing. Simply attaching a sub-organization ID to parent credentials does not grant unrestricted access to that sub-organization's assets. The operator responsible for emergency stops also needs credentials authorized within the affected sub-organization.

If the agent itself is included in root, check whether its approval alone satisfies the root quorum. For example, if only one approval is required and the agent is a root user, it also receives a path around ordinary signing restrictions. Strict signing policies cannot provide the intended limits when administrative privileges that bypass them reside in the same runtime.

Signing conditions and results

The agent's server signs the POST body sent to Turnkey using its authentication key. The body identifies the target organization and the requested operation. The resulting proof of authorization of the request contents is called a stamp.

Turnkey verifies the stamp against the registered public key and checks the association between the requesting user and the body. If an intermediate server changes the recipient or amount, the signature over the original body no longer verifies. The request authentication key and the asset signing key used for on-chain operations prove different things.

Ordinary policies define consensus, specifying whose approval is required, and condition, specifying the operations to which the policy applies. The effect determines whether to allow or deny matching requests. This allows the system to decide whether to sign based on the target wallet and transaction details even after authenticating the user.

Turnkey signing conditions and policy results

On the ordinary policy path, an applicable EFFECT_DENY denies the request. If no denial applies and EFFECT_ALLOW applies, the request is allowed. Signing requests matching neither an allow nor a deny policy are denied.

For example, A may be permitted only to send 1 USDC from a designated account to a designated recipient. Changing the amount to 2 USDC or specifying another recipient takes the request outside the allow condition. If no other broad allow rule applies, signing the modified request is denied. An explicit denial also takes precedence when the 1 USDC request matches both an allow and a deny policy.

USDC conditions can use the contract's ABI (which describes how to call its functions) to decode actual arguments. When the ABI has been registered, the recipient and amount can be incorporated into conditions as function arguments. Restricting the outer destination to the USDC contract alone does not constrain who receives the USDC or how much is sent.

Turnkey records the requested operation as an Activity. A completed activity returns its operation result; when more approvals are required or asynchronous processing is underway, query the same Activity ID. For a completed signing operation, read the signing result; for a completed submission operation, read the submission result. Whether a payment actually executed on-chain must be matched to the transaction result after submission.

Recovery approvals

A request satisfying the root quorum can execute without going through ordinary policies. This provides a path to correct settings when overly restrictive policies have blocked even administrative operations. Keep this recovery authority separate from the signing conditions granted to ordinary users.

Collecting root credentials on an agent host creates a path around ordinary restrictions if the host is compromised. Assess the impact not only by counting sub-organizations but also by determining which root credentials reside together. Consider both the risk of setting the root quorum approval count so high that no one can authorize recovery and the risk of setting it so low that one leaked credential permits every operation.

Open Wallet Standard

OWS standardizes wallet storage formats and signing interfaces so multiple tools can use the same wallet. Its reference implementation includes a terminal CLI and an SDK callable from Node.js. In the Node.js reference implementation at commit ad726051f85b34a14746a8440c5d370a1bbffe7d, the Rust core decrypts secrets and signs within the same process as the application. The CLI can also access wallets in the same storage format.

This differs in execution location from CDP and Turnkey, where signing requests are sent to external management APIs. The OWS specification also considers a local service acting as an access layer, but using the reference SDK does not require replacing the architecture with an HTTP server. The comparison here uses storage and signing on a self-operated host, with conditions attached to access tokens.

Open Wallet Standard signing architecture

For OWS storage structure and key derivation for individual chains, see How OWS standardizes wallet storage and signing. Here, the focus is on what is stored and where conditions are evaluated when delegating to an agent.

Local storage and delegation

Wallet secrets created by the owner are encrypted using a key derived from a passphrase and then stored. Secrets may contain the mnemonic used to derive multiple keys or an imported private key. For signing, the implementation decrypts the information and selects the key for the requested chain.

To delegate operations to an agent, the owner issues an access token. In the reference implementation, the token is a secret value beginning with ows_key_. The owner decrypts the original secrets and encrypts a copy using a different encryption key derived from this token. Each copy is stored together with its associated target wallets and policies.

Local wallet storage and delegated access

An agent presenting the token can decrypt its token-specific copy and sign when a legitimate invocation passes the target and policy checks. The stored token hash is used to locate the record. Decryption uses a key derived from the secret token presented by the agent.

Information in possession Relationship to the secret copy
Token only Cannot decrypt without access to the corresponding ciphertext copy
Ciphertext copy only Requires the token-derived decryption key
Token and ciphertext copy Risk of decryption outside the legitimate signing path

This architecture requires separating encryption at rest from protections against compromise of a process holding the token. If an agent host can read both the token and the file, an attacker may still be able to bypass legitimate policy evaluation and extract the asset key.

Signing conditions and results

When an agent requests a signature using its token, OWS locates the corresponding record. It checks expiry and the target wallet, then evaluates the attached policies. When multiple policies apply, only requests allowed by all of them proceed to decryption.

Built-in rules can restrict the signing chain and validity period. Requests specifying a different chain or using an expired token stop before secret decryption. Only after satisfying the policies does the implementation decrypt the copy with the token-derived key and produce a signature.

OWS signing conditions and policy results

To validate recipients and amounts, use an executable policy that invokes a custom executable. OWS passes the signing request context to that program as JSON. The program returns an allow decision and, for denials, the reason.

When validating transactions on an EVM chain, the pinned reference implementation decodes transaction contents from bytes in a field named raw_hex. The design cannot assume that the application automatically receives decoded recipient and amount fields for every chain. Reject requests that cannot be decoded and compare conditions only when the necessary values have been recovered.

If the policy executable terminates abnormally or its decision JSON is invalid, the request is denied. In the pinned implementation, a program that fails to exit within five seconds is also rejected. If the program mistakenly returns an allow decision, however, the engine does not correct that mistake to match the business's intended policy.

Signing runs in the same process as the application. Locking secret memory and clearing it after use reduce exposure, but do not completely prevent memory reads from a compromised process. The signing operator is also responsible for host privileges and dependency updates.

Direct owner operations

Direct operations using the owner's passphrase do not go through policies attached to tokens. Token restrictions apply to the signing path invoked with the token. Giving the agent environment the owner's passphrase also provides a separate path without those conditions.

A runtime intended for restricted operations should contain only the necessary token and files. Owner recovery operations should run in a separate environment, and backup contents should be separated accordingly. Choosing to host the system yourself must be paired with controls on who can operate that host.

Comparing the three approaches

All three approaches can attach conditions to requests that lead to asset signing. They differ in where requests are authenticated, the inputs used to evaluate restrictions, and how administrative authority is held. Beyond where asset keys reside, compare how much validation the application itself must perform.

Comparison dimension CDP Turnkey OWS reference implementation
Main signing location Remote TEE Remote TEE Self-operated process
Requester authentication API authentication and Wallet Secret Stamp using registered credentials Token record lookup and target check
Scope of conditions Project and account policies Users and operations within an organization Policies attached to a token
Privileged administration path Backend administrative credentials root quorum Owner passphrase
Remaining application responsibilities Requester-to-account mapping User-to-organization mapping Host and file access management

Comparison of the three approaches

Even for the same 1 USDC transfer, CDP's outer-destination condition differs from the application's decoding of USDC arguments. Turnkey's conditions on ABI arguments and OWS's transaction decoding by a custom program also differ in who maintains the implementation. Rather than comparing restriction names alone, identify the values each restriction reads and the people who can change its configuration.

Separating authority

If A submits a request naming B's account, the backend in the CDP example blocks it using the requester-to-account mapping. Because it selects A's account before calling CDP, an account name supplied in the request body does not become the operation target. The backend stores credentials that can operate across the project.

When A and B belong to separate Turnkey sub-organizations, register different credentials for each organization. Do not register A's credentials in B's organization or give A ordinary policies authorizing use of B's assets; signing requests against B's organization are then rejected. The parent's aggregated visibility does not become A's authority to sign for B.

In OWS, check the wallets covered by the token issued to A. If B's wallet is not in scope, the request stops before decryption. If A's host can also read the owner's passphrase and B's original wallet, however, token scope alone cannot constrain everything the host can do.

Separating agent authority

Now consider a request that changes only the USDC recipient while keeping the same sending account. In CDP, the evmAddress condition remains unchanged if the outer destination is still the same USDC contract. Compromise of the backend that checks the recipient and amount in this example can bypass the application's argument validation.

Turnkey can also evaluate the recipient in the organization's policy when conditions are applied to ABI arguments. In OWS, conditions are attached to values decoded by a custom program. Compare separately the conditions registered with the product and those evaluated by the application or custom program.

Check for the 1 USDC example CDP Turnkey OWS reference implementation
Outer transaction destination evmAddress eth.tx.to Can be decoded by a custom program
ETH amount ethValue eth.tx.value Can be decoded by a custom program
USDC recipient and amount Application decodes calldata Conditions on registered ABI arguments Custom program decodes raw_hex
Cumulative budget reservations Designed in the application ledger Designed in the application ledger Designed in the application ledger

This table maps the features used in the implementation example below to the locations where the checks occur. In particular, USDC argument validation in the CDP design resides in the application, leaving a trust assumption in the backend.

Protecting keys and credentials

If an agent host is attacked, there are two paths to consider: extraction of asset private keys and abuse of legitimate signing requests. Even when a TEE limits private key extraction, an attacker using valid credentials may submit requests that execute within the configured conditions. Assess the confidentiality of asset keys separately from the scope of permitted requests.

With CDP, the API permissions and wallet operation conditions available to stolen administrative credentials determine the impact. With Turnkey, the available privileges depend on whether stolen credentials belong to an ordinary user or root. With OWS, the impact depends on whether the attacker can access the corresponding ciphertext copy in addition to the token, and whether the owner's original wallet is also accessible.

Protection of keys and credentials

Turnkey provides remote attestation, which uses runtime measurements and signatures to check whether an environment is running the expected code and configuration. The verifier checks a trusted hardware signature and the expected measurements. Proving the runtime environment is distinct from proving that the recipient selected is the one the user intended.

Thus a request may still be allowed under an overly broad policy even when business rules prohibit sending funds to that recipient. Providing reproducible builds or runtime attestation alone also does not establish regulatory compliance for a particular service. Match the environments and configurations you trust to the requirements of the service you operate.

OWS relies on encryption at rest and in-process protections. Determine which files and memory need to be protected from operating system administrators or compromised processes. If maintaining the storage location and signing process yourself is a requirement, choose the architecture with the understanding that you assume that responsibility.

Implementation example: paying 1 USDC

This payment example is a design illustrating the process, not the result of transferring real assets.

Consider agent A, which pays for services using company funds, and agent B, which performs a different role. A may send 1 USDC per transaction on Base to a designated service recipient. Base is the EVM-compatible chain on which transactions execute in this example.

A has a daily budget of 10 USDC and cannot operate B's account. The company controls the funds, and its operator provisions the accounts and signing connections. To enforce these requirements, the application connects pre-signing checks to budget records for each order.

Implementation example for a 1 USDC payment

Payment records associate each order with its requester so the same order cannot be paid repeatedly. They also store signing information separately from information obtained after transaction submission.

Record What it establishes
Agent ID and account Which role's funds are being used
Order ID Which purchase is being executed
Chain and asset Which network's USDC is being used
Recipient and amount Who is being paid and how much
Budget reservation How much is allocated to an in-flight request
Operation identifier How to look up the same signing or submission request
Transaction hash Which transaction's execution result to check

The order ID distinguishes purchases, whereas the transaction hash identifies transactions submitted to the chain. The application maintains the mapping so that checking submission again for one order does not consume budget as though it were a separate order.

Matching requests against conditions

A USDC transfer calls transfer(address,uint256) on the USDC contract. The outer transaction destination and the token recipient are separate fields. With USDC's six decimal places, 1 USDC is represented by 1000000 base units.

Transaction field Value in this example
Chain ID 8453 for Base
to USDC contract on Base
value Zero native ETH transferred
transfer recipient Service recipient address specified in the order
transfer amount 1000000

The application selects A's account from A's authenticated ID and constructs the transaction using the recipient and amount specified in the order. It then decodes the constructed call data as transfer to verify that the recipient and amount of 1000000 match the payment record. Data that calls another function or cannot be decoded is not passed to signing.

Matching transaction requests against signing conditions

With CDP, pass this same transaction to signEvmTransaction. Separate restricting the outer destination with evmAddress and the native ETH amount with ethValue from the application's USDC argument validation. The published official EVM Policies examples reviewed for the original article did not establish a dedicated condition type directly binding the USDC recipient and amount for this example.

The submission operation sendEvmTransaction has an official example that restricts the network using evmNetwork. Rather than assuming that the same condition applies to signing-only operations, this configuration fixes the chain ID and submission RPC to Base in the application. Submit the returned signedTransaction to the same chain and store the hash returned by the RPC.

In this CDP path, the recipient and USDC amount checks remain in the backend. If that backend and its administrative credentials are compromised, outer-destination restrictions alone cannot prevent bypassing the application checks. Evaluate the architecture with this remaining trust assumption in mind.

In Turnkey, allow a restricted user within the organization to sign for the target account, and evaluate the arguments to transfer according to the registered ABI. In addition to requiring the USDC contract as the destination and zero ETH, include recipient and amount conditions in the same signing request. Do not grant this agent root privileges, so the comparison concerns requests that go through ordinary policies.

With OWS, verify that A's token allows access to A's wallet and Base. A custom policy program decodes raw_hex and returns allow only when the USDC contract, recipient, and amount all match. The operator who writes the policy program is responsible for implementing decoding and the conditions.

For each approach, test not only the allowed 1 USDC request but also requests with a changed recipient or an amount of 2 USDC. Separately test requests changing the signing account to B or selecting a signing method other than ordinary transaction signing. Do not assume that attaching conditions to one signing operation automatically imposes them on every other signing operation.

Budget reservations and result verification

Even with a per-request limit of 1 USDC, executing the same request 100 times spends 100 USDC. To enforce a daily budget of 10 USDC, the application records both amounts already spent and amounts allocated to payments in progress. The budget ledger here is a feature of the example application.

For example, if 8 USDC has been spent and 1 USDC is reserved for another order, the remaining unreserved budget is 1 USDC. Protect ledger reservations against concurrent updates so that two orders seeing the same remaining budget cannot each reserve 1 USDC. In this example, lock the relevant budget row, recheck the available amount, and record the reservation. Perform the check and reservation in one database transaction, preventing another request from modifying the same budget row until completion.

Budget reservations and transaction result verification

The process reserves the order's budget before signing and submission, then converts the reservation into spent funds according to the execution result. Do not release the reservation for another payment while the status of the first remains unknown. Distinguish an actual submission failure from the application not receiving a response.

For applicable CDP APIs, retrying the same input with the same idempotency key retrieves the original response within a 24-hour window. An idempotency key identifies a repeated operation to the API. Reusing the same key with a different input produces an error, so store both the input and key against the order. After retrieving a signing response again, check the application's hash records to determine whether the transaction has already been submitted.

Turnkey maps requests with identical POST body fingerprints to the same Activity. If the Activity ID is known, query it directly. Changing the time field timestampMs to create a new request produces a different Activity rather than rechecking the original one. If submission time restrictions prevent resubmitting the original request, use the previously obtained Activity ID for lookup.

When OWS returns a signature, record the order's submission process and hash in the application. Being able to repeat a signing operation is not proof that the order remains unpaid. Check the transaction result through the submission RPC before deciding whether to construct the same payment again.

Once successful on-chain execution is confirmed, mark the order paid and convert its reserved amount into spent funds. When failure is conclusive and the payment did not occur, record the result and release the reservation. Not treating pending transactions as failures prevents counting a payment in flight twice against the budget or allocating the same funds to another order.

Suspension and recovery operations

When an abnormal request is detected, distinguish which part of the process needs to stop. Stopping new signatures, withholding already signed transactions from submission, and checking the results of transactions already submitted are different operations. Revoking credentials does not reverse payments already executed on-chain.

Suspension and recovery operations

Operationally, stop the application accepting requests, revoke the corresponding signing permissions, and look up orders in progress. After recovery, ensure revoked credentials are not restored from backups and made usable again. Tie suspension and recovery to credentials and order records as well as to keys.

Suspension and credential rotation

For CDP, align conditions denying signing requests and revocation of API credentials with the account's control model. If using user delegation, revocation of that delegation is also part of suspension. The operator performs these actions with privileges to modify the relevant project or account.

A policy's pause operation temporarily removes the policy from evaluation. Since this removes a restriction, it must not be used as a wallet-freezing mechanism. If the remaining active rules do not restrict the operation, it may be allowed by default.

With Turnkey, identify the credentials of the user to suspend and an administrator authorized to change credentials in the relevant organization. Do not assume that parent credentials can suspend all sub-organizations at once; use authority valid within the child organization. When revoking ordinary authentication keys, follow a process that does not also lose the recovery root credentials.

With OWS, remove the target token's file, eliminating its ciphertext copy and lookup record. The original wallet and copies for other tokens remain, so legitimate calls from a single agent can be stopped. Changing only the owner's passphrase does not revoke token-specific copies encrypted independently.

Suspension and credential rotation

If both the token and its copy have already been exfiltrated, deleting active files cannot recover the external copies. If the asset key itself may have been extracted, consider moving funds to an account with a new key. This decision is separate from the ability to reject the token through legitimate calls.

In every approach, maintain a record of signatures produced before revocation and transactions already submitted. Do not stop at checking that new signatures are denied; look up transaction execution results for each order. Continue monitoring payments in progress after suspending the agent.

Backups and migration

When the same address must be used in a different signing environment, asset key export and import provide a migration path. Migrating while retaining the address and transferring funds to an address with a new key leave different permissions in the old environment. Exporting a key does not automatically migrate policies or the order ledger.

With CDP, distinguish who can export private keys for accounts managed by API key and those managed by users themselves. An application that supports signing in to a user's account is not equivalent to a backend that can freely export that user's private key. When importing, also verify the key type and address to retain.

For a Turnkey export, the recipient creates an encryption key pair and includes the public key in the request. The TEE encrypts to that public key and returns the result in a form only the recipient can decrypt. This receiving key is called the TEK.

Backup and migration

The holder of the TEK private key can decrypt the export and provide the asset key to the migration destination. The original wallet remains in Turnkey after export. Successful export is not proof that signing from the original organization has been disabled.

With OWS, decide how to restore the original wallet, token-specific copies, and policies. Restoring an entire backup, including revoked tokens, may reactivate a suspended agent's legitimate access path. During recovery, reconcile records of retained and discarded tokens.

Separate service-side disaster recovery from recovery when a user loses credentials. Even if Turnkey backs up organization data and infrastructure keys, customers must still retain credentials capable of satisfying their root quorum. With OWS, confirm that both the files you store and the secrets needed to unlock them can be recovered.

When combining approaches, consider separating assets by role or using different accounts for development and production. Providing identically named signing functions in an application does not eliminate differences in authentication or revocation. For migration, define when the old environment stops and the new one starts, and carry over in-flight orders and submission hashes.

Capacity and deployment models

When using CDP or Turnkey APIs, account for both signing requests and result lookups in usage limits. Turnkey has limits shared by parent organizations and sub-organizations as well as limits that apply to particular organizations or operations. Do not treat adding sub-organizations or client servers as an equivalent increase in available throughput.

With OWS, maintain file storage, backups, custom policies, and submission RPC connections yourself, in addition to the performance of the signing host. Avoiding dependence on a remote signing service does not eliminate maintenance or incident response. Provide a runtime that meets expected request volumes and recovery requirements.

Match the choice to the existing application and who will maintain each component.

Required architecture What to examine when choosing
Integrate accounts, submission, and payment-related connections CDP features and supported networks
Define organizational approvers and transaction conditions in detail Turnkey ordinary policies and root administration
Standardize storage and signing on your own hosts OWS reference implementation and host and policy operations

Check supported signing chains separately from the coverage of features that handle submission or swaps. The ability to sign for a chain does not establish that the same submission or payment features are available on that chain. Measure price and latency under the conditions of the actual operations, networks, and number of lookups, rather than ranking products by unsupported fixed values.

Conclusion

CDP, Turnkey, and OWS combine asset key custody with the conditions that authorize signing requests, but do so in different places and with different privileges. Even for the same 1 USDC payment, separating values checked by the product from those decoded by the application reveals which credentials need management and what trust assumptions remain. By connecting individual signing conditions, budget reservations, result lookups, suspension, and recovery to orders, you can design the spending scope delegated to an agent.

Official documentation for CDP accounts and policies:

Official documentation for Turnkey organizations and signing:

OWS specification and reference implementation: