AWS Builder Center
Agents for Humans: how a restaurant runs as a public agent on AgentCore

Agents for Humans: how a restaurant runs as a public agent on AgentCore

A restaurant deployed as a headless public agent with Strands on Amazon Bedrock AgentCore: anonymous A2A discovery through a Gateway, menu answers grounded in a Managed Knowledge Base, Bedrock Guardrails on the model call, and durable state in one DynamoDB table. Each constraint forced the next architectural choice, and the chain broke exactly once: at the payment.

Series: Headless Merchants, Real Payments (3 articles)

  1. 1
    Agents for Humans: how a restaurant runs as a public agent on AgentCore This article
Solutions Architect DevOps AI Engineer and CTO of TeamWork Mauritius

Agents for Humans: how a restaurant runs as a public agent on AgentCore

Part 1 of 3 in Headless Merchants, Real Payments.  Part 2  covers the money: x402, AgentCore Payments and where the human says yes.  Part 3  covers what the ecosystem still needs. The thread: merchant agents will replace websites, and  table-relay  is a working illustration.
A website is a human interface. It renders for eyeballs and collects input through forms. When a customer arrives through an AI assistant instead of a browser, none of that is reachable. The assistant needs an endpoint, a machine-readable description of what the business can do, and a way to transact.
Assembling that yourself is the whole job. You must pick a protocol agents can speak and host a server for it. You must expose discovery that works without credentials, because an assistant meeting your business for the first time has nothing to authenticate with. You must ground answers about your own inventory in your own data. You must make a public endpoint safe against injection and stop it leaking customer details. You must keep state durable across turns and containers. And you must settle money, which means a payment processor and everything attached to it.
Set against that list, paying a platform 15-30% is a rational trade. The platform absorbs the integration work and rents the customer relationship back to you.
 table-relay  is a restaurant that runs as a headless public agent instead: a Strands agent on Amazon Bedrock AgentCore, reachable anonymously by any A2A client (A2A being the Agent2Agent protocol), answering menu questions grounded in a Managed Knowledge Base, taking a stablecoin deposit with a human approving every payment. Merchant cost of entry is one agent card, one text file and one wallet address.
What follows is not a feature tour. It is a chain: each constraint forced the next choice, and the last one forced a design I did not plan. Payments have their own post; this covers everything up to the money.

Every box is in the repository. The dashed AWS boundary is one account, one region.
 Watch the 2 minute 41 second demo : anonymous discovery, a grounded menu answer, one human approval, and a USDC deposit settled on Base Sepolia.

The card is the interface

Before an assistant can act, it has to learn what a business can do. A2A answers that with an agent card: JSON at a well-known path carrying identity, skills and an endpoint. Skills map onto tools, so the card is generated from the same definitions the model already sees. Describe the business once and both the model and the network get the same description.
AgentCore Runtime speaks  serverProtocol=A2A  natively, so the runtime serves JSON-RPC and the card with no HTTP shim in front. Strands supplies the server:
from bedrock_agentcore import serve_a2a
from strands.multiagent.a2a import A2AServer

# One skill per @tool. The card and the model read from the same source.
card = A2AServer(agent).public_agent_card
serve_a2a(executor, agent_card=card) # port 9000, JSON-RPC, card endpoint
Strands documents deployment to Lambda, Fargate, App Runner and EKS, and any of them would serve this. Two properties chose AgentCore Runtime. Sessions are isolated per conversation and pinned by a session id header, which a merchant agent needs because a table held on one turn must still be held on the next. And direct-code deployment takes a Python zip through Amazon S3. No Dockerfile, no Amazon ECR repository, no ARM64 cross-build on a laptop. For a five-tool agent, container tooling is most of the work and none of the value.
The five tools are deliberately coarse:  search_availability ,  hold_table ,  get_reservation ,  confirm_with_deposit ,  check_menu . One per business intent, never one per data row, because tool selection degrades as the list grows.
Notably absent is an orchestrator. Nothing sequences search, then hold, then charge. The model drives it because the data leaves it no choice: the deposit amount does not exist until  hold_table  returns it. And when a tool returns  {"error": ..., "hint": ...}  rather than raising, the model reads the hint and fixes itself on the next cycle. Charging the wrong deposit self-corrects in six loop cycles with no retry logic anywhere in the codebase.
All of which assumes a client can actually fetch the card. That assumption is where the design nearly came apart.

So the front door has to be anonymous

An assistant that has never seen your restaurant has no API key and no IAM principal. Put authentication in front of the card and discovery cannot happen at all, and you are back to being listed on someone else's platform, which is the problem.
AgentCore Gateway supports  authorizerType=NONE . It is the only anonymous door in the stack, and the architecture is built around it. The gateway fronts the runtime, serves the card, passes A2A traffic through, and signs outbound requests with its own IAM role. The runtime itself never accepts unauthenticated traffic. Call it directly without credentials and it returns  403 , which is worth keeping as a negative-control test.
So an anonymous client gets a card and a completed booking, and the only unauthenticated component in the system is a gateway that holds no data.
The AgentCore documentation is careful here, and correctly:  NONE  is appropriate only for targets that do not return sensitive data. Fictional table availability clears that bar. A restaurant's menu corpus is a different question.

So the menu needs a different door

"I'm lactose intolerant, what can I eat here?" is a retrieval question. Answered from model parameters it produces confident invention, which for an allergy is the worst available failure.
That argues for a knowledge base, and a knowledge base does not belong behind an anonymous door. So menus run through a second gateway with  AWS_IAM , fronting Amazon Bedrock Managed Knowledge Base as an MCP (Model Context Protocol) target. Two doors, two postures, enforced by configuration rather than by application logic.
Managed Knowledge Base removes the assembly work: managed embeddings, managed parsing, a managed reranker, no vector store to provision. The merchant-facing consequence is the one that matters: onboarding a restaurant is dropping a  .txt  file in Amazon S3 and running one command. No schema, no chunking strategy, no index tuning.
from strands.tools.mcp import MCPClient
from mcp_proxy_for_aws.client import aws_iam_streamablehttp_client

mcp_client = MCPClient(lambda: aws_iam_streamablehttp_client(
endpoint=gateway_url, aws_region="us-east-1", aws_service="bedrock-agentcore",
))
# Tool arrives namespaced as menus___Retrieve; the KB id never leaves the gateway.
The alternative was a classic knowledge base, which needs a vector store, and Amazon OpenSearch Serverless bills for provisioned capacity whether anyone books a table or not. Five menus total nine kilobytes. Usage-billed retrieval is the difference between cents and a standing monthly charge for a workload that idles most of the week.
Two doors settled the data boundary. The anonymous one still pointed straight at a foundation model.

An anonymous endpoint in front of a model is two surfaces at once

One is adversarial. Anything unauthenticated gets probed, and a booking note is free text arriving from strangers.
The other is financial, and it is easier to overlook. Every anonymous request that reaches the agent spends tokens. Rate limiting alone does not bound that, because a rate limit caps requests and tokens are the thing being billed.
Amazon Bedrock Guardrails attach to the model call, so the first surface is configuration rather than architecture:
BedrockModel(
model_id="global.anthropic.claude-sonnet-5",
guardrail_id=GUARDRAIL_ID,
guardrail_trace="enabled",
guardrail_redact_input=True,
guardrail_redact_output=True,
max_tokens=1024, # the financial surface, bounded in the same call
)
Prompt-attack filtering runs on input. PII is anonymised inbound and blocked outbound, so personal data is masked before the model sees it. A jailbreak attempt in a booking note returns a redaction message and confirms nothing. A booking carrying a name, email and phone number completes normally and echoes none of them.
That last behaviour is not only safety, it is the product. The merchant agent receives party size, date and time. Nothing more. A booking platform knows your dining history and monetises it. This architecture cannot, because the tool schemas have no field for it and the guardrail masks anything that arrives anyway. Privacy by schema, not by policy.
The financial surface closes with  max_tokens  on the model and a request rate limit on the gateway. Both are in the config above or one line from it, and both are load-bearing.
Worth knowing: an inline guardrail makes the runtime call  bedrock:ApplyGuardrail . Grant  bedrock:InvokeModel  alone and you get an  AccessDenied  that surfaces as a generic agent execution failure, with the real cause visible only in the runtime's Amazon CloudWatch logs.
Safe and bounded, but still stateless. A held table has to still be held on the next turn.

A held table has to outlive the request

Two kinds of state need durability here, and they want different guarantees.
Seat inventory needs conditional writes. "Hold this table only if it is still free" is a correctness property; lose it and you double-book. Conversation state needs snapshots, so that a hold survives across turns and across containers.
 strands-dynamodb-storage  gives Strands durable sessions on Amazon DynamoDB through the Storage contract. It is byte-oriented and exposes no conditional writes, which makes it right for sessions and wrong for inventory. Rather than run two stores, one on-demand table serves both contracts: the domain ledger through the AWS SDK with conditional updates and an atomic reference counter, and session snapshots under a  session/  key namespace through Strands.
Runtime session affinity already pins a conversation to a container. DynamoDB makes that durable rather than merely sticky: one session holds a table, a different session reads it back. An AgentCore Registry record catalogues the public card, synced from the card the gateway already serves, the same shape a public crawler would need, which is where  Part 3  begins.

Where the money should go, there is no seam

x402 is HTTP-native by design. A merchant answers  402 Payment Required , the client attaches a signed proof, the request succeeds. Clean, and it is what the frozen design called for.
It is also impossible here.  InvokeAgentRuntime  carries no path, the gateway serves the card through a managed API, and A2A JSON-RPC always arrives as a  200  payload. There is no HTTP status seam on AgentCore Runtime to hang a  402  on.
So the payment challenge moves into A2A message metadata, and settlement happens in middleware that runs before the model does. That turned out to be the most consequential design decision in the build, and it is the subject of  Part 2 .

Where these choices sit on the control spectrum

Each step above traded control for removed work, and the trade is only correct at this scale:
Need
Managed choice
What you'd otherwise operate
A2A endpoint
AgentCore Runtime, direct-code zip
Fargate or EKS: Dockerfile, ECR, ARM64 builds, scaling
Anonymous discovery
Gateway  authorizerType=NONE  + rate limit
API Gateway, authorizer, throttling, SigV4 to origin
Grounded menus
Managed Knowledge Base
Vector store, chunking, embeddings, reranker, sync jobs
Safety
Guardrails as model kwargs
Injection classifier, PII detection, prompt hardening
Durable state
DynamoDB on-demand
A server you patch
A merchant agent is a small, spiky, long-tail workload. Nothing in the right-hand column pays back its operational cost at one restaurant's volume, which is exactly why the long tail has never had this capability before.

What it costs

Under $2 of infrastructure for a weekend of live traffic. Managed Knowledge Base in cents at nine kilobytes. Guardrails per text unit. Runtime and gateway usage-billed with near-zero idle. DynamoDB on-demand.
Foundation model tokens dominate everything else. On an anonymous public agent, cost control is an architectural decision rather than a billing alarm, which is why  max_tokens  and the rate limit appear in the design above and not in an appendix.

Conclusion

A restaurant's independence used to cost a platform integration, a payment processor, and the customer relationship. What replaces all three here is an agent card, a text file, a wallet address and roughly 500 lines of Python.
The chain held all the way down: the card demanded an anonymous door, the anonymous door demanded a second authenticated one, both demanded guardrails and a token cap, and state demanded two write contracts on one table. It broke exactly once, at the money, and how it broke is the interesting part.


Code:  table-relay , Apache-2.0, built for the Agents for Humans hackathon. All restaurants, menus and reservations are fictional. All settlement runs on Base Sepolia testnet, so no real funds are involved.

Series: Headless Merchants, Real Payments (3 articles)

  1. 1
    Agents for Humans: how a restaurant runs as a public agent on AgentCore This article
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article