AWS Teams Up with Anchor Browser: Enabling AI Agents to Handle On-Chain Payments Autonomously

AWS and Anchor Browser built AgentCore payments on x402, letting AI agents pay autonomously without exposing private keys.
The AWS Partner Agent Factory team and Anchor Browser built a complete solution based on the x402 protocol, which extends the HTTP 402 status code, so AI agents can autonomously pay for the resources they access. The core challenge is spending funds without exposing wallet private keys. AgentCore payments solves this with three layers: budget checks, isolated signing, and automatic retries.
When AI agents move beyond simply browsing the web and calling APIs to autonomously paying for the resources they access, the underlying logic of the entire agent economy will be rewritten. The Partner Agent Factory team at the AWS Generative AI Innovation Center has partnered with Anchor Browser to build a complete solution that enables AI agents to handle payments on their own.

The Core Problem: How Can an Agent Safely Spend "Someone Else's" Money?
When traditional AI agents execute tasks, accessing protected web resources or calling paid APIs is a fundamental obstacle. Either you pre-configure static API keys, or a human manually completes the payment step in the loop. Neither approach can support truly autonomous, scalable agent workflows.
The emergence of the x402 protocol offers a possibility—it is a payment-layer protocol based on the HTTP 402 status code that allows a server to directly initiate a payment request to a client. Anchor Browser builds on this by providing a programmable browser environment for agents. When an agent accesses an x402-protected resource, the server returns a 402 status code along with payment requirements, and the agent's browser layer captures this signal and triggers the payment flow.
The key question is: how do you complete transaction signing and retries without exposing the wallet private key to the Agent Runtime?
The HTTP 402 status code is a reserved but long-underused status code in the HTTP protocol, with the semantics of "Payment Required." It was originally defined in the HTTP/1.1 specification (RFC 7231) as reserved for future digital payment scenarios, but for years there was virtually no standardized implementation. The x402 protocol is precisely about reactivating and extending the semantics of this status code: the server returns 402 in its response along with structured payment requirements (such as amount, recipient address, and supported payment methods), and the client initiates an on-chain or off-chain payment accordingly, then retries the original request with a payment credential. The cleverness of this model is that it doesn't require inventing a new transport-layer protocol but instead reuses existing HTTP semantics, enabling any client that supports custom response handling (including agent browsers) to participate in payment interactions.
A wallet private key is the highest-privilege credential for a blockchain account; holding the private key means having full control over the corresponding assets. In traditional payment integrations, the private key typically needs to be injected into the application runtime or passed via environment variables, which creates a serious attack surface—once an agent is hijacked by a prompt injection attack, or the runtime environment is compromised, the private key is leaked, causing irreversible asset loss. Therefore, isolating the signing operation in a controlled environment that the agent cannot access is the core security prerequisite that distinguishes an agent payment solution from an ordinary payment gateway.
AgentCore payments: A Three-Layer Security Architecture
The design philosophy behind the Amazon Bedrock AgentCore payments module is to abstract payment capability away from the agent itself. The entire flow is split into three independent layers:
The budget check layer sits at the very front. Every payment request first goes through AgentCore's budget validation, where the system decides whether to allow it based on preset spending thresholds and rate limits. This prevents the agent from generating unlimited spending when it gets stuck in a loop or is maliciously manipulated.
The transaction signing layer is the core of security. Wallet credentials are stored within AgentCore's controlled environment, and the Agent Runtime can never access the private key. Once a payment request passes the budget check, AgentCore completes the transaction signing in an isolated environment and returns only the signed transaction hash to the calling chain.
The request retry layer handles replaying the original request after payment is complete. Once the signed transaction is confirmed on-chain, AgentCore automatically retries the HTTP request that was previously blocked by the 402 and returns the resource to the agent. The entire process is transparent to the agent—it has no awareness that a payment occurred and simply sees that the resource is finally accessible.
The significance of this architecture is that an agent's autonomy and fund security are no longer mutually exclusive. Developers can confidently let agents operate in an open web environment without worrying about credential leakage or accidental overspending.
Transaction signing refers to cryptographically signing transaction data with a private key to prove that the transaction was authorized by the account owner. In blockchain scenarios, the signed transaction is broadcast to the network and packaged and confirmed by miners or validators. The signature itself does not expose the private key, but the signing operation must be completed in an environment that can access the private key, which is why the location of the signing layer is critical. AgentCore places signing in a controlled environment isolated from the Agent Runtime; the agent can only obtain the signed transaction hash (Transaction Hash), i.e., the unique identifier of the transaction after it is on-chain, which is used to query confirmation status, but cannot reverse-engineer the private key or forge new transactions.
Agent Runtime refers to the environment in which an agent actually executes code and reasoning, typically including large language model calls, tool calls, and browser operations. Because an agent may be induced by malicious input to perform unintended operations, the Agent Runtime should be treated as an untrusted zone. The design principle of AgentCore payments is precisely based on this threat model: any operation involving funds is not completed within the Agent Runtime but is instead executed on the agent's behalf through a secure boundary at the platform layer. This "capability abstraction" model is in the same lineage as the principle of least privilege in cloud security.
Real-World Scenarios and the Infrastructure of the Agent Economy
The workflows unlocked by this solution are quite concrete. Meta's Agent Factory project has already been experimenting with scenarios in which AI agents autonomously conduct research, call third-party data services, and pay to obtain results. A typical flow is: an agent is asked to analyze a market trend, and it needs to access three paid data APIs, each charging a micropayment via x402. AgentCore separately performs the budget check, signing, and retry, and the agent ultimately obtains the complete data and generates an analysis report.
Anchor Browser's role is closer to the front end. It provides the agent with a browser sandbox that has payment capabilities, so that the 402 response in the x402 protocol can be automatically recognized and handled, rather than directly throwing an error or redirecting to a payment page as a traditional browser would.
From a broader perspective, this infrastructure solves the most fundamental trust problem in the agent economy: the service provider needs to confirm that payment will arrive, the party deploying the agent needs to confirm that funds will not be misused, and the agent itself needs frictionless access to resources. All three requirements are simultaneously satisfied through AgentCore's "budget-sign-retry" pipeline.
A browser sandbox is an isolated runtime environment in which an agent can safely load and operate web pages without affecting the host system or other processes. The payment-capable browser sandbox provided by Anchor Browser additionally integrates interception and handling logic for x402 protocol responses: when a page or API returns a 402 status code, an ordinary browser would display an error page or redirect to a payment gateway, whereas this sandbox captures the response, extracts the payment requirements, triggers AgentCore's payment flow, and finally automatically retries the request and renders the final resource. This design allows the agent to access paid resources just like ordinary web pages without being aware of payment details.
Micropayment refers to payments of extremely small amounts, often as low as a few cents or less. Traditional payment channels struggle to support micropayments due to fees and minimum amount restrictions. Blockchain and the x402 protocol make per-use, pay-as-you-go small payments economically viable, which provides the foundation for agents to frequently call paid APIs or access paid content. Many scenarios in the agent economy—such as paying per data query or per web scrape—depend on micropayment mechanisms to operate at scale.
Implications for Developers
If you are building an AI agent that needs to access external resources, this architecture offers a paradigm worth referencing: treat payment capability as a platform-layer primitive rather than embedding it in the agent logic. This means the agent's code does not need to contain any payment-processing logic, and payment policies can be dynamically adjusted through platform configuration.
Another design choice worth noting is the deep coupling between the retry mechanism and the payment flow. In traditional architectures, payment and request retry are two independent modules, and developers need to manually handle consistency between them. AgentCore binds the two together, ensuring that the situation of "payment succeeded but request failed" does not leave an inconsistent state.
As more and more web services begin to support agent-native payment protocols such as x402, interactions between agents and resources will gradually shift from a "pre-configured credentials" model to a "runtime on-demand transaction" model. This collaboration between AWS and Anchor Browser is one of the first engineering answers to emerge in this transition.
One-line Summary
AWS and Anchor Browser built AgentCore payments on the x402 protocol, enabling AI agents to autonomously complete payments without exposing private keys.
Paragraph Summary
The AWS Partner Agent Factory team partnered with Anchor Browser to build a complete solution, based on the x402 protocol extended from the HTTP 402 status code, that enables AI agents to autonomously pay for the resources they access. The core challenge is that the agent needs to spend "someone else's" money but cannot access the wallet private key. AgentCore payments resolves this contradiction through a three-layer architecture of budget checks, isolated signing, and automatic retries: the budget layer prevents overspending, the signing layer completes transaction signing in a controlled environment the agent cannot reach, and the retry layer automatically replays the original request after payment confirmation. This solution allows agents to operate in an open web environment while both accessing paid APIs and resources frictionlessly and ensuring fund security, providing deployable trust infrastructure for the agent economy.
Related articles

Understanding DeepSeek in 3 Minutes: The Rise from a Quant Hedge Fund to an Open-Source AI Leader
DeepSeek's history in 3 minutes: from High-Flyer Quant's compute build-up to V2's MLA inference cost cuts, V3's $5.576M training bill, R1's open-source global shock, and V4 with a $7B Series A.

Local Creative Writing Model Showdown: Fine-tuned Qwen3.8 27B Wins, DeepSeek v4.1 Underwhelms
Bilibili creator tests seven local creative writing models: Hemingway and HumanLike Chat based on Qwen3.8 27B perform best, DeepSeek v4.1 is plain, Dongfang Shuo ranks last with confused characters. Includes three test prompts, scores, and usage advice.

Liang Wenfeng's Three Big Bets: Why Did DeepSeek Open-Source Its 82% Gross Margin?
Why did DeepSeek open-source DeepInfer, its 82% gross margin inference framework, and then launch a hundred-billion funding round? An analysis of Liang Wenfeng's three big bets and the open-source strategy.