<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: AWS</title>
    <description>The latest articles on DEV Community by AWS (aws).</description>
    <link>https://dev.to/aws</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F1726%2F2a73f1e6-7995-4348-ae37-44b064274c59.png</url>
      <title>DEV Community: AWS</title>
      <link>https://dev.to/aws</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aws"/>
    <language>en</language>
    <item>
      <title>SQL vs NoSQL on AWS (Aurora, RDS or DynamoDB)</title>
      <dc:creator>Ifeanyi O.</dc:creator>
      <pubDate>Sun, 15 Nov 2026 23:51:52 +0000</pubDate>
      <link>https://dev.to/aws/sql-vs-nosql-on-aws-aurora-rds-or-dynamodb-3kp3</link>
      <guid>https://dev.to/aws/sql-vs-nosql-on-aws-aurora-rds-or-dynamodb-3kp3</guid>
      <description>&lt;h2&gt;
  
  
  Intro
&lt;/h2&gt;

&lt;p&gt;A database is one of the few architecture decisions that can be expensive to reverse. Pipelines can get replaced and caches get swapped easily, but by the time you know whether the database choice was right, you already have a schema, query layer and production data that must move together.&lt;/p&gt;

&lt;p&gt;Consider our working example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;You're a software engineer at REXTECH, a company that operates public EV charging stations across the United States and you've been handed the next version of their platform along with ownership of the data layer. The platform does three jobs:&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;em&gt;Drivers open an app to find charging stations near them and see which connectors are free&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;The platform meters and bills each charging session as it happens&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;The operations team needs to know which stations are busy, which are failing and what revenue looks like by region&lt;/em&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;REXTECH runs all this today on a single PostgreSQL database in their own data center. It uses PostGIS, an open-source extension that adds geospatial queries to PostgreSQL, to answer which stations fall within 5 miles of a driver and a trigger writes an audit row every time a session closes.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The company is moving to AWS and opening its first European stations next year, which means the data layer has to be chosen rather than inherited.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This article walks through how to make that decision, beginning with a framing that sends many teams to the wrong answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  SQL vs. NoSQL framing falls short
&lt;/h2&gt;

&lt;p&gt;The first instinct is to treat this as a choice between relational (SQL) and NoSQL, which sounds like a question about the shape of your data, but it rarely is.&lt;/p&gt;

&lt;p&gt;On AWS, there are three services that you'll most likely choose from:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Amazon DynamoDB is a fully managed key-value database where items are stored and retrieved by a key you already hold, with no instances to provision or size at any scale.&lt;/li&gt;
&lt;li&gt;Amazon Aurora is a managed relational database offering PostgreSQL-compatible and MySQL-compatible engines built for AWS, with higher throughput and storage ceilings than the community versions.&lt;/li&gt;
&lt;li&gt;Amazon Relational Database Service (Amazon RDS) is the managed service for running the standard engines directly, covering PostgreSQL, MySQL, MariaDB, SQL Server, Oracle and Db2.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;REXTECH's entire platform could be built on DynamoDB but it could just as reasonably be built on Aurora. Both are durable, both are fully managed and scale well past anything a national charging network will require. That similarity is what makes a data model comparison unhelpful, because when two options are genuinely close, the decision tends to falls back to whichever model the team knows better.&lt;/p&gt;

&lt;p&gt;The deciding factor is when you have to commit to your queries. A relational database allows you to model the data now and work out the queries later, which is what keeps an unplanned reporting question answerable years after the schema is designed. A key-value database inverts that order, asking you to work out the queries first and rewarding you with scaling characteristics that have no practical ceiling.&lt;/p&gt;

&lt;p&gt;Both options will defer something but the key decision to make is which deferral the project can afford.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1. Write down every read operation
&lt;/h2&gt;

&lt;p&gt;This is not an inventory of the data you intend to store but every distinct way the application will retrieve it. For REXTECH, that list comes out roughly as:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Find stations within a radius of a driver's coordinates&lt;/li&gt;
&lt;li&gt;Get the current status of every connector at one station&lt;/li&gt;
&lt;li&gt;Get one charging session by session ID&lt;/li&gt;
&lt;li&gt;Get a driver's session history, most recent first&lt;/li&gt;
&lt;li&gt;Get the current billing total for an in-progress session&lt;/li&gt;
&lt;li&gt;Average utilization per station, by hour, for the last quarter&lt;/li&gt;
&lt;li&gt;Revenue by region and connector type, month over month&lt;/li&gt;
&lt;li&gt;Which stations reported a fault more than three times last week&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Those entries separate into three groups that behave differently.&lt;/p&gt;

&lt;p&gt;Entries 2 - 5 each begin from an identifier the application already holds, whether a station ID, session ID or driver ID and each returns a bounded result. These are key-based reads and DynamoDB serves them at request rates of millions of requests per second with no change to the table as traffic grows.&lt;/p&gt;

&lt;p&gt;Entries 6 - 8 are different. They don't begin from a single identifier, each one aggregates across the whole dataset along a dimension that is not a primary key and each one is a question the operations team raised recently rather than a requirement that shipped with the platform. A relational database answers all three with ordinary queries against the schema you already have. However, DynamoDB needs a separate secondary index, designed in advance, for every one of them.&lt;/p&gt;

&lt;p&gt;Entry 1 sits outside both groups, because finding stations near a driver is a geospatial query that needs PostGIS, that runs only on PostgreSQL, so that read is decided by which engine you pick rather than how you access the data.. The list is the first step in answering the more important question of knowing how confident you are that the list is complete.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2. Test whether list is complete
&lt;/h2&gt;

&lt;p&gt;For entries 2 - 5, confidence is high. Those reads are determined by what the charging hardware does, so they will most likely look the same in three years. For entries 6 - 8, confidence is close to zero, because we anticipate the operations team or finance team asking for another requirement next quarter that wasn't accounted for.&lt;/p&gt;

&lt;p&gt;This produces three outcomes encountered by REXTECH .&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where a group of reads is short, key-based and confidently final, DynamoDB is the answer.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For REXTECH that group is entries 2 - 5, the connector status read and the three session reads. Design the partition key and sort key around them and there are no instances to size and no capacity planning, because on-demand capacity mode adjusts throughput as traffic changes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where the list cannot be finished, Aurora or RDS is the answer.&lt;/strong&gt; REXTECH's operations and finance queries are the clearest instance of this. If you cannot finish the list, that in itself tells you queries will arrive which you cannot design for today. A relational schema queried with SQL is well suited to exactly that, since the schema describes the data rather than a specific read path.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where the list is complete but contains joins or aggregations, Aurora or RDS is again the answer.&lt;/strong&gt; Entries 6 - 8 are aggregations, and DynamoDB has no built-in aggregation, so each would need precomputed totals maintained as sessions are written, usually through DynamoDB Streams and a Lambda function. However, a relational engine offers all three directly from the tables that already exist.&lt;/p&gt;

&lt;p&gt;Most teams cannot finish the list and that is the single most common reason they'll choose relational. What's not accounted for in this execercise is how hard requiremesnts can override this process.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3. Check the requirements that override decision
&lt;/h2&gt;

&lt;p&gt;The read list gives you a starting answer but it's not neccesarily the final one. Three requirements can override it, which REXTECH runs into.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A dependency on a specific engine feature.&lt;/strong&gt; Finding stations near a driver requires PostGIS and that requirement will decide station search before access patterns enter the conversation, pointing to Aurora PostgreSQL or RDS for PostgreSQL. The same reasoning applies to pgvector for vector search, pg_trgm for fuzzy text matching and to procedural languages and triggers. Check for this first, since it can eliminate options before you evaluate anything else.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An existing database being migrated.&lt;/strong&gt; REXTECH already runs PostgreSQL with a working schema and a trigger the audit process depends on and between Aurora and RDS there are nine engines to choose from, so the odds are good one of them already speaks what the application speaks. In practice, using what the application already expects, offers less complexity and is more desired by teams than moving to new cleaner design.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Write throughput beyond a single instance.&lt;/strong&gt; If REXTECH's writes eventually exceed what one Aurora instance can absorb, or if drivers on two continents need to write to the same logical database, relational options exist rather than an automatic move to DynamoDB. Aurora PostgreSQL Limitless Database shards automatically while preserving a single-database experience, and Aurora DSQL is a serverless distributed SQL database, also PostgreSQL-compatible, that spreads writes across Regions with active-active replication and strong consistency. You no longer have to leave SQL behind to scale writes horizontally. Two parts of that need unpacking though involving what serverless actually means across these services and where Aurora DSQL draws its line.&lt;/p&gt;

&lt;h2&gt;
  
  
  Things that trip teams up
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Serverless tends to means two different things.&lt;/strong&gt; Serverless operations means there are no instances to provision, size or patch, so you receive an endpoint and begin querying, which is how DynamoDB, Aurora DSQL and Amazon Keyspaces work. Serverless capacity means you still create and operate a cluster while its compute and storage scale automatically, which is what Aurora PostgreSQL and Aurora MySQL offer as Aurora Serverless v2. One removes the cluster and the other removes the capacity planning, so if the goal is fewer things to operate rather than a smaller bill, serverless capacity does not neccesserilly achieve it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Aurora DSQL draws its line at the schema.&lt;/strong&gt; It supports foreign keys, table relationships, JOIN operations and views, so having a relational schema is not grounds for ruling it out, which is the reason teams most often cite. What decides it is whether the rest of the schema fits a deliberately smaller PostgreSQL surface. Triggers, stored procedures and temporary tables are not supported, each cluster holds a single database and transaction isolation is fixed at Repeatable Read. Two constraints shape application code: a single transaction can modify up to 3,000 rows, so REXTECH's nightly billing batch has to be chunked, and optimistic concurrency control returns a serialization error at commit rather than blocking on a lock, so the application needs retry logic with backoff.&lt;/p&gt;

&lt;h2&gt;
  
  
  REXTECH's decision
&lt;/h2&gt;

&lt;p&gt;Charging sessions, billing and the operations and finance queries go to Aurora PostgreSQL, supported by four independent reasons pointing the same direction. The read list cannot be completed, the queries require joins and aggregates, an existing PostgreSQL schema is worth preserving and PostGIS handles station search. Connector status goes to DynamoDB, where the list is short, key-based and stable for the service life of the hardware, and where the platform's highest-volume read benefits most from an engine that absorbs traffic growth without intervention.&lt;/p&gt;

&lt;h2&gt;
  
  
  How you can begin today
&lt;/h2&gt;

&lt;p&gt;Start with the list. Write down every distinct read the application performs, including the ones that feel obvious, then mark each with how confident you are that it will still be there in a couple years. Where a group of reads is short, key-based and complete, design a DynamoDB table around it. Where the list cannot be finished, or where it needs joins and aggregations, choose Aurora or RDS. Then check the result against the three overrides, since an extension dependency, a migration or write volume beyond one instance will override whatever the access patterns are.&lt;/p&gt;

&lt;p&gt;One caution if you verify any of this with a coding assistant. Three specifics in this post changed within roughly the last year and a model's training data has a cutoff that service limits do not respect. AWS publishes reusable skills through the &lt;a href="https://aws.amazon.com/products/developer-tools/agent-toolkit-for-aws/?trk=9863b7a2-22fd-49a4-9719-adca9eb72872&amp;amp;sc_channel=ps&amp;amp;ef_id=EAIaIQobChMIyZ2hsPyFmAMVk7SuBR3xigPhEAAYASAAEgLTL_D_BwE:G:s&amp;amp;gads_camp=23532468220&amp;amp;gads_ag=202990383729&amp;amp;gads_ad=825079690030&amp;amp;gads_kw=aws%20agent%20toolkit&amp;amp;gads_matchtype=e&amp;amp;gads_network=g&amp;amp;gads_device=c&amp;amp;gads_geo=9197808&amp;amp;gad_campaignid=23532468220&amp;amp;gbraid=0AAAAADjHtp9tBoroOTb4-LucFSCpb-IY_&amp;amp;gclid=EAIaIQobChMIyZ2hsPyFmAMVk7SuBR3xigPhEAAYASAAEgLTL_D_BwE" rel="noopener noreferrer"&gt;Agent Toolkit for AWS&lt;/a&gt; for this, including one that routes database questions to current service guidance. Leverage it to confirm the limits your design depends on to guide you in making a decision.&lt;/p&gt;

&lt;h2&gt;
  
  
  Additional resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/decision-guides/latest/decision-guides/databases-on-aws-how-to-choose.html" rel="noopener noreferrer"&gt;Choosing an AWS database service&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/data-modeling.html" rel="noopener noreferrer"&gt;Modeling data in DynamoDB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/aurora-dsql/latest/userguide/working-with-postgresql-compatibility-supported-sql-features.html" rel="noopener noreferrer"&gt;Aurora DSQL supported SQL features&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.html" rel="noopener noreferrer"&gt;Aurora Serverless v2 scaling and capacity&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Authored by:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/ifeanyiotuonye/" rel="noopener noreferrer"&gt;&lt;strong&gt;Ifeanyi Otuonye&lt;/strong&gt;&lt;/a&gt; Developer Experience Engineer, AWS&lt;/p&gt;

</description>
      <category>dynamodb</category>
      <category>aws</category>
      <category>sql</category>
      <category>nosql</category>
    </item>
    <item>
      <title>How emulators might catch what you might miss</title>
      <dc:creator>Salih Guler </dc:creator>
      <pubDate>Wed, 11 Nov 2026 18:07:48 +0000</pubDate>
      <link>https://dev.to/aws/how-emulators-might-catch-what-you-might-miss-34hd</link>
      <guid>https://dev.to/aws/how-emulators-might-catch-what-you-might-miss-34hd</guid>
      <description>&lt;p&gt;I build plenty of apps due to the nature of my job. I use coding agents extensively. I decide what gets built and review what the agent writes. Tests are a big part of my development process as it ensures that whatever my agents build is up to standard.  &lt;/p&gt;

&lt;p&gt;Recently, I was working on a game that allows users to work as a bartender. In this game, you are expected to take orders, deliver them, and charge your customers. When the agent built the feature for charging the customers, it actually implemented a false-positive test: the test passed, but it shouldn’t have. In the application, orders arrive through an &lt;a href="https://aws.amazon.com/sqs/" rel="noopener noreferrer"&gt;Amazon Simple Queue Service (Amazon SQS)&lt;/a&gt; queue. One of its tests simulated a crashed worker by charging an order and then forgetting to delete the message, forcing the message to be redelivered. The agent used the receipt handle as its key to prevent double-charging.  Because SQS generates a new receipt handle for each delivery of the message, the check didn't recognize the order. This means the customer would have paid twice. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxk1n4sitrml6arqlhag0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxk1n4sitrml6arqlhag0.png" alt="An order flows from the customer through the Amazon SQS queue to the bartender and the tab. A forgotten DeleteMessage sends the same order back to the queue with a new receipt handle." width="799" height="415"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How could we have prevented this? Mocking an AWS service’s response works well for the happy path. But this example shows the dangers of assuming exactly what the service will return.  Every rule the service enforces must first be in the test author's head, and the mock never tells you what you left out.  &lt;/p&gt;

&lt;p&gt;To cover what you are missing, you can run the tests on the actual cloud. But this means having an infrastructure to test against. Sometimes we run thousands of tests on different branches, but that incurs costs. On top of that, integration tests are sensitive to concurrent tests modifying shared resources. An alternative is something we call emulation. An emulator acts like the service you are calling, allowing you to run your app against your target APIs on your machine. Emulators can be used for a range of use cases, from emulating the behavior of an Android phone to emulating cloud APIs.  &lt;/p&gt;

&lt;p&gt;Today we announced the &lt;a href="https://aws.amazon.com/products/developer-tools/emulator/" rel="noopener noreferrer"&gt;AWS Emulator&lt;/a&gt;, a local emulator that lets you test your AWS applications on your own machine, with no network access and no additional service fee. Your code sends the same requests to AWS Emulator instead of the cloud. The emulator checks each request, stores the data, and answers the way the service would. The rules live in the emulator, so a test can run into rules its author never thought about. It needs no deployment and no AWS account, so you can run it on every change.  &lt;/p&gt;

&lt;p&gt;When I ran the same tests for my bartender game against AWS Emulator, the order was re-delivered after its visibility timeout (the time Amazon SQS hides a message that's being handled), with a new receipt handle (the ID Amazon SQS gives each delivery). The test failed, and the agent automatically implemented a new solution that used the order id to prevent double charging. &lt;/p&gt;

&lt;h2&gt;
  
  
  How emulation got here, and where it fits
&lt;/h2&gt;

&lt;p&gt;Running AWS services on your own machine isn't new. AWS has shipped local emulators for more than a decade. DynamoDB Local came out in 2013. The AWS Serverless Application Model (AWS SAM) CLI runs AWS Lambda functions and Amazon API Gateway routes on your machine. AWS Step Functions, AWS Glue, and the Lambda runtime each have their own local tools.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjvcme6ud9ctjsqgr22vl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjvcme6ud9ctjsqgr22vl.png" alt="A timeline from DynamoDB Local in 2013 through AWS SAM CLI, Step Functions Local and LocalStack to AWS Emulator today." width="800" height="164"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A broader ecosystem has also evolved toward helping developers emulate cloud behavior. AWS partner &lt;a href="https://www.localstack.cloud/" rel="noopener noreferrer"&gt;LocalStack&lt;/a&gt; has helped many developers test AWS applications locally for years. How well any emulator does the job depends on its fidelity, meaning how closely it answers like the real service. Waldemar Hummer, co-founder and CTO of LocalStack, sees the next step as a shared one: &lt;/p&gt;

&lt;p&gt;"&lt;em&gt;At LocalStack, we believe that cloud development should be fast, local, and accessible to every developer. AWS's investment in local cloud emulation is a testament to the role of local cloud development for the AWS community. We believe there's a significant opportunity to move the ecosystem forward together, from improving emulator fidelity and establishing open testing standards to integrating emulators of all kinds into the development experience our users rely on. LocalStack is excited to work with AWS to build on this vision of a unified emulator ecosystem.&lt;/em&gt;"&lt;/p&gt;

&lt;p&gt;We wanted to contribute to this ecosystem. Our AI agents have generated and are constantly evolving a suite of fidelity tests that they use to autonomously improve AWS Emulator’s fidelity. We’ve made both these fidelity tests and AWS Emulator’s source code available &lt;a href="https://github.com/aws/aws-emulator" rel="noopener noreferrer"&gt;on GitHub&lt;/a&gt; as a public domain dedication under CC0 1.0 license. We did this so that anyone can use them to learn from how we approached the problem or integrate them directly into their product. &lt;/p&gt;

&lt;h2&gt;
  
  
  Why emulators are so important for agents
&lt;/h2&gt;

&lt;p&gt;With the increase usage of AI coding agents, it is increasingly important for agents to be able to test end-to-end locally. This is why one of our primary focuses is building products like AWS Emulator that help customers give their agents more autonomy when building software. &lt;/p&gt;

&lt;p&gt;Every copy of AWS Emulator is isolated, with its own port, keys, and state. Several agents can each run their own copy without sharing a test account, and none of them needs credentials for your AWS account. This enables you to run multiple agents in parallel, each implementing and testing different features.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9nm55cyqcz0u8truw1gc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9nm55cyqcz0u8truw1gc.png" alt="Three coding agents each run their own copy of AWS Emulator, and none of them reaches your AWS account." width="800" height="463"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We used similar techniques as we built AWS Emulator itself. Agents verified their implementations locally, so they could build more autonomously and with higher quality. As a result, we delivered faster, and customers got the tools they needed to innovate faster. &lt;/p&gt;

&lt;p&gt;A quote from James Greenfield, VP of AWS Platform Experience, sheds more light on this commitment: &lt;/p&gt;

&lt;p&gt;"&lt;em&gt;Our customers have been asking for high fidelity emulators. We've focused on some of our most popular services such as DynamoDB, but this has left customers without options for some of our other services. AI has enabled us to move much more quickly. Because building an emulator is particularly well suited to agentic development, we've been able to use thousands of agents to deliver a high-fidelity emulator that covers the breadth of AWS. We think customers will also love that any discovered issue is fixed in a matter of hours.&lt;/em&gt;"&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;An emulator checks your code against the service's own rules, including the ones you never thought of checking. In my project, that was the difference between a passing test and a customer paying twice. Coding agents widen the gap, because the agent that writes your code also writes your tests, including any mocks. Keep the mocks for the logic that you control. However, when your code depends on how an AWS service behaves, run it against an emulator. &lt;/p&gt;

&lt;p&gt;To get started, see the &lt;a href="https://docs.aws.amazon.com/emulator/latest/userguide/" rel="noopener noreferrer"&gt;AWS Emulator documentation&lt;/a&gt; and the &lt;a href="https://github.com/aws/aws-emulator" rel="noopener noreferrer"&gt;AWS Emulator GitHub repository&lt;/a&gt;. Also ask your coding agent to install the Emulator skill to check whether your application can run fully against the emulator. Run your tests against the emulator, and if one of your tests catches something your mocks missed, tell me about it in the comments. &lt;/p&gt;

</description>
      <category>aws</category>
      <category>testing</category>
      <category>ai</category>
      <category>devops</category>
    </item>
    <item>
      <title>Once Upon Agentic AI (Part 1): Create your own agent and forge its tools with Strands Agents</title>
      <dc:creator>TheWitcherish</dc:creator>
      <pubDate>Tue, 10 Nov 2026 08:45:56 +0000</pubDate>
      <link>https://dev.to/aws/once-upon-agentic-ai-part-1-create-your-own-agent-and-forge-its-tools-with-strands-agents-22mo</link>
      <guid>https://dev.to/aws/once-upon-agentic-ai-part-1-create-your-own-agent-and-forge-its-tools-with-strands-agents-22mo</guid>
      <description>&lt;p&gt;On Day1, three heroes that nothing destined to cross went on a journey to write the same legend. &lt;a href="https://github.com/TheWitcherish" rel="noopener noreferrer"&gt;TheWitcherish&lt;/a&gt; from the Order of Developers, &lt;a href="https://amagash.github.io/" rel="noopener noreferrer"&gt;Amagash&lt;/a&gt; from the Order of Agents, and &lt;a href="https://tagazok.github.io/" rel="noopener noreferrer"&gt;Tagazok&lt;/a&gt; from the Order of Builders.&lt;br&gt;
And high above it all, an &lt;a href="https://builder.aws.com/community/@nataliastones?tab=articles" rel="noopener noreferrer"&gt;Orchestrator&lt;/a&gt; agent watched over this world.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyj37q6vp69iwebxea34l.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyj37q6vp69iwebxea34l.webp" title="Three heroes - TheWitcherish, Amagash, Tagazok" alt="Three heroes - TheWitcherish, Amagash, Tagazok" width="576" height="760"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The series follows the adventure in three parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;This article&lt;/strong&gt;: Create your first agent, equip it with a Vended tool, then write a tool of your own.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Part 2&lt;/strong&gt;: MCP (Model Context Protocol) explored via the MCP Inspector and Strands Agents Harness SDK.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Part 3&lt;/strong&gt;: RAG (Retrieval-Augmented Generation), A2A (Agent2Agent) and structured output with an orchestrator agent leading specialized agents.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By the end of Part 1, your agent tells a story, looks up a spell in a real rules API, and rolls real dice with a power you wrote. You'll also be able to prove each of those from the log.&lt;/p&gt;
&lt;h2&gt;
  
  
  Get started
&lt;/h2&gt;

&lt;p&gt;To complete our heroes quest, you need Python, &lt;a href="https://docs.astral.sh/uv/" rel="noopener noreferrer"&gt;uv&lt;/a&gt;, a terminal, and AWS credentials with access to Amazon Bedrock.&lt;br&gt;
As our three heroes share one adventure, you write the code behind each step of their quest with &lt;a href="https://strandsagents.com/" rel="noopener noreferrer"&gt;Strands Agents&lt;/a&gt;, an open source SDK for AI agents in Python and TypeScript.&lt;/p&gt;

&lt;p&gt;The code lives in &lt;a href="https://github.com/aws-samples/sample-once-upon-agentic-ai" rel="noopener noreferrer"&gt;aws-samples/sample-once-upon-agentic-ai&lt;/a&gt;. The &lt;code&gt;main&lt;/code&gt; branch contains skeletons with &lt;code&gt;# TODO&lt;/code&gt; markers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/aws-samples/sample-once-upon-agentic-ai.git ~/sample-once-upon-agentic-ai
&lt;span class="nb"&gt;cd&lt;/span&gt; ~/sample-once-upon-agentic-ai
uv sync
&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;AWS_PROFILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;YOUR_AWS_PROFILE &lt;span class="nv"&gt;AWS_REGION&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;YOUR_AWS_REGION
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No AWS profile yet? The Strands Agents &lt;a href="https://strandsagents.com/docs/user-guide/sdk/model-providers/amazon-bedrock/" rel="noopener noreferrer"&gt;Amazon Bedrock model provider guide&lt;/a&gt; shows how to set up AWS credentials (with &lt;code&gt;aws configure&lt;/code&gt;, environment variables, a boto3 session, or &lt;code&gt;aws login&lt;/code&gt;) and lists the IAM permissions your agent needs to invoke a model. Strands picks those credentials up on its own.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why do we call AI Agents... agents?
&lt;/h2&gt;

&lt;p&gt;Well, agents do have agency, that is why we call them agents. Both words come from the Latin &lt;em&gt;agere&lt;/em&gt;, "to act". A model on its own only answers. An agent decides what to do next and acts on it, using the tools you give it.&lt;/p&gt;

&lt;p&gt;An agent has three parts: a model, a system prompt with its instructions, and tools it may use. When you send a message, the model decides whether to call a tool. It reads the result, then answers or calls another tool. That cycle is the agent loop. Strands runs it for you, handling model calls, tool runs, and conversation history while you write the instructions and tools.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzhmafe6bjpvpnjfw2me8.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzhmafe6bjpvpnjfw2me8.webp" title="The agent loop" alt="The agent loop" width="799" height="667"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is what each part gives our heroes:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Our heroes need to...&lt;/th&gt;
&lt;th&gt;Which means...&lt;/th&gt;
&lt;th&gt;Strands gives us...&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Think and decide&lt;/td&gt;
&lt;td&gt;A brain that reads and chooses what to do&lt;/td&gt;
&lt;td&gt;A model on Amazon Bedrock (default model provider)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Know who they are&lt;/td&gt;
&lt;td&gt;A standing instruction&lt;/td&gt;
&lt;td&gt;A system prompt&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Act beyond words&lt;/td&gt;
&lt;td&gt;Reaching outside the model&lt;/td&gt;
&lt;td&gt;Tools: ready-made ones from &lt;code&gt;strands.vended_tools&lt;/code&gt;, or your own with &lt;code&gt;@tool&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Step 1 gives the model its system prompt. Steps 2 and 3 give it tools.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Does an agent need more than one line?
&lt;/h2&gt;

&lt;p&gt;"Our heroes had just arrived in the realm. No map, no weapons, not a single spell." Your first agent arrives the same way: a voice, and nothing in its hands.&lt;/p&gt;

&lt;p&gt;Summons it with debug logs, a system prompt, and one call:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;strands&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;Agent&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;logging&lt;/span&gt;

&lt;span class="n"&gt;logging&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getLogger&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"strands"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setLevel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;logging&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;DEBUG&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;logging&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;basicConfig&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nb"&gt;format&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"%(levelname)s | %(name)s | %(message)s"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;handlers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;logging&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;StreamHandler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Agent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;system_prompt&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"You are a game master for a fantasy role-playing game"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Hi, I am an adventurer ready for adventure!"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Agent(system_prompt=...)&lt;/code&gt; gives the model an instruction for every turn. Here it makes the agent the storyteller of a fantasy role-playing game. Without a model argument, Strands uses Amazon Bedrock with Claude Sonnet 4.6 by default. Bedrock is a serverless AWS service that runs models from several providers for you behind its APIs, so trying another model means changing a model ID, not rewriting your agent.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/sample-once-upon-agentic-ai/1_strands_basics
uv run python simple_agent.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The debug logs show what the SDK does:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DEBUG | strands.models.bedrock | config=&amp;lt;{'model_id': 'global.anthropic.claude-sonnet-4-6', ...}&amp;gt; | initializing
DEBUG | strands.tools.registry | tool_count=&amp;lt;0&amp;gt; | tools configured
DEBUG | strands.models.bedrock | request=&amp;lt;{'modelId': 'global.anthropic.claude-sonnet-4-6', 'messages': [...], 'system': [...]}&amp;gt;
DEBUG | strands.event_loop._retry | stop_reason=&amp;lt;end_turn&amp;gt; | model call succeeded, ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One request, no tools, and &lt;code&gt;stop_reason=&amp;lt;end_turn&amp;gt;&lt;/code&gt;: the model finished in one turn. The agent opened a scene:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;The torchlight flickers as you step into the worn wooden tavern. The smell of ale and woodsmoke fills the air. A grizzled barkeep eyes you from across the room.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Then the barkeep added: "We don't get many fresh faces in Thornhaven these days." One sentence summoned a tavern and named a town. No map, no weapons: &lt;code&gt;tool_count=&amp;lt;0&amp;gt;&lt;/code&gt;. Keep &lt;code&gt;DEBUG&lt;/code&gt; on. The agent sounds like it knows the rules, but it has no book to check them in.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Does the agent already know Fireball?
&lt;/h2&gt;

&lt;p&gt;"Before conquering anything, they first had to equip themselves."&lt;br&gt;
Our heroes enter a shop that promises everything they need. One of them is hungry. "No, we don't do burgers here," the shopkeeper answers, "but there's plenty of other stuff that should interest you."&lt;br&gt;
Our heroes expected a few trinkets; they found a treasure.&lt;/p&gt;

&lt;p&gt;A tool is a function described to the model, which decides whether to call it. A vended tool comes ready-made in &lt;code&gt;strands.vended_tools&lt;/code&gt;. Here, &lt;code&gt;http_request&lt;/code&gt; calls web APIs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;strands&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;vended_tools&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;http_request&lt;/span&gt;

&lt;span class="n"&gt;agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Agent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;http_request&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;system_prompt&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The system prompt points to &lt;a href="https://open5e.com/" rel="noopener noreferrer"&gt;Open5e&lt;/a&gt;, an open fantasy-RPG rules API, then asks: "What does the Fireball spell do, and how much damage does it deal?" Copy step 1's logging block, then run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/sample-once-upon-agentic-ai/2_vended_tools
uv run python agent_with_vended_tools.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here is the trace of what the SDK does:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DEBUG | strands.tools.registry | tool_count=&amp;lt;1&amp;gt; | tools configured
DEBUG | strands.event_loop._retry | stop_reason=&amp;lt;tool_use&amp;gt; | model call succeeded, ...
DEBUG | strands.tools.executors._executor | tool_use=&amp;lt;{..., 'name': 'http_request', 'input': {'method': 'GET', 'url': 'https://api.open5e.com/v2/spells/srd_fireball/'}}&amp;gt; | streaming
Tool #1: http_request
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first turn ends with &lt;code&gt;stop_reason=&amp;lt;tool_use&amp;gt;&lt;/code&gt;. The model built the URL, Strands ran it, and the result began &lt;code&gt;{"status": 200, "status_text": "OK", ...}&lt;/code&gt;. Only then did the agent answer:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Casting Time:&lt;/strong&gt; Action&lt;br&gt;
&lt;strong&gt;Range:&lt;/strong&gt; 150 feet&lt;br&gt;
...&lt;br&gt;
&lt;strong&gt;Failed save:&lt;/strong&gt; The target takes &lt;strong&gt;8d6 fire damage&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The API's JSON says &lt;code&gt;"range": 150&lt;/code&gt; and &lt;code&gt;"casting_time": "action"&lt;/code&gt;; the reply repeats both. You wrote no code to choose the tool: the model chose it, and the log proves it. But a shop only sells tools someone else made.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Is a function already a tool?
&lt;/h2&gt;

&lt;p&gt;"Saddlebags full and hearts light, our heroes continued on their way."&lt;br&gt;
Two of them stride ahead. Behind them, TheWitcherish leafs through the grimoire he has just acquired.&lt;/p&gt;

&lt;p&gt;Suddenly, he shouts "WAIT!" and announces an extraordinary power. The power: "It's 13h37." The party is not impressed. Then comes a better idea: "you can write your own powers!" How? "All we have to do is create a function, then declare it as a tool."&lt;/p&gt;

&lt;p&gt;You turn a function into a tool with a decorator, a line beginning with &lt;code&gt;@&lt;/code&gt; above the function. In Strands, it is &lt;code&gt;@tool&lt;/code&gt;. The &lt;a href="https://strandsagents.com/docs/user-guide/sdk/tools/custom-tools/" rel="noopener noreferrer"&gt;custom tools docs&lt;/a&gt; explain how Strands reads the function's docstring and type hints to build the tool specification shown to the model.&lt;/p&gt;

&lt;p&gt;Our custom tool is a dice roller, trimmed here:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;strands&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;Agent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tool&lt;/span&gt;

&lt;span class="nd"&gt;@tool&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;roll_dice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;faces&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="s2"&gt;"""Roll one die with a given number of faces and return the result.
    ...
    """&lt;/span&gt;
    &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;randint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;faces&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;dice_master&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Agent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;roll_dice&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;system_prompt&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The system prompt makes the agent "Lady Luck", who rolls four dice for each ability score and drops the lowest. When the agent is built, the log shows the new tool being registered:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DEBUG | strands.tools.registry | tool_name=&amp;lt;roll_dice&amp;gt;, tool_type=&amp;lt;function&amp;gt;, is_dynamic=&amp;lt;False&amp;gt; | registering tool
DEBUG | strands.tools.registry | tool_count=&amp;lt;1&amp;gt; | tools configured
agent built, tools: ['roll_dice']
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The solution prints &lt;code&gt;roll_dice.tool_spec&lt;/code&gt;, the specification sent to the model:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{'name': 'roll_dice', 'description': 'Roll one die with a given number of faces and return the result.\n\n...', 'inputSchema': {'json': {'properties': {'faces': {'default': 6, ..., 'type': 'integer'}}, 'type': 'object'}}}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The docstring became the description, the type hint became &lt;code&gt;'type': 'integer'&lt;/code&gt;, and the default became &lt;code&gt;'default': 6&lt;/code&gt;. The model reads this specification, not your code, so a clear docstring helps it choose the tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  Time to roll the dice!
&lt;/h2&gt;

&lt;p&gt;Run the chapter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/sample-once-upon-agentic-ai/3_custom_tools
uv run python agent_with_dice_roll_tool.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The trace shows each step the SDK takes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DEBUG | strands.event_loop._retry | stop_reason=&amp;lt;tool_use&amp;gt; | model call succeeded, ...
DEBUG | strands.tools.executors._executor | tool_use=&amp;lt;{..., 'name': 'roll_dice', 'input': {'faces': 6}}&amp;gt; | streaming
...
Tool #1: roll_dice
...
Tool #16: roll_dice
DEBUG | strands.event_loop._retry | stop_reason=&amp;lt;end_turn&amp;gt; | model call succeeded, ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Lady Luck requested all 16 dice in one turn. Strands ran the tool 16 times, returned the results, and the second model call answered:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;STRENGTH&lt;/strong&gt;&lt;br&gt;
Rolls: 3, 1, 1, 3 -&amp;gt; Drop the &lt;strong&gt;1&lt;/strong&gt; (one of them) -&amp;gt; &lt;strong&gt;3 + 1 + 3 = 7&lt;/strong&gt;&lt;br&gt;
...&lt;br&gt;
&lt;strong&gt;CHARISMA&lt;/strong&gt;&lt;br&gt;
Rolls: 2, 6, 5, 3 -&amp;gt; Drop the &lt;strong&gt;2&lt;/strong&gt; -&amp;gt; &lt;strong&gt;6 + 5 + 3 = 14&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The 16 tool results in the full log carry every one of those numbers, in the same groups Lady Luck used: 3, 1, 1, 3; 1, 2, 4, 3; 3, 2, 1, 2; and 2, 6, 5, 3.&lt;/p&gt;

&lt;p&gt;The log is the record. When I asked step 1's tool-free agent the Fireball question, it also said 8d6, so the reply alone can't tell you whether a tool ran. &lt;code&gt;tool_count&lt;/code&gt;, &lt;code&gt;stop_reason&lt;/code&gt; and each &lt;code&gt;Tool #&lt;/code&gt; line can.&lt;/p&gt;

&lt;p&gt;Tagazok decided to write his own custom tool decorated with &lt;code&gt;@tool&lt;/code&gt;: &lt;code&gt;def fire_sword():&lt;/code&gt;&lt;br&gt;
That is AWSome!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9f0lp81zuqcot7f04lju.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9f0lp81zuqcot7f04lju.webp" title="Once Upon Agentic AI - Strands Agents Comic Book" alt="Once Upon Agentic AI - Strands Agents Comic Book" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Follow the adventurers
&lt;/h2&gt;

&lt;p&gt;In Part 2, our heroes seek help beyond their own strength. We equip them with an MCP server as another monster, greater and mightier, awaits them!&lt;/p&gt;

&lt;p&gt;Until then, three habits for your own agent:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Start with the system prompt.&lt;/strong&gt; Settle the agent's role and rules before you add tools.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write the docstring for the model.&lt;/strong&gt; Read the &lt;code&gt;tool_spec&lt;/code&gt; before the model does.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Let the model choose.&lt;/strong&gt; If you catch yourself writing &lt;code&gt;if&lt;/code&gt; statements to pick a tool, that rule belongs in the system prompt.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;P.S.:&lt;/strong&gt; Their adventure is also a comic book. If you would like your own copy, the &lt;a href="https://builder.aws.com/content/3JBIHBGNv5kA724pju3QPFtkXML/once-upon-agentic-ai-with-strands-agents" rel="noopener noreferrer"&gt;Once Upon Agentic AI with Strands Agents&lt;/a&gt; page lists where to buy it in North America, Europe and Asia Pacific.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The comic book illustrations in this blog post were created and produced by &lt;/em&gt;&lt;a href="https://www.holybird.fr/" rel="noopener noreferrer"&gt;&lt;em&gt;Holy Bird&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, based on the AWS workshop.&lt;/em&gt;&lt;br&gt;
All rights reserved.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>aws</category>
      <category>mcp</category>
    </item>
    <item>
      <title>Qué pasa cuando activas las funciones avanzadas en AWS</title>
      <dc:creator>Axel Espinosa</dc:creator>
      <pubDate>Fri, 06 Nov 2026 20:01:32 +0000</pubDate>
      <link>https://dev.to/aws/que-pasa-cuando-activas-las-funciones-avanzadas-en-aws-4j6e</link>
      <guid>https://dev.to/aws/que-pasa-cuando-activas-las-funciones-avanzadas-en-aws-4j6e</guid>
      <description>&lt;p&gt;Si creaste tu cuenta de AWS hace poco, lo que viste no es el AWS del que hablan la mayoría de los tutoriales. Te registraste con un social login como Google o GitHub, nunca tuviste que poner un Account ID ni configurar un usuario root, y en lugar de "cuentas" la consola te habla de "proyectos". A eso AWS le llama la nueva experiencia.&lt;/p&gt;

&lt;p&gt;La nueva experiencia te da controles que AWS gestiona por ti y te pone límites a propósito:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Una sola región&lt;/strong&gt; para todos tus proyectos.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Un subconjunto de servicios&lt;/strong&gt; disponibles.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Políticas que AWS mantiene por ti&lt;/strong&gt;, para que no tengas que escribirlas.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Un límite de gasto&lt;/strong&gt; que puede pausar tus proyectos para que no te pases del monto que tú definiste.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;La idea es que puedas aprender y construir sin preocuparte por configurar la gobernanza de una cuenta ni por llevarte una factura sorpresa.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Si quieres conocer a detalle la nueva experiencia desde el lado de quien va comenzando, Ramses Mata lo explica en &lt;a href="https://builder.aws.com/content/3KHR0SqItiRIfvXd7RugtOEpFIl/que-significa-el-nuevo-aws-para-las-personas-que-van-comenzando?trk=02b062ab-d194-401f-85b7-db6aae204076&amp;amp;sc_channel=el" rel="noopener noreferrer"&gt;Qué significa el nuevo AWS para las personas que van comenzando&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5za43jmpta7zjmx291vx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5za43jmpta7zjmx291vx.png" alt="Activar funciones avanzadas" width="800" height="95"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Qué hay debajo de la nueva experiencia
&lt;/h2&gt;

&lt;p&gt;Debajo de esos límites está el mismo AWS de siempre, con algunas piezas configuradas por AWS:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tus proyectos son &lt;strong&gt;member accounts&lt;/strong&gt; dentro de una &lt;strong&gt;AWS Organization&lt;/strong&gt; que AWS administra por ti.&lt;/li&gt;
&lt;li&gt;La región única y la lista de servicios son &lt;strong&gt;Service Control Policies (SCP)&lt;/strong&gt; y &lt;strong&gt;Resource Control Policies (RCP)&lt;/strong&gt; que ya están aplicadas, solo que escritas y mantenidas por AWS.&lt;/li&gt;
&lt;li&gt;El límite de gasto es un mecanismo encima de tu billing, igual que la simplificación de permisos de IAM.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Activar las funciones avanzadas te entrega las llaves de todo eso y te quita los límites.&lt;/p&gt;

&lt;h2&gt;
  
  
  ¿Qué son las funciones avanzadas?
&lt;/h2&gt;

&lt;p&gt;Si entras a &lt;code&gt;settings.aws.com&lt;/code&gt; vas a encontrar una opción que se llama "Explore advanced features", o explorar funciones avanzadas. Es la puerta para salir de la nueva experiencia y administrar tu AWS directamente: tu organización, tus políticas, tus regiones y tus costos.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Antes de poder activar las funciones avanzadas necesitas hacer un upgrade de tu cuenta a un plan de pago. &lt;a href="https://docs.aws.amazon.com/accounts/latest/reference/upgrade-account.html?trk=02b062ab-d194-401f-85b7-db6aae204076&amp;amp;sc_channel=el" rel="noopener noreferrer"&gt;Si sigues en free tier, ese botón no te va a servir. Da clic aquí para leer más.&lt;/a&gt; Y ojo, activar las funciones avanzadas no se puede revertir. No hay botón de regreso.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Lo que cambia depende de quién seas
&lt;/h2&gt;

&lt;p&gt;Si llevas años usando AWS y ya tienes experiencia manteniendo aplicaciones en producción, activar las funciones avanzadas te lleva al mismo AWS que conoces: organizaciones, acceso al root user, selector de regiones, &lt;a href="https://docs.aws.amazon.com/accounts/latest/reference/supported-services-sign-up-new.html" rel="noopener noreferrer"&gt;todos los servicios&lt;/a&gt;, IAM. Para ti es un alivio, porque no tienes que aprender nada nuevo ni hay magia oscura por debajo. Lo que viste al entrar por primera vez era la experiencia pensada para quien va empezando en la nube.&lt;/p&gt;

&lt;p&gt;Si estás aprendiendo sobre AWS, esto sí lo vas a notar. Los cuatro límites que vimos arriba desaparecen de golpe, y todo lo que AWS mantenía por ti ahora lo mantienes tú. Como decían en una película: un gran poder conlleva una gran responsabilidad.&lt;/p&gt;

&lt;p&gt;Vamos a ver qué cambia exactamente.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cambios en tu organización
&lt;/h2&gt;

&lt;p&gt;En el momento que activas las funciones avanzadas pasan estas cosas. Si quieres conocer todo a detalle te recomiendo ir directamente a la &lt;a href="https://docs.aws.amazon.com/accounts/latest/reference/activate-advanced-features.html?trk=02b062ab-d194-401f-85b7-db6aae204076&amp;amp;sc_channel=el" rel="noopener noreferrer"&gt;documentación&lt;/a&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Te vuelves administrador de la AWS Organization&lt;/strong&gt; que contiene tus proyectos. Ya no es AWS quien la maneja.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Configuras un root email y un root user password&lt;/strong&gt; para tu management account. Sí, el root user clásico regresa a tu vida. Y como todo root user, se usa para emergencias y nada más.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tus proyectos se convierten en member accounts.&lt;/strong&gt; El nombre de "proyecto" desaparece y queda lo que siempre fue: una cuenta de AWS. Y ahora puedes crear más cuentas tú mismo.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tus team members pasan a llamarse workforce identities.&lt;/strong&gt; Siguen entrando igual que antes, pero ahora el identity source es configurable desde IAM Identity Center. Puedes dejar AWS Builder ID o cambiarlo a un proveedor externo.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Las SCPs y RCPs pasan a ser tuyas.&lt;/strong&gt; Antes AWS las mantenía por ti. Ahora las puedes modificar, y también las puedes romper. Como ves, es el mismo patrón en todo lo demás: más control, más responsabilidad.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cambiar el identity source de AWS Builder ID a otro proveedor tampoco se puede revertir. Una vez que lo cambias, ya no puedes volver a habilitar Builder ID.&lt;/p&gt;

&lt;h2&gt;
  
  
  ¿Qué pasa a nivel de costos cuando activas las funciones avanzadas?
&lt;/h2&gt;

&lt;p&gt;Esta es la parte que más se siente si vienes de la nueva experiencia:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Se va tu límite de gasto.&lt;/strong&gt; Si tenías uno, desaparece, y si algún proyecto estaba pausado por haberse pasado del límite, se reactiva solito. Después de activar ya no puedes crear límites de gasto. A cambio te dan la suite completa de Billing and Cost Management: budgets, Cost Explorer, Cost Anomaly Detection. Son herramientas mejores para analizar, organizar y planear, pero ninguna pausa tus proyectos por sí sola cuando te pasas del presupuesto. El límite de gasto era lo único que frenaba, y ese freno es justo lo que pierdes al activarlas.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Se abren todos los servicios de AWS&lt;/strong&gt;, incluyendo los que no estaban en la nueva experiencia. Vale la pena leer la documentación de cada uno antes de prenderlos, porque ya nadie te va a detener.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Se habilitan todas las regiones&lt;/strong&gt;, incluyendo las opt-in, y con eso vienen las capacidades multi-región. Te sirven, por ejemplo, para que tu aplicación siga funcionando aunque una región tenga problemas.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Puedes usar IAM Access Analyzer&lt;/strong&gt;, que es muy útil justo cuando empiezas a escribir tus propias políticas.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Lo que cambia en el día a día
&lt;/h2&gt;

&lt;p&gt;La consola simplificada ya no va a estar disponible y en su lugar tienes acceso a la AWS Management Console completa, donde puedes seleccionar regiones y ves todos los servicios. Además se desbloquean varias cosas que antes no estaban:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Apagar el multi-session console support&lt;/li&gt;
&lt;li&gt;Marcar tu cuenta como HIPAA o SEC compliant&lt;/li&gt;
&lt;li&gt;Usar AWS Marketplace&lt;/li&gt;
&lt;li&gt;Trabajar con un AWS Training Partner&lt;/li&gt;
&lt;li&gt;Comprar suscripción de AWS Skill Builder Team&lt;/li&gt;
&lt;li&gt;Enterprise Agreement, contratos de Professional Services y AWS Partner Network&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  ¿Qué pasa con AWS Settings?
&lt;/h2&gt;

&lt;p&gt;AWS Settings sigue existiendo mientras uses AWS Builder ID como identity source, solo que ahora vive únicamente en &lt;a href="https://settings.aws.com/?trk=02b062ab-d194-401f-85b7-db6aae204076&amp;amp;sc_channel=el" rel="noopener noreferrer"&gt;settings.aws.com&lt;/a&gt;. Desde ahí puedes llegar a Billing, a la consola de Organizations para revisar tus SCPs y RCPs, al Account Access Manager y a IAM Identity Center.&lt;/p&gt;

&lt;p&gt;Una cosa que sí se pierde es crear proyectos dentro de esa organización. Lo que creas ahora son member accounts, y si vas a la página de configuración e intentas crear un proyecto nuevo, AWS te muestra un modal que te explica que los proyectos de tu organización ahora se administran como cuentas de AWS y que en lugar de un proyecto crees una member account.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cómo prepararte antes de activar las funciones avanzadas
&lt;/h2&gt;

&lt;p&gt;Para dar el salto a las funciones avanzadas toma en cuenta lo siguiente:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Avísale a tu equipo.&lt;/strong&gt; Su acceso no cambia por default, pero la consola que van a ver sí. Y si después cambias el identity source o metes SCPs nuevas, eso sí les pega en cómo entran y qué pueden tocar.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Revisa el gasto de todos tus proyectos&lt;/strong&gt; y detecta los que fluctúan raro. Sin límite de gasto, todo lo que corra lo pagas tú. Buen momento para borrar o pausar recursos idle y aprender buenas practicas para manejar tu cuenta.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Planea los cambios a tu Organization&lt;/strong&gt; antes, no después. Si vas a usar otra región, deja lista la SCP con el &lt;code&gt;RegionFloor&lt;/code&gt; actualizado.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Si conectaste un agente de IA&lt;/strong&gt; siguiendo la guía de AWS, borra el archivo &lt;code&gt;aws-starter-rules.md&lt;/code&gt;. Ese archivo le dice a tu agente que vives en la nueva experiencia con todas sus restricciones, y en cuanto activas las funciones avanzadas esa información queda falsa. Un agente con reglas viejas te va a pelear cosas que ya son válidas.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Entonces, ¿ya necesito esas funciones avanzadas?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft9o76dpmsp1emuzu0iah.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft9o76dpmsp1emuzu0iah.png" alt="Arbol de decisión para AWS" width="800" height="864"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Si ya tienes experiencia usando AWS probablemente activaste las funciones avanzadas el primer día. Para ti es el lugar donde siempre has estado y lo único que vale la pena revisar es la lista de detalles que conlleva activarlas.&lt;/p&gt;

&lt;p&gt;Si estás aprendiendo, no tienes que apresurarte. Lo que hay que preguntarte es si todavía necesitas el freno. En la práctica te vas a dar cuenta solo: te va a faltar un servicio que no viene incluido en la nueva experiencia, vas a necesitar multi-región o aplicar políticas personalizadas, y ahí la nueva experiencia se te va a quedar corta.&lt;/p&gt;

&lt;p&gt;Si todavía no te has topado con nada de eso, quédate en la nueva experiencia, configura tus limites de gasto y sigue aprendiendo.&lt;/p&gt;

&lt;h2&gt;
  
  
  Esto es todo por ahora
&lt;/h2&gt;

&lt;p&gt;Espero que te haya servido y que ya tengas con qué decidir entre saltar a las funciones avanzadas o quedarte en la nueva experiencia. Si te queda alguna duda escríbeme a &lt;a href="https://www.instagram.com/fromchiapasdev/" rel="noopener noreferrer"&gt;@fromchiapasdev.&lt;/a&gt; Y cuéntame si ya probaste la nueva experiencia o si ya construiste tu primer proyecto ahí.&lt;/p&gt;

&lt;p&gt;Fuente: &lt;a href="https://docs.aws.amazon.com/accounts/latest/reference/activate-advanced-features.html?trk=02b062ab-d194-401f-85b7-db6aae204076&amp;amp;sc_channel=el" rel="noopener noreferrer"&gt;Activate advanced AWS features&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>tutorial</category>
      <category>cloud</category>
    </item>
    <item>
      <title>AI Game Mashups: Can AI Really Turn Two Games Into One?</title>
      <dc:creator>Matheus Guimaraes</dc:creator>
      <pubDate>Thu, 29 Oct 2026 11:27:37 +0000</pubDate>
      <link>https://dev.to/aws/ai-game-mashups-can-ai-really-turn-two-games-into-one-52bd</link>
      <guid>https://dev.to/aws/ai-game-mashups-can-ai-really-turn-two-games-into-one-52bd</guid>
      <description>&lt;p&gt;Mario shooting some baddies in Halo. Minecraft inside GTA V (see Appendix: a real-world example). A social media trend has people sharing videos of what’s being branded as “AI game mashups.” The claim is that people have used AI to reverse engineer different games and mash them together into one in unexpected or cool ways... but is that the whole story?&lt;/p&gt;

&lt;p&gt;As usual, hype has a tendency to exaggerate things to create, well, more hype. So let's separate reality from fiction and explore what’s actually happening behind these demos.&lt;/p&gt;

&lt;p&gt;The good news is that there is plenty on the reality side to be mind-blown about! However, there are also some disappointing truths. At least for the time being.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's Mash Candy Crush And Call of Duty!
&lt;/h2&gt;

&lt;p&gt;Let's walk through a ridiculous combination as a practical example. Let's imagine that we want to combine Candy Crush and Call of Duty!&lt;/p&gt;

&lt;p&gt;However, simply naming two games does not constitute a plan. Like anything else, first we need to work out our requirements and architectural concerns.&lt;/p&gt;

&lt;p&gt;Here's my take: every time you reload your weapon, Candy Crush loads inside the Call of Duty gameplay and you have to complete a match-three puzzle before the reload can finish.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft19a00e8d1r1ownq5kr2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft19a00e8d1r1ownq5kr2.png" alt="Concept illustration of a match-three puzzle overlay interrupting a first-person shooter reload." width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Hypothetical mashup: solve a match-three puzzle to finish reloading. AI-generated concept illustration, not a screenshot of a working mod.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I have no idea whether that would be fun. I suspect my teammates would have opinions. But at least we now have something concrete enough to discuss.&lt;/p&gt;

&lt;p&gt;There are still decisions to make though. Does the shooter pause while you solve the puzzle? What happens if you fail? Can you cancel? Does a harder puzzle earn you more ammunition?&lt;/p&gt;

&lt;p&gt;Neither original game contains the answers so it's up to us to introduce new rules.&lt;/p&gt;

&lt;p&gt;And that is our first lesson: &lt;strong&gt;Connecting two game engines does not automatically create coherent new gameplay.&lt;/strong&gt; Somebody, potentially with AI assistance, still has to decide what the connection means and implement it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Are We Actually Mashing Together?
&lt;/h2&gt;

&lt;p&gt;When I watch these demos, I find it useful to separate four things.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What’s happening&lt;/th&gt;
&lt;th&gt;What it establishes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Visual composition&lt;/td&gt;
&lt;td&gt;Images or rendered objects from different sources appear together.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Event integration&lt;/td&gt;
&lt;td&gt;Something happening in one game triggers something in another.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gameplay orchestration&lt;/td&gt;
&lt;td&gt;New rules coordinate actions and state across the games.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hybrid game design&lt;/td&gt;
&lt;td&gt;Those rules form a coherent experience with its own objectives, constraints and balance.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These can overlap. A project might combine graphics and translate a few events without sharing every part of either simulation.&lt;/p&gt;

&lt;p&gt;For example, an explosion in one game could trigger an explosion in another. That is a meaningful integration, but it doesn’t, by itself, establish that every object in both worlds can collide, that both physics engines agree, or that every mission works across the boundary.&lt;/p&gt;

&lt;p&gt;A clip can still demonstrate a specific interaction beautifully while leaving those broader questions unanswered.&lt;/p&gt;

&lt;h2&gt;
  
  
  The missing interfaces
&lt;/h2&gt;

&lt;p&gt;Ok, so how can we go about implementing our Call of Duty and Candy Crush mash-up? Well, to begin with we need to discover each game's available integration points. Then we need to find a way to connect those before finally figuring out how to coordinate the result.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Find a way to control the relevant behaviour
&lt;/h3&gt;

&lt;p&gt;A game with a supported modding API might already expose the events and controls we need. Otherwise, investigating its internal behaviour may be necessary.&lt;/p&gt;

&lt;p&gt;For our shooter, we would need to identify a reload request and find a reliable way to defer it. For the puzzle, we need to start a challenge and detect its completion. Observing an animation on screen is different from having a dependable signal that the underlying action succeeded.&lt;/p&gt;

&lt;p&gt;This is where reverse engineering can contribute: &lt;em&gt;working out how software behaves when its original source code or a suitable interface isn’t available.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/morluto/rea" rel="noopener noreferrer"&gt;REA, or Reverse Engineer Anything&lt;/a&gt;, is one project in this area and the one behind the viral game mashups trend. Its documentation describes connecting agents to analysis tools, including Ghidra, Hopper and IDA, and returning findings that an agent can investigate further.&lt;/p&gt;

&lt;p&gt;It is indeed a pretty cool tool that gives an agent ways to inspect software. However, it is NOT a magical command that enables agents to recover an entire game’s original source project or to understand every subsystem.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Moreover, it's important to remember that runtime modification of games predates AI tools.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/soulsmods/ModEngine2" rel="noopener noreferrer"&gt;Mod Engine 2&lt;/a&gt;, for example, documents runtime patching and injection for Souls games, including Elden Ring.[3] Existing tools and community knowledge are part of the foundation here.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Build interfaces between the games
&lt;/h3&gt;

&lt;p&gt;Once we understand the relevant behaviour, we can build adapters: code that translates between what our mashup needs and what each game can actually do.&lt;/p&gt;

&lt;p&gt;From the coordinating code’s perspective, the shooter adapter might offer operations such as “defer reload” or “resume gameplay.” The puzzle adapter might offer “start challenge” and a completion event.&lt;/p&gt;

&lt;p&gt;Those are interfaces that we have to build unless the game itself provides out-of-the-box integration points, or in simpler language, hooks. This could be, for example, official support for mods. That means creating and maintaining your own adapter code, which, yes, you can also use AI to help you generate.&lt;/p&gt;

&lt;p&gt;There is an added complication: If components run in separate processes, they need a way to exchange messages, such as sockets or named pipes. This is referred to as inter-process communication, often shortened to IPC.&lt;/p&gt;

&lt;p&gt;A hook and a communication channel have different jobs. A hook can intercept behaviour inside a game whereas IPC lets separate processes exchange information. Having one doesn’t automatically give us the other.&lt;/p&gt;

&lt;p&gt;Either way, we arrive at our second lesson: AI doesn't somehow make two incompatible executables magically understand each other. &lt;em&gt;The real magic is that AI can help us build the missing interfaces between them.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Implement the new rules
&lt;/h3&gt;

&lt;p&gt;Now we need the coordinator, or orchestrator, that implements our reload rule so we can load Candy Crush every time you need to reload your weapon on Call of Duty.&lt;/p&gt;

&lt;p&gt;Here's the plan: it receives a reload request, defers the action, puts the shooter into an appropriate paused state, and opens the puzzle. On success, it allows the reload to proceed and returns control to the shooter.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuq121jt80wqgvsrvgdnp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuq121jt80wqgvsrvgdnp.png" alt="Flow diagram showing the reload request, deferred reload, paused shooter, puzzle outcome, and success or recovery paths." width="800" height="765"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The orchestrator coordinates the reload and puzzle, with a recovery path for failure, cancellation or timeout. This conceptual flow assumes the required integration points exist.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;What if the puzzle crashes though? The player shouldn’t remain trapped forever with a frozen gun. And how about if a completion message arrives twice? We need to be careful not to grant ammunition twice. Like any piece of software we need to design for our error conditions.&lt;/p&gt;

&lt;p&gt;This is why “pause the game” deserves scrutiny. Preventing player input is different from pausing the simulation. In a networked game, the server and other players may continue regardless. Our example depends on capabilities that may be unavailable or prohibited in a protected online title.&lt;/p&gt;

&lt;p&gt;If you work with microservices, there’s a familiar architectural idea here. Connecting two services doesn’t automatically create an e-commerce application. You still need rules that define what placing an order means, what happens next, and how failure is handled.&lt;/p&gt;

&lt;p&gt;Games add another difficulty, one that becomes our third lesson: &lt;em&gt;we still need to design and build gameplay rules for the mashup much like building any other game.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Do the games become one program?
&lt;/h2&gt;

&lt;p&gt;They don’t have to.&lt;/p&gt;

&lt;p&gt;In one possible implementation of our example, the shooter and puzzle remain separate processes while our own coordinator manages their behaviour and presentation.&lt;/p&gt;

&lt;p&gt;The simplest implementation may be, for example, switching back and forth between  the Candy Crush puzzle’s window and the Call of Duty window. A more integrated version could display the puzzle within the shooter’s view as ensioned in our concept above. We'll have to work harder for it because it then adds rendering and input-routing work but it does look super cool. Either way, the objective is to have the player experience a single set of rules while multiple programs do the work.&lt;/p&gt;

&lt;p&gt;Another consideration is whether we need to create our own launcher app. This could gives even more control over the runtime and coordination between the two processes running either game, however it does not automatically give control over either game's internals. &lt;/p&gt;

&lt;p&gt;So lesson four is: &lt;em&gt;the desired user experience dictates how much control you need to have over either game and determines the architectural choices as well as the amount of code that you need to write and maintain.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Where did the graphics come from?
&lt;/h2&gt;

&lt;p&gt;This is perhaps the most intriguing question.&lt;/p&gt;

&lt;p&gt;A newly written game might use original artwork, generated assets, placeholders or reused material. A mod might leave the original game’s engine and assets in place. A mashup might combine output from two running engines, each rendering its own content.&lt;/p&gt;

&lt;p&gt;Those are different workflows. A familiar character on screen doesn’t tell you which one happened.&lt;/p&gt;

&lt;p&gt;In our hypothetical example, if both original games were running, neither would need its graphics recreated merely to appear in the experience. Each game already knows how to render its own world. The integration challenge would concern control, communication, presentation and the new rules.&lt;/p&gt;

&lt;p&gt;Conversely, reproducing familiar graphics in a newly written program doesn’t establish that the original physics, enemy behaviour, timing or levels have been reproduced.&lt;/p&gt;

&lt;p&gt;But hang on. If we put Mario inside Halo, how does he know where the floor is? Doesn’t he come with his own bounding box? The important distinction is that &lt;strong&gt;a character’s appearance and its collision behaviour are separate things&lt;/strong&gt;. A visible model doesn’t automatically bring a working physics system with it. &lt;/p&gt;

&lt;p&gt;For a hypothetical model replacement, we could give an existing Halo character Mario’s appearance while keeping the host character’s movement and collision setup. Or, if we were adding a new character, we would need to create or convert the collision data into a form the host engine understands and configure its behaviour. Halo wouldn’t need to recognise “Mario”; it would need a correctly configured character in its own simulation. That could stop him falling through the floor without reproducing how he moves in a Mario game.&lt;/p&gt;

&lt;p&gt;So lesson number five is: &lt;strong&gt;Looking like two worlds have merged does not mean that their physics have merged too. There's work to be done to make that happen.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Asset provenance and permission are also separate questions from whether an integration works. A clip alone cannot answer them. Before making claims about how a creator obtained the assets, we need their documentation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where does the AI fit?
&lt;/h2&gt;

&lt;p&gt;We should distinguish AI helping build the mashup from AI running it.&lt;/p&gt;

&lt;p&gt;During development, an agent can use tools to investigate behaviour, propose integration code and help iterate on failures. REA’s documented workflow, for example, lets an agent inspect findings, ask follow-up questions, and write and test an implementation.[2]&lt;/p&gt;

&lt;p&gt;But once our reload rule works, it can run as ordinary deterministic code. Receive the event, start the puzzle, wait for a result, update the state. There is no inherent need to ask a language model what should happen every time the player reloads.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;AI can be the engineer that builds the bridge without being the driver that crosses it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That distinction also helps us evaluate claims about speed. A successful demo shows that someone achieved a result. Understanding how much AI accelerated it requires more evidence: the starting tools, existing mods, development history, human interventions and failed attempts. The finished clip doesn’t contain that history.&lt;/p&gt;

&lt;h2&gt;
  
  
  Appreciate the demo. Be precise about the claim.
&lt;/h2&gt;

&lt;p&gt;I find this trend exciting because it opens up questions about what people might build when investigating and connecting unfamiliar software becomes more accessible. Not to mention that level of creativity which makes me smile or even laugh out loud every time I see one out there.&lt;/p&gt;

&lt;p&gt;But, if we're gonna get down to the nitty and gritty and talk technical, I scrutinize them about what they're trying to prove. What is running? How much of it is custom integration and coordination code? Which information crosses the boundary? Which interactions actually work? Where does the AI contribute?&lt;/p&gt;

&lt;p&gt;An overlay, an event bridge and a hybrid game can all be worthwhile achievements. Describing them accurately gives the people building them credit for the work they actually did, and gives everyone else a better understanding of what remains unsolved.&lt;/p&gt;

&lt;p&gt;Reverse engineering exposes capabilities. Integration connects them. Orchestration gives them new meaning. &lt;/p&gt;

&lt;p&gt;Whatever the path you take, ultimately it comes down to our final lesson number six: &lt;em&gt;AI or no AI, REA or whatever comes next...game mashups are a project like any other and still take a lot of work!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;As for whether solving Candy Crush puzzles before reloading a gun in Call of Duty is a good idea...that is up for debate!&lt;/p&gt;




&lt;p&gt;&lt;a id="appendix-a-real-world-example"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Appendix: A real-world example
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://github.com/rehan-remade/universal-modder" rel="noopener noreferrer"&gt;Universal Modder repository&lt;/a&gt; documents a Minecraft and GTA V story-mode example. Its description identifies a Minecraft Fabric mod, a ScriptHookV component and a ReShade add-on, with camera, ground and event information exchanged over a local WebSocket connection. It also describes combining Minecraft’s colour and depth output with GTA’s frame, and translating selected Minecraft events into GTA effects.[1]&lt;/p&gt;

&lt;p&gt;There are two useful ideas in that description.&lt;/p&gt;

&lt;p&gt;First, the games have specific integration components. A communication channel carries information, but code still has to decide what to send and what the receiving game should do with it.&lt;/p&gt;

&lt;p&gt;Second, presentation and interaction are separate problems. Depth information helps decide which rendered surfaces should appear in front of others. That can make the combined image convincing. Making an object affect the other game’s simulation requires additional behaviour.&lt;/p&gt;

&lt;p&gt;That is a substantial achievement. It is also a much more precise claim than “any two games can now be merged.” The project’s documented approach is evidence about that example, not a universal explanation for every viral mashup.&lt;/p&gt;




&lt;h3&gt;
  
  
  Sources
&lt;/h3&gt;

&lt;p&gt;Project documentation checked on 20 October 2026; collision reference added on 29 October 2026. Named implementations are described from their maintainers’ documentation; I have not independently run or benchmarked them.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://github.com/rehan-remade/universal-modder#built-with-it" rel="noopener noreferrer"&gt;Universal Modder: documented Minecraft × GTA V example&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/morluto/rea#how-rea-works" rel="noopener noreferrer"&gt;REA: overview and how it works&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/soulsmods/ModEngine2" rel="noopener noreferrer"&gt;Mod Engine 2: runtime patching, launcher and extension documentation&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.godotengine.org/en/stable/tutorials/physics/physics_introduction.html" rel="noopener noreferrer"&gt;Godot documentation: collision shapes, physics bodies and collision response&lt;/a&gt;. General collision concepts; not evidence of a particular Halo mod implementation.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>ai</category>
      <category>gamedev</category>
      <category>architecture</category>
      <category>programming</category>
    </item>
    <item>
      <title>Ship a Lambda Web Function with CDK</title>
      <dc:creator>Sean Boult</dc:creator>
      <pubDate>Wed, 28 Oct 2026 17:45:51 +0000</pubDate>
      <link>https://dev.to/aws/ship-a-lambda-web-function-with-cdk-16na</link>
      <guid>https://dev.to/aws/ship-a-lambda-web-function-with-cdk-16na</guid>
      <description>&lt;p&gt;So, &lt;a href="https://docs.aws.amazon.com/lambda/latest/dg/web-functions.html" rel="noopener noreferrer"&gt;AWS Lambda Web Functions&lt;/a&gt; just came out, and I'm super excited about them.&lt;/p&gt;

&lt;p&gt;What are they? Well, you can now ship Express, Hono, or React Router with no Lambda-specific adapters or wrappers.&lt;/p&gt;

&lt;p&gt;Let me show you how I got this demo set up with CDK.&lt;/p&gt;

&lt;p&gt;λ: &lt;a href="https://cxrj1w1j65n0k7ss.p7v.lambda-web.us-east-2.on.aws" rel="noopener noreferrer"&gt;https://cxrj1w1j65n0k7ss.p7v.lambda-web.us-east-2.on.aws&lt;/a&gt; (this may not live forever but the code should)&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;DISCLAIMER&lt;/strong&gt;: The code we are about to see is written with L1 CDK constructs. The L2 constructs are being tracked via &lt;a href="https://github.com/aws/aws-cdk/pull/39210" rel="noopener noreferrer"&gt;this PR&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;First, let's look at the server code I have in Express. I've omitted the bulk of its logic for brevity.&lt;/p&gt;

&lt;p&gt;Here, you can see that it's an &lt;a href="https://expressjs.com/" rel="noopener noreferrer"&gt;Express.js&lt;/a&gt; server binding to a port.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;express&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;express&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;hostname&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;rawPort&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;AWS_LAMBDA_HTTP_ENDPOINT&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt;
  &lt;span class="s2"&gt;`127.0.0.1:&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PORT&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;3000&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;
&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;rawPort&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;express&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;server&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;listen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;hostname&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Spinning Lambda is listening on http://&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;hostname&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;:&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;I can run the code locally with &lt;code&gt;pnpm dev&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5u9ymzdams5ypv2bkrs9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5u9ymzdams5ypv2bkrs9.png" alt=" " width="800" height="663"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, let's look at the CDK stack used to deploy this function.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;SpinningLambdaStack&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;Stack&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;scope&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Construct&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="nx"&gt;StackProps&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;super&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;scope&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// code bucket stuff omitted&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;webFunction&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;CfnWebFunction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;WebFunction&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;functionName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stackName&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;-web`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="c1"&gt;// many props omitted for brevity&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;revision&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;CfnWebFunctionRevision&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;WebFunctionRevision&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;functionName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;webFunction&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="c1"&gt;// many props omitted for brevity&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;endpoint&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;CfnWebFunctionEndpoint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;WebFunctionEndpoint&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;functionName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;webFunction&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="c1"&gt;// many props omitted for brevity&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Now for deployment. I'm using the &lt;a href="https://aws.amazon.com/blogs/aws/aws-reimagines-the-getting-started-experience/" rel="noopener noreferrer"&gt;new AWS experience&lt;/a&gt;, so I have a &lt;a href="https://docs.aws.amazon.com/accounts/latest/reference/create-project.html" rel="noopener noreferrer"&gt;project&lt;/a&gt; dedicated to this demo.&lt;/p&gt;

&lt;p&gt;I grab some credentials for my account with &lt;code&gt;aws login&lt;/code&gt;. I need to do a one-time setup to bootstrap CDK with &lt;code&gt;npx cdk bootstrap&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Once that's done, I can run &lt;code&gt;pnpm deploy&lt;/code&gt; to ship it.&lt;/p&gt;

&lt;p&gt;Then it's live 🚀!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs1tjdtg03c95f8zx7ci8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs1tjdtg03c95f8zx7ci8.png" alt=" " width="800" height="673"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Share this on X/Twitter, and it should render as an embed:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://cxrj1w1j65n0k7ss.p7v.lambda-web.us-east-2.on.aws/embed

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Full repo:&lt;br&gt;
&lt;a href="https://github.com/sboult/lwf-three-js" rel="noopener noreferrer"&gt;https://github.com/sboult/lwf-three-js&lt;/a&gt;&lt;/p&gt;



&lt;p&gt;As always, happy coding 😉!&lt;/p&gt;

&lt;p&gt;Follow AWS for more articles like this.&lt;/p&gt;


&lt;div class="ltag__user ltag__user__id__1726"&gt;
  &lt;a href="/aws" class="ltag__user__link profile-image-link"&gt;
    &lt;div class="ltag__user__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=150,height=150,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F1726%2F2a73f1e6-7995-4348-ae37-44b064274c59.png" alt="aws image"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
      &lt;a href="/aws" class="ltag__user__link"&gt;AWS&lt;/a&gt;
      Follow
    &lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a href="/aws" class="ltag__user__link"&gt;
        Articles written by current and past AWS Developer Advocates to help people interested in building on AWS. Opinions are each author's own.
      &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Follow me for all things tech!&lt;/p&gt;


&lt;div class="ltag__user ltag__user__id__828306"&gt;
    &lt;a href="/hacksore" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__pic"&gt;
        &lt;img src="https://media2.dev.to/dynamic/image/width=150,height=150,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F828306%2Fbf0bbed7-7874-4a26-8137-bb761a4b7f23.png" alt="hacksore image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/hacksore"&gt;Sean Boult&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/hacksore"&gt;Developer. Hacker. Creator.&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>aws</category>
      <category>serverless</category>
      <category>express</category>
    </item>
    <item>
      <title>Is stateless MCP just REST? I ran 180 tests to find out</title>
      <dc:creator>Edoardo Dusi</dc:creator>
      <pubDate>Mon, 26 Oct 2026 16:22:52 +0000</pubDate>
      <link>https://dev.to/aws/is-stateless-mcp-just-rest-i-ran-180-tests-to-find-out-5dib</link>
      <guid>https://dev.to/aws/is-stateless-mcp-just-rest-i-ran-180-tests-to-find-out-5dib</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Update, 2026-11-03:&lt;/strong&gt; an earlier version of this post said REST reads its contract only once. That's wrong for this harness: Converse is stateless, so the REST contract is re-sent on every call, exactly like the MCP schemas. A reader, &lt;a href="https://dev.to/izgorodin/comment/3jfi4"&gt;izgorodin&lt;/a&gt;, spotted it and proposed a control experiment. I ran it, and the results are in the new section after Result 4. The 35% gap is real, but it comes from how dense the description is, not from where it sits.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In July 2026 the Model Context Protocol &lt;a href="https://blog.modelcontextprotocol.io/posts/2026-07-28/" rel="noopener noreferrer"&gt;dropped sessions&lt;/a&gt;. The handshake is gone, the &lt;code&gt;Mcp-Session-Id&lt;/code&gt; header is gone, and every request now stands on its own. Within a week the internet did what the internet does, compressing that change into a slogan: MCP is dead, REST won, it was always just REST with extra steps.&lt;/p&gt;

&lt;p&gt;In the &lt;a href="https://modelcontextprotocol.io/specification/2026-07-28/changelog" rel="noopener noreferrer"&gt;2026-07-28 MCP spec&lt;/a&gt;, &lt;code&gt;tools/list&lt;/code&gt; no longer varies per connection, and a server that needs cross-call state now mints an explicit handle and passes it back as an ordinary tool argument. In other words, a stateless MCP server is now a list of tool names with JSON schemas, presented to the model, which emits a tool call that the host dispatches.&lt;/p&gt;

&lt;p&gt;Say that out loud and the REST comparison writes itself. Maybe even the slogan. A REST API is &lt;em&gt;also&lt;/em&gt; stateless HTTP.&lt;/p&gt;

&lt;p&gt;I always loved that "computer scientist" has the word &lt;strong&gt;scientist&lt;/strong&gt; in it, so I want proof and measurements, even for silly slogans. I found no measurement, so I built one.&lt;/p&gt;

&lt;p&gt;I took a single backend and exposed it twice, once as a stateless MCP server and once as a plain REST API, handed both to the same agent with the same tasks, and recorded what changed across 180 runs. I'm surprised that the result is less dramatic than the slogan and actually more useful: on a small tool surface the two are a tie, and on a realistic one they diverge for one structural reason each.&lt;/p&gt;

&lt;p&gt;I'm not here to tell you "which protocol is better". But I will tell you that these two carry the &lt;strong&gt;same information in different shapes&lt;/strong&gt;. MCP puts the tool surface in front of the model as typed schemas. REST puts it there as a contract in prose, then leans on a single generic HTTP call. Both go out on every turn, so the difference is how many tokens each one spends saying the same thing, and it is measurable.&lt;/p&gt;

&lt;p&gt;I'm giving you the data, the harness, and a way to make a decision based on your case, not your mood.&lt;/p&gt;

&lt;h2&gt;
  
  
  The experiment
&lt;/h2&gt;

&lt;p&gt;I wanted any difference I measured to be the shape of the contract instead of the business logic. There is exactly one backend, a classic demo: a small store with products, inventory, orders and customers, that answers the same way every run.&lt;/p&gt;

&lt;p&gt;Two interfaces wrap that same backend over the same six operations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MCP&lt;/strong&gt; is modeled as native tool use on &lt;a href="https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html" rel="noopener noreferrer"&gt;Amazon Bedrock's Converse API&lt;/a&gt;, because this is exactly the stateless MCP shape: the model receives tool names and JSON schemas every turn and emits a &lt;code&gt;toolUse&lt;/code&gt; block that the host dispatches&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;REST&lt;/strong&gt; gives the model one tool, &lt;code&gt;http_request&lt;/code&gt;, plus an OpenAPI-style contract in the system prompt. The model constructs the path itself. This interface also implements a real &lt;code&gt;ETag&lt;/code&gt; and &lt;code&gt;304 Not Modified&lt;/code&gt; cache, because conditional reads are the one thing REST can express that MCP tool use currently cannot&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I gave both the same set of tasks: a simple lookup, a two-hop (order to customer name), an aggregate across a customer's orders, a missing-information recovery (an order that does not exist), a conditional (can I order an out-of-stock item?), and a repeated read that I use to test caching.&lt;/p&gt;

&lt;p&gt;The setup:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Model: Claude Haiku 4.5 on Amazon Bedrock, &lt;code&gt;eu-central-1&lt;/code&gt;, temperature 0. I picked this small, fast model because it keeps the sandbox cost down, and a smaller model is the harder test: it is quicker to fumble a schema or burn tokens, so a difference between the two interfaces shows up instead of being hidden by a frontier model's reasoning&lt;/li&gt;
&lt;li&gt;Five trials per task per interface, so thirty runs each per condition&lt;/li&gt;
&lt;li&gt;Metrics per run: success, input and output tokens, latency, round-trips, tool calls, cache hits. A round-trip here is one model turn, so a task that makes a single tool call and then answers counts as two&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Result 1: on a small surface, it is a tie
&lt;/h2&gt;

&lt;p&gt;With six tools, the internet slogan seems to be correct!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Six tools, five trials per task, thirty runs per interface.&lt;/em&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;MCP&lt;/th&gt;
&lt;th&gt;REST&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Success rate&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Avg total tokens&lt;/td&gt;
&lt;td&gt;2,838&lt;/td&gt;
&lt;td&gt;2,867&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Avg input tokens&lt;/td&gt;
&lt;td&gt;2,705&lt;/td&gt;
&lt;td&gt;2,692&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Median latency&lt;/td&gt;
&lt;td&gt;2,116 ms&lt;/td&gt;
&lt;td&gt;2,070 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Avg round-trips&lt;/td&gt;
&lt;td&gt;2.5&lt;/td&gt;
&lt;td&gt;2.5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cache hits (304)&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;You can see we have the same correctness, number of round-trips, token counts and latency. If you have a handful of tools, the choice between a small MCP server and a small REST contract is just a matter of taste, not efficiency. But look at that &lt;code&gt;Cache hits&lt;/code&gt; column...I'll come back to it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Result 2: the schema tax is real, and it scales
&lt;/h2&gt;

&lt;p&gt;Then I changed the one thing I figured was about to matter: the API surface size. I ran the whole suite again with twenty-four extra endpoints, modeling a realistic store API with roughly thirty operations. On the MCP side those are &lt;em&gt;twenty-four more tool schemas&lt;/em&gt;. On the REST side they are &lt;em&gt;twenty-four more lines in the contract&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Let's see how that changed our bill:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Thirty tools, five trials per task, thirty runs per interface.&lt;/em&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;MCP&lt;/th&gt;
&lt;th&gt;REST&lt;/th&gt;
&lt;th&gt;Delta&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Success rate&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;tie&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Avg total tokens&lt;/td&gt;
&lt;td&gt;6,558&lt;/td&gt;
&lt;td&gt;4,231&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;MCP +35%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Avg input tokens&lt;/td&gt;
&lt;td&gt;6,406&lt;/td&gt;
&lt;td&gt;4,038&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;MCP +37%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Median latency&lt;/td&gt;
&lt;td&gt;1,996 ms&lt;/td&gt;
&lt;td&gt;1,810 ms&lt;/td&gt;
&lt;td&gt;MCP +9%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Avg round-trips&lt;/td&gt;
&lt;td&gt;2.67&lt;/td&gt;
&lt;td&gt;2.67&lt;/td&gt;
&lt;td&gt;tie&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Again, same success rate and same round-trips, but &lt;strong&gt;35% more tokens&lt;/strong&gt;. The reason is simple: a stateless MCP server re-sends every tool schema on every turn, so the model pays for the full catalog every time, even if it doesn't use every tool. REST re-sends its contract every turn too, but a one-line contract entry costs about a third of a JSON tool schema, so it grows much more slowly.&lt;/p&gt;

&lt;p&gt;Per task, the gap is remarkable:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;MCP input tokens&lt;/th&gt;
&lt;th&gt;REST input tokens&lt;/th&gt;
&lt;th&gt;MCP overhead&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;order_status&lt;/td&gt;
&lt;td&gt;4,673&lt;/td&gt;
&lt;td&gt;2,850&lt;/td&gt;
&lt;td&gt;+1,823&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;customer_total&lt;/td&gt;
&lt;td&gt;4,732&lt;/td&gt;
&lt;td&gt;2,910&lt;/td&gt;
&lt;td&gt;+1,822&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;missing_order&lt;/td&gt;
&lt;td&gt;4,647&lt;/td&gt;
&lt;td&gt;2,805&lt;/td&gt;
&lt;td&gt;+1,842&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;order_customer&lt;/td&gt;
&lt;td&gt;7,181&lt;/td&gt;
&lt;td&gt;4,500&lt;/td&gt;
&lt;td&gt;+2,681&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;repeat_read&lt;/td&gt;
&lt;td&gt;7,318&lt;/td&gt;
&lt;td&gt;4,687&lt;/td&gt;
&lt;td&gt;+2,631&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;stock_mech&lt;/td&gt;
&lt;td&gt;9,884&lt;/td&gt;
&lt;td&gt;6,475&lt;/td&gt;
&lt;td&gt;+3,409&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Roughly 1,800 extra input tokens for a one-call task, and more for multi-call tasks, because the schema tax is paid &lt;strong&gt;once per round-trip&lt;/strong&gt;. The more the agent has to go back to the tools, the more times it re-reads the whole catalog.&lt;/p&gt;

&lt;p&gt;To be fair, this is the worst case for MCP and the best case for REST. Prompt caching on the provider side, and filtering the tool list down to what a task plausibly needs, both cut this cost. But neither is free and neither is automatic, and the structural fact remains that MCP's token cost grows with surface size about three times faster than a terse REST contract's does.&lt;/p&gt;

&lt;p&gt;This is my measurement, so I invite you to test on your own setup and challenge my findings.&lt;/p&gt;

&lt;h2&gt;
  
  
  Result 3: where REST wins outright
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;repeat_read&lt;/code&gt; task asks the agent to read an order, report the total, then read it again to confirm it is unchanged. This is deliberate, to test caching.&lt;/p&gt;

&lt;p&gt;The REST agent read the order, got an &lt;code&gt;ETag&lt;/code&gt;, and on the second read sent &lt;code&gt;If-None-Match&lt;/code&gt; with that tag. The server answered &lt;code&gt;304 Not Modified&lt;/code&gt; with an empty body, and the agent reused the value it already had. Five cache hits in five trials. The MCP agent could not do this, because MCP tool use has no standard notion of a conditional read or a revalidation header. It called the tool again and paid for the full result a second time. No cache, baby!&lt;/p&gt;

&lt;p&gt;The boring and old HTTP protocol with its caching mechanisms, conditional requests and revalidation, easily beats the shiny new MCP protocol on re-reads, because when your agent calls a tool it always starts from scratch, even when reading multiple times data that rarely changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Result 4: where MCP wins outright
&lt;/h2&gt;

&lt;p&gt;So far everything seems to be in favour of REST. I tried to build a scenario that should favour MCP.&lt;/p&gt;

&lt;p&gt;Picture a strict, unfamiliar API. A reporting endpoint whose region codes are &lt;code&gt;EUR&lt;/code&gt;, &lt;code&gt;NAM&lt;/code&gt; and &lt;code&gt;APC&lt;/code&gt;, not &lt;code&gt;EU&lt;/code&gt; or &lt;code&gt;Europe&lt;/code&gt; or &lt;code&gt;EMEA&lt;/code&gt;. Metric names you cannot guess from a description. A date format that must be exactly &lt;code&gt;YYYY-MM-DD&lt;/code&gt;. The kind of API an agent meets for the first time.&lt;/p&gt;

&lt;p&gt;MCP gives the model its normal typed tool schema: the enum values are correctly spelled, the format is declared, and the host validates the call before it is dispatched. REST gets what people actually write for a terse API: a contract that names the endpoint and the parameters but does not enumerate every valid value. The agent has to infer them. I asked both, in plain language, questions like "what was net revenue in Europe on 2026-10-20?"&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Strict API, one operation, six trials per task, thirty runs per interface.&lt;/em&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;MCP&lt;/th&gt;
&lt;th&gt;REST (terse contract)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Final success&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;First-call success&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;100%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Malformed calls&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;30 (one per task)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Avg tool calls&lt;/td&gt;
&lt;td&gt;1.0&lt;/td&gt;
&lt;td&gt;2.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Avg round-trips&lt;/td&gt;
&lt;td&gt;2.0&lt;/td&gt;
&lt;td&gt;3.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Avg total tokens&lt;/td&gt;
&lt;td&gt;1,841&lt;/td&gt;
&lt;td&gt;3,041 (&lt;strong&gt;+65%&lt;/strong&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Median latency&lt;/td&gt;
&lt;td&gt;1,720 ms&lt;/td&gt;
&lt;td&gt;3,006 ms (&lt;strong&gt;+75%&lt;/strong&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Both get there in the end, so this is not about MCP being "more correct." It is about getting it right the first time. The MCP agent mapped "Europe" to &lt;code&gt;EUR&lt;/code&gt; on the first call, every single run, because the schema told it the allowed values up front. The REST agent guessed &lt;code&gt;EU&lt;/code&gt; or &lt;code&gt;Europe&lt;/code&gt;, got a &lt;code&gt;400&lt;/code&gt;, read the error, and fixed it on the second call, every single run. That self-correction is impressive, but it costs an extra round-trip, 65% more tokens and nearly double the latency, every time.&lt;/p&gt;

&lt;p&gt;To be honest, I could make REST match MCP by pasting the full JSON schema, enums and all, into the contract. But that is exactly the per-turn token tax that made MCP lose Result 2. The schema has to live somewhere. MCP puts it in front of the model and pays for it every turn. A terse REST contract saves those tokens right up until the API is strict enough that the saving turns into a wrong guess. No free lunch, only a choice about where you spend.&lt;/p&gt;

&lt;h2&gt;
  
  
  Update: the control run
&lt;/h2&gt;

&lt;p&gt;After the post went out, &lt;a href="https://dev.to/izgorodin/comment/3jfi4"&gt;izgorodin&lt;/a&gt; read my results files more carefully than I did! The REST arm's input tokens &lt;strong&gt;&lt;em&gt;grow with every turn&lt;/em&gt;&lt;/strong&gt;, so the contract is not read once. Converse is stateless, my harness doesn't use prompt caching, and the system prompt goes out on every call exactly like the tool config. Both interfaces &lt;strong&gt;&lt;em&gt;pay for their description on every turn&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So where does the 35% come from? izgorodin proposed the experiment that answers it: give REST the same thirty JSON schemas MCP gets, pasted into its contract. If its tokens land next to MCP, the gap is about the &lt;em&gt;format&lt;/em&gt; of the description, not the &lt;em&gt;protocol&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;I added that third arm and ran all three in the same session: 180 more runs, 100% success everywhere.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Average input tokens per run, five trials per task, thirty runs per arm.&lt;/em&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Surface&lt;/th&gt;
&lt;th&gt;MCP&lt;/th&gt;
&lt;th&gt;REST (terse)&lt;/th&gt;
&lt;th&gt;REST (with schemas)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;6 tools&lt;/td&gt;
&lt;td&gt;2,705&lt;/td&gt;
&lt;td&gt;2,692&lt;/td&gt;
&lt;td&gt;3,550&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;30 tools&lt;/td&gt;
&lt;td&gt;6,406&lt;/td&gt;
&lt;td&gt;4,038&lt;/td&gt;
&lt;td&gt;7,542&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The cleaner number is what the extra operations cost on every model call. Going from six to thirty operations adds:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Arm&lt;/th&gt;
&lt;th&gt;Extra input tokens per call&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;REST (terse contract lines)&lt;/td&gt;
&lt;td&gt;+422&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MCP (tool schemas)&lt;/td&gt;
&lt;td&gt;+1,307&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;REST (same schemas in the contract)&lt;/td&gt;
&lt;td&gt;+1,384&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Same schemas, same cost. REST is even slightly more expensive, because its contract also carries the paths and the HTTP notes. Round-trips are identical, and both REST arms still get their five &lt;code&gt;304&lt;/code&gt;s.&lt;/p&gt;

&lt;p&gt;So the schema tax is real, and any interface pays it: it's the price of a dense description, charged on every turn. A JSON schema costs about three times a one-line contract entry, and that ratio is the whole 35%. It also turns Result 2 and Result 4 into one knob: how many tokens you spend describing your API on every call, and what you get back for them. A terse contract buys you cheap turns and wrong first guesses. A typed schema buys you first-call success at three times the price.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this does not measure
&lt;/h2&gt;

&lt;p&gt;A benchmark you cannot poke holes in is a benchmark that is lying! Here are mine.&lt;/p&gt;

&lt;p&gt;This is a very controlled scenario. One model, one small domain, six tasks. There is no authentication, no streaming, no &lt;em&gt;human in the loop&lt;/em&gt;. The "wire bytes" I counted are a proxy, not a packet capture. Latency differences stayed inside the noise and were dominated by the model, not the protocol, so do not read the 9% as a protocol verdict.&lt;/p&gt;

&lt;p&gt;And to be very clear, this measures per-request efficiency, which is not why most people reach for MCP. MCP's actual value is the ecosystem. Write one server and any agent can use it, without a previous knowledge of the contract. That portability is real and this harness does not price it. REST's hidden cost is the opposite: every consumer writes and maintains its own client, based on a shared contract.&lt;/p&gt;

&lt;p&gt;Efficiency is one axis, but it's not the only one.&lt;/p&gt;

&lt;p&gt;There is also a safety axis, which this harness does not touch: a stateless, per-request boundary is easier to reason about than a long-lived session, with authorization checked per call and no sticky server-side state to ride. That deserves its own measurement, so I'm thinking of a follow-up here.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to decide
&lt;/h2&gt;

&lt;p&gt;Is stateless MCP just REST with extra steps? No.&lt;/p&gt;

&lt;p&gt;It is REST with no cache, but with a typed, self-describing discovery layer bolted on top. Batteries included. Which one you want depends on your specific scenario:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Small, stable, portable tool set&lt;/strong&gt; that you want many agents to reuse: MCP wins. The schema tax is small and the ecosystem payoff is real.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Strict or unfamiliar API&lt;/strong&gt; with non-obvious parameters: MCP wins again. Typed, validated discovery means the agent calls correctly on the first try instead of guessing, failing, and retrying.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Large, loose API with cache-heavy reads and a single consumer&lt;/strong&gt;: a cache-friendly REST contract is the better developer experience. You avoid the schema tax and you get &lt;code&gt;304&lt;/code&gt;s for free.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Somewhere in between&lt;/strong&gt;: measure it. That is the whole point of the harness.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There is no winner-take-all. It is a trade-off about how much you spend describing your API, and what you get back for it, and now I hope it is a trade-off you can put some numbers on.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run it yourself
&lt;/h2&gt;

&lt;p&gt;The full harness is on GitHub: &lt;a href="https://github.com/edodusi/mcp-vs-rest-bench" rel="noopener noreferrer"&gt;mcp-vs-rest-bench&lt;/a&gt;. The backend, the two interfaces, the task suite, the runner, and the raw results JSON. It runs against Amazon Bedrock on demand, so there is nothing to tear down, no standing infrastructure, and a full five-trial sweep costs a few cents of Haiku tokens. Point it at your own stack, your own tasks, your own model, and settle your own version of the argument.&lt;/p&gt;

&lt;p&gt;Don't decide with vibes. Decide with data.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>mcp</category>
      <category>api</category>
    </item>
    <item>
      <title>Making my personal website callable for AI agents with WebMCP</title>
      <dc:creator>Salih Guler </dc:creator>
      <pubDate>Tue, 20 Oct 2026 08:17:31 +0000</pubDate>
      <link>https://dev.to/aws/making-my-personal-website-callable-for-ai-agents-with-webmcp-38aj</link>
      <guid>https://dev.to/aws/making-my-personal-website-callable-for-ai-agents-with-webmcp-38aj</guid>
      <description>&lt;p&gt;The first time someone mentioned WebMCP to me, I assumed it was a diagnostics tool for web apps. The name sounds like something you would open next to the network tab. My second guess was worse: I thought maybe it was a Playwright alternative. Luckily, I was wrong both times, and figuring out why is how I ended up adding it to &lt;a href="https://salih.dev" rel="noopener noreferrer"&gt;salih.dev&lt;/a&gt; (where probably nobody would use).&lt;/p&gt;

&lt;p&gt;A few months ago I wrote about &lt;a href="https://salih.dev/blog/building-an-agent-friendly-personal-website-with-specs-11b4" rel="noopener noreferrer"&gt;building an agent-friendly personal website with specs&lt;/a&gt;. The site serves Markdown to agents, has an &lt;code&gt;llms.txt&lt;/code&gt;, and answers a set of &lt;code&gt;.well-known&lt;/code&gt; discovery files. One of those files was &lt;code&gt;/.well-known/webmcp.json&lt;/code&gt;, and it said, politely, that there were no browser tools here. In case you don't know me, I am a very open person, if I don't have something, I would say "I don't have it". But I also don't take "No" for an answer, even to myself. So let's see how I added this very useful set of features on a not very useful scenario for the sake of learning.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The code is in the &lt;a href="https://github.com/salihgueler/salih-dev" rel="noopener noreferrer"&gt;salih-dev repository&lt;/a&gt;: the tools are in &lt;a href="https://github.com/salihgueler/salih-dev/pull/15" rel="noopener noreferrer"&gt;PR #15&lt;/a&gt;, and the speaker kit and discovery changes are in &lt;a href="https://github.com/salihgueler/salih-dev/pull/16" rel="noopener noreferrer"&gt;PR #16&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What is WebMCP?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://webmcp.dev/" rel="noopener noreferrer"&gt;WebMCP&lt;/a&gt; is a proposed web standard from the W3C Web Machine Learning Community Group, written by people from Microsoft and Google. It lets a web page declare tools that an AI agent running in the browser can call. The page registers each tool with a name, a description, a JSON schema for its input and a function that runs it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;modelContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;registerTool&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;list_events&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;List the conferences where Salih speaks...&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;inputSchema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;object&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;properties&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;when&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="cm"&gt;/* return the answer */&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The "MCP" is the same Model Context Protocol you may already run on a server. The difference is where it lives. A server MCP exposes tools from a backend. WebMCP exposes tools from the page the user has open, with the user's session and the page's state.&lt;/p&gt;

&lt;h2&gt;
  
  
  The tools I added
&lt;/h2&gt;

&lt;p&gt;My site has three kinds of content an agent might care about: blog posts, past talks and upcoming events. I wrote eight tools around them:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;What it answers&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;get_site_overview&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Where I am right now, content counts, my next event, the latest post, and the filter values the other tools accept&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;search_site&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Full-text search across posts, talks and events&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;list_blog_posts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Posts filtered by tag, category or text&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;read_blog_post&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The full Markdown of one post&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;list_talks&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Past talks by topic, event type, year, or whether a recording exists&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;list_events&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Upcoming, past or all events&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;get_speaker_kit&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;My bio, the topics I speak on, recent talks, where I am already booked, and how to reach me&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;show_talks_on_page&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Applies a filter on the Talks page so the visitor sees it too&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The first seven are read-only and registered on every page. The last one only exists on &lt;code&gt;/talks/&lt;/code&gt;, and it is the one I like most. It presses the page's real filter button, so the person watching sees the same list the agent is describing. The page's own controller stays in charge of the state, including its &lt;code&gt;aria-pressed&lt;/code&gt; attributes.&lt;/p&gt;

&lt;p&gt;I kept everything read-only on purpose. There is a comment form on the site, and I thought about exposing it. An agent posting comments on my behalf is a decision I want to make separately, after I have watched how agents use the read tools.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Bake an index at build time
&lt;/h2&gt;

&lt;p&gt;The tools need data, and I did not want them scraping my own HTML. The site is built with Astro, so I added a static endpoint that writes everything the tools need into one JSON file.&lt;/p&gt;

&lt;p&gt;Create it under &lt;code&gt;src/pages/api/webmcp-index.json.ts&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;GET&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;APIRoute&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;posts&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;talks&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;all&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
    &lt;span class="nf"&gt;getPublishedPosts&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="nf"&gt;getPublishedTalksSnapshot&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
  &lt;span class="p"&gt;]);&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;jsonResponse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nf"&gt;buildSiteIndex&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;siteName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;site&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;siteUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;site&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;posts&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;talkCards&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;projectTalkArchive&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;talks&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;cards&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;siteContent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;getSiteContent&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="p"&gt;}),&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Cache-Control&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;public, max-age=300&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;It reads the same published posts and talks the pages use, so the tools never disagree with what a human sees.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;buildSiteIndex&lt;/code&gt; flattens them into a small shape with titles, URLs, dates, tags and snippets.&lt;/li&gt;
&lt;li&gt;The file is static. My content API starts the publisher build after every write, and that build regenerates the file, so there is no extra Lambda to run.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;One detail took me a moment. Events move from "upcoming" to "past" on their own, and a baked file does not know what day it is. So the index stores dates, and the tools decide upcoming or past in the browser against the visitor's clock. An event that ended yesterday shows as past even if I have not rebuilt the site since.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Register the tools only when the browser supports them
&lt;/h2&gt;

&lt;p&gt;Most visitors use a browser without WebMCP, and I wanted them to see zero difference. The entry point checks for &lt;code&gt;document.modelContext&lt;/code&gt; and returns if it is missing.&lt;/p&gt;

&lt;p&gt;Add it to &lt;code&gt;src/lib/webmcp/register-tools.ts&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;registerWebMcpTools&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;void&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;context&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;modelContext&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;context&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="kc"&gt;undefined&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;registerContentTools&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;registerTalksPageTool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="na"&gt;error&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;unknown&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// A registration failure must never break the page for the human visitor.&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;warn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;WebMCP tool registration failed&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then load it from a component with no markup, &lt;code&gt;src/components/WebMcpTools.astro&lt;/code&gt;, and add that component to the base layout:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;script&amp;gt;
  import { registerWebMcpTools } from "../lib/webmcp/register-tools";

  void registerWebMcpTools();
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For types I used the &lt;code&gt;webmcp-types&lt;/code&gt; package, pinned to &lt;code&gt;0.1.10&lt;/code&gt;, and referenced it from &lt;code&gt;src/env.d.ts&lt;/code&gt;. That gives you &lt;code&gt;WebMCP.ModelContext&lt;/code&gt; and the &lt;code&gt;registerTool&lt;/code&gt; signature without writing your own copy of the API.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Write descriptions for a model, and check every input
&lt;/h2&gt;

&lt;p&gt;A tool description is a prompt. The agent reads it to decide whether to call the tool and what to pass. I wrote mine the way I would brief a colleague, including the defaults and the order of results:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;List the conferences and events where Salih Güler speaks or runs workshops. 'upcoming' (the default) lists events that have not ended yet, soonest first; 'past' lists finished events, most recent first; 'all' lists both.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;get_site_overview&lt;/code&gt; returns the exact tag, category and topic values the other tools accept, and its description tells the agent to call it first when it is unsure. That one line saves a lot of failed filter calls.&lt;/p&gt;

&lt;p&gt;The spec does not promise that the browser validates input against your schema. So every &lt;code&gt;execute&lt;/code&gt; function checks its input again before using it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;query&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;optionalString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="kc"&gt;undefined&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;query must be a non-empty string&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The search and filter logic lives in &lt;code&gt;src/lib/webmcp/queries.ts&lt;/code&gt; as pure functions, which made it easy to test without a browser. There are 12 tests for it, covering search ranking, filters, the upcoming and past split, post lookup and the speaker kit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Add a speaker kit
&lt;/h2&gt;

&lt;p&gt;The first version answered questions about my content. Then I thought about who actually looks me up. Most of the time it is an event organizer deciding whether to invite me, and they want a bio, the topics I cover, proof that I can give a talk, and a way to reach me. Before, an agent had to stitch that together from four tool calls and the About page.&lt;/p&gt;

&lt;p&gt;So the index got a &lt;code&gt;speaker&lt;/code&gt; block, built from the same &lt;code&gt;src/config/site.ts&lt;/code&gt; that renders my About and Contact pages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;speaker&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;speaker&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;role&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;bio&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;speaker&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;bioShort&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;longBio&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[...&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;speaker&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;bioLong&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="nx"&gt;focusAreas&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[...&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;speaker&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;focusAreas&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="nx"&gt;aboutUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;absolute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/about/&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="nx"&gt;contactUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;absolute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/contact/&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="nx"&gt;profiles&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;speaker&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;socials&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;social&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;social&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;label&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;social&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;href&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;})),&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And &lt;code&gt;src/lib/webmcp/queries.ts&lt;/code&gt; got a &lt;code&gt;speakerKit&lt;/code&gt; function that combines it with the talks and events. It counts how many talks I have given per topic, so the agent sees what I talk about most:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;topicCounts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Map&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;topic&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;talks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;order&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;talk&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;talks&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;topic&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;talk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;topics&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;normalize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;topic&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;continue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;entry&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;topicCounts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nx"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;talks&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="nx"&gt;topicCounts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;topic&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;talks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;order&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;topicCounts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;size&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The function returns the topics sorted by talk count, my five most recent talks with slides and recordings, the next five events I am booked for, and the contact routes. My site lists no email address, so the kit says that directly and points to the profiles on the contact page. An agent should not invent an address because the field looked empty.&lt;/p&gt;

&lt;p&gt;Registering it looks like the other tools. The description names the situations where an agent should pick it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;registerTool&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;get_speaker_kit&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Speaker kit&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Get what an event organizer needs to invite Salih Güler as a speaker: his role and bio, focus areas, the topics he has spoken on with talk counts, his most recent talks with slide and recording URLs, the events he is already booked for, and how to contact him. Use this when someone wants to invite him, check his availability, or write a speaker introduction.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;inputSchema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;object&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;properties&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;annotations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;readOnly&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;_input&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;signal&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;speakerKit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;loadIndex&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;signal&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nf"&gt;today&lt;/span&gt;&lt;span class="p"&gt;()),&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Adding the &lt;code&gt;speaker&lt;/code&gt; block changed the index shape, so I bumped its &lt;code&gt;version&lt;/code&gt; from 1 to 2.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Tell the humans too
&lt;/h2&gt;

&lt;p&gt;The tools are invisible to a person reading the site. If someone finds this post and opens salih.dev, nothing on the page says what to ask. So the About page has a new section, "Use this site with an AI agent", with example prompts and the console check from the "Try it yourself" section below.&lt;/p&gt;

&lt;p&gt;The About page also has a Markdown version for agents, and I did not want the two to drift apart. Both now render from one small module, &lt;code&gt;src/lib/webmcp/visitor-guide.ts&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;AGENT_GUIDE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;heading&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Use this site with an AI agent&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;promptsLead&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Some questions to try:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;prompts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Where is Salih speaking next, and what has he talked about before?&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Find Salih's posts about AWS Amplify and summarize the newest one.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Which of Salih's talks have a recording?&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Get Salih's speaker kit so I can invite him to our meetup.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="c1"&gt;// intro text, the Chrome flag, and the console call are here too&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;about.astro&lt;/code&gt; maps over it for the HTML, and the Markdown serializer builds the same section from it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it yourself
&lt;/h2&gt;

&lt;p&gt;You can call the tools on salih.dev today. You need Chrome 150 or newer.&lt;/p&gt;

&lt;h3&gt;
  
  
  From the Chrome console
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Open &lt;code&gt;chrome://flags/#enable-webmcp-testing&lt;/code&gt;, set &lt;strong&gt;WebMCP for testing&lt;/strong&gt; to &lt;strong&gt;Enabled&lt;/strong&gt;, and relaunch Chrome.&lt;/li&gt;
&lt;li&gt;Open &lt;a href="https://salih.dev" rel="noopener noreferrer"&gt;salih.dev&lt;/a&gt;, then open DevTools and go to the Console.&lt;/li&gt;
&lt;li&gt;List the tools and call one:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;tools&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;modelContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTools&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nx"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;kit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;get_speaker_kit&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;modelContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;executeTool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;kit&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;search&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;search_site&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;modelContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;executeTool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;search&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;agents&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see seven tools on most pages and eight on &lt;a href="https://salih.dev/talks/" rel="noopener noreferrer"&gt;/talks/&lt;/a&gt;. If &lt;code&gt;document.modelContext&lt;/code&gt; is &lt;code&gt;undefined&lt;/code&gt;, the flag is not on yet. Some Chrome builds expect the input as a JSON string, so if &lt;code&gt;executeTool&lt;/code&gt; complains, pass &lt;code&gt;JSON.stringify({ query: "agents" })&lt;/code&gt; instead.&lt;/p&gt;

&lt;p&gt;On the Talks page, run &lt;code&gt;show_talks_on_page&lt;/code&gt; with &lt;code&gt;{ filter: "All talks" }&lt;/code&gt; or one of the topic labels and watch the filter buttons on the page change.&lt;/p&gt;

&lt;h3&gt;
  
  
  With the MCP Inspector
&lt;/h3&gt;

&lt;p&gt;If you want to see the calls before you hand them to an agent, use the &lt;a href="https://modelcontextprotocol.io/docs/2026-07-28/tools/inspector" rel="noopener noreferrer"&gt;MCP Inspector&lt;/a&gt;. It is the reference tool for testing MCP servers, and it can start Chrome DevTools MCP for you with the same flags as above:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @modelcontextprotocol/inspector &lt;span class="se"&gt;\&lt;/span&gt;
  npx chrome-devtools-mcp@latest &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--categoryExperimentalWebmcp&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--chromeArg&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nt"&gt;--enable-features&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;WebMCP
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It prints a URL with a one-time token, so open that URL rather than typing &lt;code&gt;localhost:6274&lt;/code&gt; yourself. Turn on the switch next to the server to connect, then switch to &lt;strong&gt;Tools&lt;/strong&gt;. You are now doing by hand what Claude Code and Codex did on their own:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run &lt;code&gt;new_page&lt;/code&gt; with &lt;code&gt;https://salih.dev/talks/&lt;/code&gt; as the &lt;code&gt;url&lt;/code&gt;. Chrome opens the page, and the result lists its page ID.&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;list_webmcp_tools&lt;/code&gt; with that &lt;code&gt;pageId&lt;/code&gt;. You get all eight tools with their descriptions and input schemas, exactly as an agent receives them.&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;execute_webmcp_tool&lt;/code&gt; with the &lt;code&gt;pageId&lt;/code&gt;, a &lt;code&gt;toolName&lt;/code&gt; and the &lt;code&gt;input&lt;/code&gt; as a JSON string, for example &lt;code&gt;get_speaker_kit&lt;/code&gt; and &lt;code&gt;{}&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhch0trt2i9hdxalm3dbv.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhch0trt2i9hdxalm3dbv.webp" alt="The MCP Inspector showing list_webmcp_tools for salih.dev, with each tool's name, description and input schema" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu5h2ehe0uxdj3bsig3kn.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu5h2ehe0uxdj3bsig3kn.webp" alt="The MCP Inspector showing the result of get_speaker_kit, with my role, bio, focus areas and talk topics" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 2 is the useful one when you write your own tools. You read each description the way the model reads it, flattened into one long block with its schema, so a description that only makes sense next to your page is easy to spot. The Protocol tab on the right shows the raw JSON-RPC for every call if you need to see exactly what was sent.&lt;/p&gt;

&lt;p&gt;Every tool in the list has a small warning triangle. That is the Inspector's schema portability check on Chrome DevTools MCP's own schemas, not on my tools, and the calls work anyway.&lt;/p&gt;

&lt;h3&gt;
  
  
  From Claude Code, Codex or Kiro CLI
&lt;/h3&gt;

&lt;p&gt;Claude Code, Codex and Kiro CLI run in a terminal, not in a browser tab, so they cannot see &lt;code&gt;document.modelContext&lt;/code&gt; on their own. The bridge is &lt;a href="https://github.com/ChromeDevTools/chrome-devtools-mcp" rel="noopener noreferrer"&gt;Chrome DevTools MCP&lt;/a&gt;, Google's MCP server that gives a coding agent a real Chrome. It has an experimental WebMCP category with two tools: &lt;code&gt;list_webmcp_tools&lt;/code&gt; lists what a page registers, and &lt;code&gt;execute_webmcp_tool&lt;/code&gt; calls one of them with JSON input.&lt;/p&gt;

&lt;p&gt;The category is off by default. You need two flags: &lt;code&gt;--categoryExperimentalWebmcp&lt;/code&gt; turns on the two tools, and &lt;code&gt;--chromeArg=--enable-features=WebMCP&lt;/code&gt; turns on WebMCP in the Chrome that the server starts. That Chrome uses its own profile, so the flag you set in &lt;code&gt;chrome://flags&lt;/code&gt; does not carry over.&lt;/p&gt;

&lt;p&gt;For Claude Code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add chrome-devtools &lt;span class="nt"&gt;--scope&lt;/span&gt; user &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  npx chrome-devtools-mcp@latest &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--categoryExperimentalWebmcp&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--chromeArg&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nt"&gt;--enable-features&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;WebMCP
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For Codex:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;codex mcp add chrome-devtools &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  npx chrome-devtools-mcp@latest &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--categoryExperimentalWebmcp&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--chromeArg&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nt"&gt;--enable-features&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;WebMCP
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you prefer editing &lt;code&gt;~/.codex/config.toml&lt;/code&gt; directly, this is the same server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="nn"&gt;[mcp_servers.chrome-devtools]&lt;/span&gt;
&lt;span class="py"&gt;command&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"npx"&lt;/span&gt;
&lt;span class="py"&gt;args&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="s"&gt;"chrome-devtools-mcp@latest"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s"&gt;"--categoryExperimentalWebmcp"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="py"&gt;"--chromeArg=--enable-features&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="err"&gt;WebMCP&lt;/span&gt;&lt;span class="s"&gt;",&lt;/span&gt;&lt;span class="err"&gt;
&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For Kiro CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kiro-cli mcp add &lt;span class="nt"&gt;--name&lt;/span&gt; chrome-devtools &lt;span class="nt"&gt;--scope&lt;/span&gt; global &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--command&lt;/span&gt; npx &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--args&lt;/span&gt; &lt;span class="s1"&gt;'["chrome-devtools-mcp@latest","--categoryExperimentalWebmcp","--chromeArg=--enable-features=WebMCP"]'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That writes the server to &lt;code&gt;~/.kiro/settings/mcp.json&lt;/code&gt;. Use &lt;code&gt;--scope workspace&lt;/code&gt; instead if you only want it in one project, in that project's &lt;code&gt;.kiro/settings/mcp.json&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Restart the agent and ask it something about the site. I gave Codex this prompt:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Open https://salih.dev/ in the browser. Use the page's WebMCP tools to answer:
where is Salih speaking next, and which topics has he given talks on?
Then say which WebMCP tools you called. Do not read the page HTML.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzjklgqj7hqhooo4asuf8.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzjklgqj7hqhooo4asuf8.webp" alt="Codex Screenshot of the Tool Call" width="800" height="595"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It called &lt;code&gt;list_webmcp_tools&lt;/code&gt;, then &lt;code&gt;execute_webmcp_tool&lt;/code&gt; three times with &lt;code&gt;get_site_overview&lt;/code&gt;, &lt;code&gt;list_events&lt;/code&gt; and &lt;code&gt;list_talks&lt;/code&gt;. The answer had CityJS Athens on 21 to 23 October as my next event, the two events after it, and the topics from both talks. It did not read the page HTML once.&lt;/p&gt;

&lt;p&gt;I gave Codex a speaker question instead, and it went straight to &lt;code&gt;get_speaker_kit&lt;/code&gt; after listing the tools. That one call was enough for my bio, focus areas and contact routes. It also repeated the kit's note that the site has no email address, which is the line I added so an agent would not make one up. One small lesson from that run: I asked for "three focus areas", the kit has four, and Codex merged two of them to match my number. The agent trusted my prompt over the data.&lt;/p&gt;

&lt;p&gt;With Kiro CLI I asked which talks I have given and whether any of them has a recording. It opened the page, called &lt;code&gt;list_webmcp_tools&lt;/code&gt;, and then made a single &lt;code&gt;execute_webmcp_tool&lt;/code&gt; call with &lt;code&gt;list_talks&lt;/code&gt;. The answer had both talks with their events and dates, and it said neither has a recording because &lt;code&gt;videoUrl&lt;/code&gt; is empty for both. Kiro CLI asks before it runs each tool, so every one of those calls went through an approval prompt first.&lt;/p&gt;

&lt;p&gt;Two things to know before you try this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Chrome DevTools MCP can read and change anything in the browser it controls. The server prints that warning on start, and it is right. Use it on sites you trust, and keep it away from tabs with accounts you care about.&lt;/li&gt;
&lt;li&gt;The site cannot see who is calling its tools or ask the visitor for permission. Your agent's own approval prompts are the only check, so read what it wants to call before you allow it. My tools only read, so it does not matter much here. It would matter on a site with a checkout tool.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Chrome's &lt;a href="https://developer.chrome.com/docs/devtools/agents/webmcp-debugging" rel="noopener noreferrer"&gt;Debug WebMCP tools with AI agents&lt;/a&gt; page shows the same setup from the author's side: asking your coding agent to check that your own tools register and that their schemas are clear enough for a model.&lt;/p&gt;

&lt;h3&gt;
  
  
  With other agents
&lt;/h3&gt;

&lt;p&gt;If your agent runs inside a browser that supports WebMCP, ask it one of the questions from my About page, for example "Where is Salih speaking next, and what has he talked about before?", and check which tools it calls.&lt;/p&gt;

&lt;p&gt;An agent without a browser still gets the same answers. Point it at &lt;a href="https://salih.dev/llms.txt" rel="noopener noreferrer"&gt;llms.txt&lt;/a&gt;. It lists the tools and links &lt;a href="https://salih.dev/api/webmcp-index.json" rel="noopener noreferrer"&gt;/api/webmcp-index.json&lt;/a&gt;, the data the tools read.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://webmachinelearning.github.io/webmcp/" rel="noopener noreferrer"&gt;WebMCP specification&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/salihgueler/salih-dev" rel="noopener noreferrer"&gt;salih-dev repository&lt;/a&gt;, &lt;a href="https://github.com/salihgueler/salih-dev/pull/15" rel="noopener noreferrer"&gt;PR #15&lt;/a&gt; and &lt;a href="https://github.com/salihgueler/salih-dev/pull/16" rel="noopener noreferrer"&gt;PR #16&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.npmjs.com/package/webmcp-types" rel="noopener noreferrer"&gt;webmcp-types on npm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://salih.dev/blog/building-an-agent-friendly-personal-website-with-specs-11b4" rel="noopener noreferrer"&gt;Building an agent-friendly personal website with specs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.chrome.com/blog/ai-webmcp-origin-trial" rel="noopener noreferrer"&gt;Join the WebMCP origin trial&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://chromewebstore.google.com/detail/model-context-tool-inspec/gbpdfapgefenggkahomfgkhfehlcenpd" rel="noopener noreferrer"&gt;Model Context Tool Inspector&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/ChromeDevTools/chrome-devtools-mcp" rel="noopener noreferrer"&gt;Chrome DevTools MCP&lt;/a&gt; and its &lt;a href="https://github.com/ChromeDevTools/chrome-devtools-mcp/blob/main/docs/tool-reference.md#webmcp" rel="noopener noreferrer"&gt;WebMCP tool reference&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.chrome.com/docs/devtools/agents/webmcp-debugging" rel="noopener noreferrer"&gt;Debug WebMCP tools with AI agents&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://modelcontextprotocol.io/docs/2026-07-28/tools/inspector" rel="noopener noreferrer"&gt;MCP Inspector&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>agents</category>
      <category>webmcp</category>
    </item>
    <item>
      <title>Enséñale a tu agente a usar AWS</title>
      <dc:creator>Axel Espinosa</dc:creator>
      <pubDate>Fri, 16 Oct 2026 23:27:43 +0000</pubDate>
      <link>https://dev.to/aws/ensenale-a-tu-agente-a-usar-aws-448c</link>
      <guid>https://dev.to/aws/ensenale-a-tu-agente-a-usar-aws-448c</guid>
      <description>&lt;p&gt;Cada día que pasa estamos sorprendidos por lo capaces que los agentes de código se han convertido. Muchos incluso predicen que ya no necesitamos ingenieros o ingenieras en el futuro y que se viene un apocalipsis donde las computadoras se van a rebelar contra nosotros y contra aquellos que no le decían por favor y gracias a sus agentes después de terminar una tarea.&lt;/p&gt;

&lt;p&gt;Nada más alejado de la realidad. Cuando le preguntas algo a tu agente seguramente has notado que se inventa cosas que ni siquiera existen o que te da una solución que quizás no es la adecuada. Y es que el agente no tiene la culpa en sí de que no pueda darte la última versión de la API de una librería &lt;a href="https://en.wikipedia.org/wiki/Knowledge_cutoff" rel="noopener noreferrer"&gt;porque ellos tienen un corte en la información. Es decir, quedan congelados en el tiempo.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Por supuesto, existen herramientas que le ayudan al agente a encontrar información actualizada y con eso puede ponerle un parche a lo que le falta de información y completar la tarea. Hemos visto cómo pasamos de &lt;a href="https://builder.aws.com/content/3Es2FFfx65RFsvYtFyFSPp56T5u/que-es-mcp-explicado-para-devs?trk=02b062ab-d194-401f-85b7-db6aae204076&amp;amp;sc_channel=el" rel="noopener noreferrer"&gt;MCPs a skills&lt;/a&gt; y luego a un mix entre ellas.&lt;/p&gt;

&lt;p&gt;Y es por eso que hoy quiero platicarte acerca de una herramienta que le va a ayudar a tu agente a hacer las cosas de la forma correcta cuando trabajas con AWS.&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS no tiene que ser complicado
&lt;/h2&gt;

&lt;p&gt;Sí... yo sé que alguien te dijo que usar AWS es difícil o que necesitas configurar demasiadas cosas. Pero algo que quizás nadie te ha dicho todavía es que mejoramos la plataforma para que puedas construir de manera más sencilla con AWS sin que tengas que gastar tantas horas configurando tu cuenta antes de empezar siquiera a construir.&lt;/p&gt;

&lt;p&gt;La nueva experiencia de AWS te permite comenzar de manera más sencilla y sin tanto rollo. &lt;a href="https://aws.amazon.com/about-aws/whats-new/2026/09/New-AWS-Builder-Experience?trk=02b062ab-d194-401f-85b7-db6aae204076&amp;amp;sc_channel=el" rel="noopener noreferrer"&gt;Aquí te dejo un blog post adicional por si quieres leer más al respecto.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Uno de los principales cambios para personas como tú y como yo que les gusta empezar rápido y sin tanto trámite es la forma en que puedes conectar tus agentes de IA para que trabajen por ti y te ayuden a construir en AWS.&lt;/p&gt;

&lt;h2&gt;
  
  
  ¿Qué hace esta herramienta?
&lt;/h2&gt;

&lt;p&gt;Como te dije antes, los agentes únicamente aprenden hasta cierta fecha y lo que hace esta herramienta es que te permite utilizar herramientas que quizás ya son familiares para ti como MCP y los Agent Skills para brindarle conocimiento a tu agente de cómo debe trabajarse en AWS de la forma CORRECTA, utilizando las mejores prácticas y aprovechando las bondades de la nueva experiencia.&lt;/p&gt;

&lt;p&gt;Si quieres que tu agente tenga estas habilidades solo tenemos que realizar unas configuraciones. Pero lo bueno es que podemos copiar un prompt y pegarlo en nuestro agente para que haga el trabajo por nosotros. Sencillo, ¿no?&lt;/p&gt;

&lt;h2&gt;
  
  
  Vamos a instalarlo
&lt;/h2&gt;

&lt;p&gt;Iniciemos sesión en nuestra cuenta. Si no tienes una cuenta todavía, &lt;a href="https://docs.aws.amazon.com/accounts/latest/reference/sign-in-new.html?trk=02b062ab-d194-401f-85b7-db6aae204076&amp;amp;sc_channel=el" rel="noopener noreferrer"&gt;te dejo un recurso para que crees tu cuenta&lt;/a&gt;. ¡Ahora puedes iniciar sesión hasta con GitHub!&lt;/p&gt;

&lt;p&gt;Copiamos el prompt que aparece en nuestra pantalla:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fae3ih4ulzz4dlatkbttu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fae3ih4ulzz4dlatkbttu.png" alt="Consola de AWS con la nueva experiencia AI First" width="800" height="101"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;El prompt le dice a nuestros agentes que deben configurar el &lt;a href="https://aws.amazon.com/products/developer-tools/agent-toolkit-for-aws?trk=02b062ab-d194-401f-85b7-db6aae204076&amp;amp;sc_channel=el" rel="noopener noreferrer"&gt;Agent Toolkit&lt;/a&gt;. Y además, les da instrucciones para que usen la &lt;a href="https://aws.amazon.com/blogs/aws/aws-reimagines-the-getting-started-experience?trk=02b062ab-d194-401f-85b7-db6aae204076&amp;amp;sc_channel=el" rel="noopener noreferrer"&gt;nueva experiencia de AWS&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Pegamos el prompt en nuestro editor y esperamos a que el agente termine. Solo necesitaremos ir dando permisos, ya que lo que hará es instalar la AWS CLI en caso de que no la tengamos, o la actualizará y muchas otras cosas.  &lt;/p&gt;

&lt;p&gt;Después de pegar el prompt empieza con esto. Verificando las herramientas que necesita:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fevi8o8zgnrzzf0r2qcja.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fevi8o8zgnrzzf0r2qcja.png" alt="Imagen de mi agente trabajando" width="800" height="267"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ya aquí mi agente verificó todo lo que necesita para empezar con la configuración:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F87hcrormu4lws5thqzmz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F87hcrormu4lws5thqzmz.png" alt="Imagen de mi agente trabajando ya que terminó de configurar" width="799" height="475"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;En mi caso me pidió que le diera &lt;a href="https://docs.aws.amazon.com/accounts/latest/reference/connect-ai-coding-tool.html/?trk=02b062ab-d194-401f-85b7-db6aae204076&amp;amp;sc_channel=el" rel="noopener noreferrer"&gt;un nombre de perfil&lt;/a&gt;. Así que le puedo decir que use el default o darle un nombre. Yo elijo el default.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F330qi2hwldudmqq0f14w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F330qi2hwldudmqq0f14w.png" alt="Seleccionar un perfil de AWS" width="800" height="475"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Esto sirve por si quieres trabajar en diferentes proyectos. Le dices al agente que proyecto tiene que usar y utilizará ese perfil.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Una vez definido el perfil me pide que inicie sesión. Solo necesitas &lt;code&gt;aws login&lt;/code&gt; y se abrirá una ventana en tu navegador para terminar de hacer login y seleccionar el proyecto al que quieras acceder.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fk3rd9qnszrvchxo4m2um.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fk3rd9qnszrvchxo4m2um.png" alt="Seleccionar un proyecto" width="800" height="452"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;En mi caso yo estoy colaborando en un proyecto con un compañero por eso se ven dos tarjetas para elegir. Una que en particular dice: Owned by Ramsés.&lt;/p&gt;

&lt;p&gt;Si quieres saber más acerca de los proyectos, &lt;a href="https://docs.aws.amazon.com/accounts/latest/reference/create-project.html/?trk=02b062ab-d194-401f-85b7-db6aae204076&amp;amp;sc_channel=el" rel="noopener noreferrer"&gt;checa este link&lt;/a&gt;, ya que es una ¡nueva feature!&lt;/p&gt;

&lt;p&gt;Seleccionamos la opción que necesitemos y vamos a ver la siguiente pantalla:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foo5pf1rmofg2h85ae8iv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foo5pf1rmofg2h85ae8iv.png" alt="Login completo en la consola de AWS" width="800" height="302"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Después de que haya seleccionado el proyecto se crean credenciales temporales para que pueda acceder a mi cuenta desde la terminal (este acceso lo usará el agente. Ojo, el agente nunca tiene acceso a mi token o contraseña).&lt;/p&gt;

&lt;p&gt;Ya que tenemos el acceso listo, el agente configura las &lt;a href="https://docs.aws.amazon.com/agent-toolkit/latest/userguide/skills.html/?trk=02b062ab-d194-401f-85b7-db6aae204076&amp;amp;sc_channel=el" rel="noopener noreferrer"&gt;Agent Skills que contienen buenas prácticas para trabajar con AWS&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fabfzvzlza0n0bfk8uoir.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fabfzvzlza0n0bfk8uoir.png" alt="Skills instaladas para mi agente de inteligencia artificial" width="799" height="296"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Esto le dará a nuestro agente instrucciones adicionales para que sepa qué hacer en ciertos momentos y que no invente cosas.&lt;/p&gt;

&lt;p&gt;Después instalará las nuevas reglas e instrucciones para aprovechar al máximo la nueva experiencia de AWS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4383yzv7qgoyd3ogjwkm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4383yzv7qgoyd3ogjwkm.png" alt="Instrucciones agregadas" width="800" height="372"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Esto agregará las instrucciones a las guías de tu agente. En mi caso, estoy usando Kiro, así que configurará esas instrucciones en los &lt;a href="https://kiro.dev/docs/steering/?trk=02b062ab-d194-401f-85b7-db6aae204076&amp;amp;sc_channel=el" rel="noopener noreferrer"&gt;Steering Files&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Al finalizar, el agente tiene todas las herramientas necesarias para trabajar con nuestra cuenta. Incluso a mí me aparece que puedo pedirle una nueva webapp.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg43e0i70n9ogeiwegurj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg43e0i70n9ogeiwegurj.png" alt="Kiro trabajando" width="800" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Algo que también es útil es que le podemos preguntar acerca de la nueva experiencia de AWS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fewjfragnkw03vc75x646.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fewjfragnkw03vc75x646.png" alt="Nueva experiencia AWS respuesta del agente" width="800" height="217"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Otra cosa que está genial en la nueva experiencia son los &lt;a href="https://docs.aws.amazon.com/accounts/latest/reference/create-spend-limit.html/?trk=02b062ab-d194-401f-85b7-db6aae204076&amp;amp;sc_channel=el" rel="noopener noreferrer"&gt;límites de gastos&lt;/a&gt;, que también nos los menciona.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fttr3r0xr7rts5ei0n1cc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fttr3r0xr7rts5ei0n1cc.png" alt="Informacion sobre los limites de gasto" width="800" height="89"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Empecemos a crear
&lt;/h2&gt;

&lt;p&gt;Ya que tenemos esto podemos crear lo que nosotros nos imaginemos y desplegarlo de inmediato en nuestra cuenta. Ya no tenemos que desperdiciar tanto tiempo configurando. Ahora podemos aprovechar ese tiempo construyendo, ya que AWS se encarga de darnos una cuenta con configuraciones sensatas por default para que no nos preocupemos.&lt;/p&gt;

&lt;p&gt;Recuerda: cada vez que vayas a trabajar con AWS, únicamente escribe &lt;code&gt;aws login&lt;/code&gt; para crear las credenciales temporales y que tu agente pueda desplegar tus recursos. ¡Ojo! No te olvides revisar cada acción que el agente tome por ti para siempre estar seguro de lo que estás haciendo 🙂.&lt;/p&gt;

&lt;p&gt;¿Qué es lo primero que vas a crear con esta nueva experiencia? Deja tu comentario.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>cloud</category>
      <category>aws</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Build without stopping to set up IAM roles in the new AWS experience</title>
      <dc:creator>Fabricio Flores</dc:creator>
      <pubDate>Tue, 13 Oct 2026 14:54:34 +0000</pubDate>
      <link>https://dev.to/aws/build-without-stopping-to-set-up-iam-roles-in-the-new-aws-experience-1mj2</link>
      <guid>https://dev.to/aws/build-without-stopping-to-set-up-iam-roles-in-the-new-aws-experience-1mj2</guid>
      <description>&lt;p&gt;The new AWS experience removes two pieces of permission setup that often interrupt an early build. First, a project owner can now invite another person with an emailed invite, instead of having to set up an IAM user or IAM Identity Center. Second, when you create a resource using a supported AWS service, &lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_role-manager.html" rel="noopener noreferrer"&gt;IAM role manager&lt;/a&gt; can automatically set up the IAM role for you so that your project resources can talk to each other.&lt;/p&gt;

&lt;p&gt;Those actions involve different identities. Project access authorizes the person doing the work. An IAM role authorizes the service or application that runs afterward.&lt;/p&gt;

&lt;p&gt;If you created your account through the new AWS experience, role manager is already turned on. When you create a supported resource, such as a Lambda function, AWS creates or reuses the role it needs and attaches it automatically.&lt;/p&gt;

&lt;h2&gt;
  
  
  Share a project with collaborators
&lt;/h2&gt;

&lt;p&gt;A project owner can share access in two ways: invite someone from the&lt;a href="https://settings.aws.com/team" rel="noopener noreferrer"&gt;&lt;strong&gt;Team&lt;/strong&gt; page&lt;/a&gt; and choose one or more projects, or open a specific project and invite them from its &lt;strong&gt;Members&lt;/strong&gt; area. An invitation from the Team page does not automatically share every project the owner has; access applies only to the selected projects. After accepting, the team member has admin access to the resources and services available in those projects, including the ability to create access controls for services and applications. They cannot perform owner-only team-management, project, root, or financial actions. If you need to customize a team member’s access instead of granting project admin access, you must first &lt;a href="https://docs.aws.amazon.com/accounts/latest/reference/activate-advanced-features.html" rel="noopener noreferrer"&gt;activate advanced AWS features&lt;/a&gt;. For more details about sharing projects and team member access, see &lt;a href="https://docs.aws.amazon.com/accounts/latest/reference/invite-team-members.html" rel="noopener noreferrer"&gt;Invite team members to collaborate in AWS Settings&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmxo3ll40hdr55nybyzhp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmxo3ll40hdr55nybyzhp.png" alt="Invite team members dialog showing an email field and two selected projects" width="800" height="334"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To see the invitation process in action, watch &lt;a href="https://youtu.be/xk_TKy5Epzg" rel="noopener noreferrer"&gt;Invite Your Teammate to Your AWS Project&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How role manager works
&lt;/h2&gt;

&lt;p&gt;An IAM role defines what an AWS service is allowed to access and do. Setting one up usually means defining which service can assume the role, choosing what that service is allowed to do, and attaching the role to the resource.&lt;/p&gt;

&lt;p&gt;IAM role manager automates that setup. When you create a resource in one of the &lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_role-manager.html#id_roles_create_role-manager_supported-services" rel="noopener noreferrer"&gt;supported services&lt;/a&gt;, role manager creates a role for it or reuses one that already fits. It then attaches the role as part of the same workflow, so you do not have to stop and set it up separately in IAM.&lt;/p&gt;

&lt;p&gt;For accounts created through the new AWS experience, role manager is enabled by default. You cannot disable it until the account owner &lt;a href="https://docs.aws.amazon.com/accounts/latest/reference/activate-advanced-features.html" rel="noopener noreferrer"&gt;activates advanced AWS features&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This restriction is enforced by an AWS-managed service control policy (SCP). In the new experience, AWS manages the SCPs and resource control policies (RCPs) that protect your projects' preconfigured defaults, so you do not set up or edit these guardrails. For details, see &lt;a href="https://docs.aws.amazon.com/accounts/latest/reference/scps-and-rcps-for-projects.html" rel="noopener noreferrer"&gt;Managed policies for your organization&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;After advanced features are activated, you can manage role manager from &lt;strong&gt;Account settings&lt;/strong&gt; in the IAM console.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fepl6ipvdiy4wacxhqzy4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fepl6ipvdiy4wacxhqzy4.png" alt="IAM Account settings showing role manager enabled" width="799" height="454"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How role manager sets up a Lambda execution role
&lt;/h2&gt;

&lt;p&gt;Lambda is a useful example because AWS cannot know ahead of time which services your code will call. With role manager enabled, creating a function automatically attaches an execution role that the code can use immediately. You can narrow that role later, once you know what the function actually needs.&lt;/p&gt;

&lt;p&gt;Because those permissions are unknown at creation time, role manager starts the role with the AWS managed &lt;code&gt;PowerUserAccess&lt;/code&gt; policy. This gives the function broad access to AWS services, but it does not allow the function to manage IAM, AWS Organizations, or account settings. The role's trust policy allows only Lambda to assume it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fixw97u5mpig8ity2siq6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fixw97u5mpig8ity2siq6.png" alt="Lambda Create function page with helloWorld as the function name and Python 3.14 selected" width="800" height="371"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After the function is created, open its &lt;strong&gt;Configuration&lt;/strong&gt; tab and choose &lt;strong&gt;Permissions&lt;/strong&gt;. The &lt;strong&gt;Execution role&lt;/strong&gt; panel shows the &lt;code&gt;PowerUserRole&lt;/code&gt; that role manager attached.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg2wg364drfic4mncjfzn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg2wg364drfic4mncjfzn.png" alt="Lambda Configuration permissions showing PowerUserRole as the execution role" width="800" height="725"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Follow the role link to IAM. On the role's &lt;strong&gt;Permissions&lt;/strong&gt; tab, choose &lt;code&gt;PowerUserAccess&lt;/code&gt; to inspect the AWS managed policy and the access it grants.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyjfe7axy9tkh1pfgoh2b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyjfe7axy9tkh1pfgoh2b.png" alt="IAM policy details showing the PowerUserAccess managed policy and its policy document" width="800" height="577"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Roles created by role manager are standard IAM roles, so you can inspect their trust policies and permissions, edit them, or delete them. Each role records the AWS-managed template it came from, which lets you identify roles created by role manager. AWS CloudTrail records each role's creation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Refine permissions before production
&lt;/h2&gt;

&lt;p&gt;Least privilege means giving a workload only the actions and resource access it needs. Role manager's &lt;code&gt;PowerUserAccess&lt;/code&gt; policy is useful while you are still discovering those needs, but it is intentionally broader than most production functions require.&lt;/p&gt;

&lt;p&gt;Use &lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-policy-generation.html" rel="noopener noreferrer"&gt;IAM Access Analyzer policy generation&lt;/a&gt; to help refine the role's permissions toward least privilege. Editing the role removes it from role manager's control and makes it a standard role that you manage.&lt;/p&gt;

&lt;p&gt;After activating advanced AWS features, you can disable role manager without affecting existing applications or removing their roles. Existing roles stay in place, but new resources use the standard service or IAM role-creation workflows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Role manager automates the initial IAM role setup for supported AWS services. It creates or reuses a role and attaches it while you create the resource, but the result remains a standard IAM role that you can inspect and control.&lt;/p&gt;

&lt;p&gt;Together with AWS-managed project sharing, this reduces the access setup required for both collaborators and the services they build. Before production, review how the workload actually behaves and use IAM Access Analyzer policy generation to replace broad permissions with a more focused policy.&lt;/p&gt;

&lt;p&gt;To get started, create a resource in a &lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_role-manager.html#id_roles_create_role-manager_supported-services" rel="noopener noreferrer"&gt;supported service&lt;/a&gt;. In accounts created through the new AWS experience, role manager is already enabled. For more information about managing roles yourself, see &lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create.html" rel="noopener noreferrer"&gt;IAM role creation&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>infrastructure</category>
      <category>security</category>
    </item>
    <item>
      <title>Cut AI agent token costs with decision models for tool selection</title>
      <dc:creator>Elizabeth Fuentes L</dc:creator>
      <pubDate>Tue, 13 Oct 2026 08:44:45 +0000</pubDate>
      <link>https://dev.to/aws/cut-ai-agent-token-costs-with-decision-models-for-tool-selection-2320</link>
      <guid>https://dev.to/aws/cut-ai-agent-token-costs-with-decision-models-for-tool-selection-2320</guid>
      <description>&lt;p&gt;Give an AI agent a real toolset (25, 40, more) and every call pays for it. The agent reads every tool description to use one, so input tokens grow with each tool you add. And with many similar tools in view (&lt;code&gt;search&lt;/code&gt;, &lt;code&gt;search_hotels&lt;/code&gt;, &lt;code&gt;search_flights&lt;/code&gt;...), the model picks the wrong one more often. &lt;/p&gt;

&lt;p&gt;Two costs on every turn: tokens you did not need to spend, and picks you did not want. Giving the agent fewer tools is not the fix, because different turns need different tools. You want the full toolset available but only the relevant few in front of the model each turn.&lt;/p&gt;

&lt;p&gt;In an &lt;a href="https://dev.to/aws/reduce-agent-errors-and-token-costs-with-semantic-tool-selection-7mf"&gt;earlier post&lt;/a&gt; I solved this with semantic tool selection over a vector store: embed every tool description into an index (FAISS), embed the query, and keep the nearest few. It works, and that walkthrough covers it in depth. But it has a cost of its own: you maintain an embedding index for your tools, every query pays an embedding call, and the index has to stay in sync as tools change.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fehbkrt234cmcn4z542m3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fehbkrt234cmcn4z542m3.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A new class of model changes this. A &lt;strong&gt;decision model&lt;/strong&gt; reads the request and the list of tools and returns a calibrated choice directly, with no embeddings and no index. It generates no text, so there is nothing to parse, and the choice comes with a confidence score. &lt;/p&gt;

&lt;p&gt;Three have arrived recently: &lt;strong&gt;&lt;a href="https://strandsagents.com/blog/introducing-strands-decider/" rel="noopener noreferrer"&gt;Strands Decider&lt;/a&gt;&lt;/strong&gt;, an open-source 2B model that runs locally; &lt;strong&gt;&lt;a href="https://docs.typesafe.ai/" rel="noopener noreferrer"&gt;Jev&lt;/a&gt;&lt;/strong&gt; (TypeSafe), a hosted one; and the &lt;strong&gt;&lt;a href="https://platform.openai.com/docs/guides/decisions" rel="noopener noreferrer"&gt;OpenAI Decisions API&lt;/a&gt;&lt;/strong&gt; (&lt;code&gt;gpt-6-luna&lt;/code&gt;, public beta since Oct 2026), also hosted. All three answer the same bounded question, &lt;em&gt;which tool fits this request?&lt;/em&gt;, and all three skip the vector store entirely. You get the token and accuracy win of tool selection without building or maintaining an index.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Forenjyiz29f9uq4m4odi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Forenjyiz29f9uq4m4odi.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How Strands fits in
&lt;/h2&gt;

&lt;p&gt;Strands lets you plug any of these in the same way, through a hook that runs before the model and swaps the agent's tools for the turn. The selector inside the hook can be the vector store or a decision model, and the same idea extends to &lt;strong&gt;model routing&lt;/strong&gt;, choosing which model serves the request.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ToolFilterHook&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;HookProvider&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;register_hooks&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;registry&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;registry&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_callback&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BeforeModelCallEvent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;tools&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;select&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;      &lt;span class="c1"&gt;# vector, decider, Jev, or OpenAI Decisions
&lt;/span&gt;        &lt;span class="nf"&gt;swap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;              &lt;span class="c1"&gt;# the model now sees only these
&lt;/span&gt;
&lt;span class="n"&gt;agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Agent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;ALL_TOOLS&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hooks&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;ToolFilterHook&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;select&lt;/span&gt;&lt;span class="p"&gt;)])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The agent is built once with every tool; the hook trims the registry per request. This is where Strands earns its place: it swaps tools on the &lt;strong&gt;live&lt;/strong&gt; agent at runtime, so the conversation survives. Frameworks that force you to rebuild the agent to change its tools lose that history. Here you keep the memory, and you switch strategy by swapping &lt;code&gt;select&lt;/code&gt; in one line.&lt;/p&gt;

&lt;p&gt;The swap itself is a few lines against the agent's tool registry. Clear it and register the chosen tools; the running agent and its message history stay intact:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;swap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;reg&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tool_registry&lt;/span&gt;
    &lt;span class="n"&gt;reg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;registry&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;clear&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;          &lt;span class="c1"&gt;# drop the previous turn's tools
&lt;/span&gt;    &lt;span class="n"&gt;reg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dynamic_tools&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;clear&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;               &lt;span class="c1"&gt;# register only the ones picked this turn
&lt;/span&gt;        &lt;span class="n"&gt;reg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;register_tool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="c1"&gt;# agent.messages is untouched — the conversation is preserved
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;References: &lt;a href="https://strandsagents.com/docs/user-guide/sdk/agents/hooks/" rel="noopener noreferrer"&gt;Strands hooks&lt;/a&gt;, &lt;a href="https://strandsagents.com/docs/user-guide/sdk/agents/hooks-events/" rel="noopener noreferrer"&gt;hook events&lt;/a&gt;,&lt;br&gt;
and &lt;a href="https://strandsagents.com/docs/user-guide/sdk/model-providers/model-routing/" rel="noopener noreferrer"&gt;model routing&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Keeping the live conversation is memory &lt;em&gt;within&lt;/em&gt; a session. For memory that lasts &lt;em&gt;across&lt;/em&gt; sessions, Strands has a dedicated&lt;br&gt;
&lt;a href="https://strandsagents.com/docs/user-guide/sdk/memory/overview/" rel="noopener noreferrer"&gt;memory library&lt;/a&gt;: pluggable &lt;strong&gt;memory stores&lt;/strong&gt; on a unified storage interface. You attach a store, a local file store for prototyping or &lt;strong&gt;Amazon Bedrock Knowledge Bases&lt;/strong&gt; with semantic search for production (or your own backend), and the agent gets recall, automatic injection into the prompt, and extraction of new memories. So the hook keeps this turn's context, and the memory store carries durable knowledge between runs.&lt;/p&gt;


&lt;h2&gt;
  
  
  Model routing
&lt;/h2&gt;

&lt;p&gt;The hook decides &lt;em&gt;which tools&lt;/em&gt;. &lt;strong&gt;Strands model routing&lt;/strong&gt; decides &lt;em&gt;which model&lt;/em&gt;. Give a &lt;code&gt;ModelRouter&lt;/code&gt; a few candidates and a strategy; the strategy picks one per request. A decision model fits this role well: picking the model is a &lt;code&gt;choice&lt;/code&gt; among a few unordered options — exactly what these models are built for — and it votes with a calibrated pick instead of a chat call. &lt;/p&gt;

&lt;p&gt;All three decision models plug into the same &lt;code&gt;RoutingStrategy&lt;/code&gt; interface: &lt;strong&gt;Jev&lt;/strong&gt; (hosted), &lt;strong&gt;Strands Decider&lt;/strong&gt; (local 2B), and the &lt;strong&gt;OpenAI Decisions API&lt;/strong&gt; (&lt;code&gt;gpt-6-luna&lt;/code&gt;, a &lt;code&gt;choice&lt;/code&gt; question over the candidate models). The example below uses Jev — the one wired in the demo (&lt;code&gt;model_routing_with_jev.py&lt;/code&gt;); swapping in Strands Decider or OpenAI Decisions is a one-class change, so you pick on hosted-vs-local and which provider you are already on. Routing to a cheaper model for the easy requests is where this pays off — OpenAI reports a run that cut cost 54% by classifying each job before picking the model.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;router&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;ModelRouter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;small&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;large&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;strategy&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nc"&gt;JevRoutingStrategy&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;span class="n"&gt;agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Agent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;router&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Same shape as the tool hook: a cheap decision in front, the expensive model only when it is needed.&lt;/p&gt;


&lt;h2&gt;
  
  
  The comparison
&lt;/h2&gt;

&lt;p&gt;Same 12 queries, same ~25-tool pool, one demo run (AWS Bedrock Claude Haiku as the agent):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Approach&lt;/th&gt;
&lt;th&gt;Accuracy&lt;/th&gt;
&lt;th&gt;Chat tokens&lt;/th&gt;
&lt;th&gt;Latency (end to end)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Send all tools&lt;/td&gt;
&lt;td&gt;10 / 12&lt;/td&gt;
&lt;td&gt;~56k&lt;/td&gt;
&lt;td&gt;~1.1s, fastest&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hook + vector&lt;/td&gt;
&lt;td&gt;11 / 12&lt;/td&gt;
&lt;td&gt;~20k&lt;/td&gt;
&lt;td&gt;~1.8s (+ an embedding call)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hook + decision model&lt;/td&gt;
&lt;td&gt;11 / 12&lt;/td&gt;
&lt;td&gt;~16k&lt;/td&gt;
&lt;td&gt;~2.3s (+ a decision call)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Both selectors reach the same accuracy and cut chat tokens by about two-thirds. But each adds a call &lt;strong&gt;before&lt;/strong&gt; the model: vector embeds the query (and pays embedding tokens), the decision model runs one choice, so here they are &lt;strong&gt;slower end to end&lt;/strong&gt;, not faster. At 25 tools, sending everything is the quickest.&lt;/p&gt;

&lt;p&gt;That ordering flips as the toolset grows. The model's prefill (reading the prompt before it answers) scales worse than linearly with input length, so a bigger pile of tool descriptions makes every call slower, and an agent makes many calls. Past some tool count the baseline's growing prefill overtakes the fixed cost of one selection step, and selecting first becomes the faster path, not just the cheaper one. &lt;/p&gt;

&lt;p&gt;So the real takeaway is not a fixed latency winner; it is that you spend a small, constant selection cost to keep the prompt, the token bill, and the prefill small, and that pays off more as you add tools.&lt;/p&gt;
&lt;h3&gt;
  
  
  Where the delay is
&lt;/h3&gt;

&lt;p&gt;Follow the request through the pipeline and you can see exactly where each approach spends time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Send all tools:&lt;/strong&gt; one step, the model call. No selection, so nothing extra, but the model reads all ~25 tool descriptions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hook + vector:&lt;/strong&gt; three steps before the answer: &lt;em&gt;embed the query&lt;/em&gt; (a network call to the embedding model), &lt;em&gt;search the index&lt;/em&gt; (local, microseconds), then the &lt;em&gt;model call&lt;/em&gt;. The added delay is the embedding round-trip.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hook + decision model:&lt;/strong&gt; two steps before the answer: &lt;em&gt;the decision&lt;/em&gt; (local inference for Strands Decider, or a network call for Jev), then the &lt;em&gt;model call&lt;/em&gt;. The added delay is that one decision.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq8u6hj36s404xdyljx66.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq8u6hj36s404xdyljx66.png" alt=" " width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So the extra latency lives in the selection step, before the model runs. The model call itself is cheaper afterwards (a short tool list), but not cheap enough at this scale to beat skipping selection entirely.&lt;/p&gt;


&lt;h2&gt;
  
  
  Which selector should I use?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Already embedding things?&lt;/strong&gt; Vector is the smallest add.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Want a calibrated pick and no index?&lt;/strong&gt; A decision model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run a small model locally?&lt;/strong&gt; Strands Decider 2B. &lt;strong&gt;Prefer a managed endpoint?&lt;/strong&gt; Jev.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Already on OpenAI, or need image context?&lt;/strong&gt; The OpenAI Decisions API — hosted, calibrated &lt;code&gt;choice&lt;/code&gt; + confidence, billed on input tokens only ($0.10/1M), and it accepts images as well as text (which Jev does not yet).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They are not exclusive. The hook makes them interchangeable in one line.&lt;/p&gt;
&lt;h3&gt;
  
  
  A quick selection benchmark
&lt;/h3&gt;

&lt;p&gt;Measuring only the pick — &lt;em&gt;which tool each selector returns&lt;/em&gt; — over 20 labelled queries against a ~25-tool pool (warm, single run on 2026-10-07):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Selector&lt;/th&gt;
&lt;th&gt;Accuracy&lt;/th&gt;
&lt;th&gt;Mean&lt;/th&gt;
&lt;th&gt;p50&lt;/th&gt;
&lt;th&gt;Cost&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Vector (FAISS/Titan)&lt;/td&gt;
&lt;td&gt;95%&lt;/td&gt;
&lt;td&gt;155 ms&lt;/td&gt;
&lt;td&gt;144 ms&lt;/td&gt;
&lt;td&gt;— (embedding call)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Jev (hosted)&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;210 ms&lt;/td&gt;
&lt;td&gt;200 ms&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenAI Decisions (&lt;code&gt;gpt-6-luna&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;275 ms&lt;/td&gt;
&lt;td&gt;258 ms&lt;/td&gt;
&lt;td&gt;$0.054 / 1k picks (538 input tok each)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Small set, one run — treat it as an early signal, not a verdict. Both decision models matched the right tool on every query here; vector missed one. (This is the &lt;em&gt;selection&lt;/em&gt; step in isolation; the end-to end table above measures a different 12-query run including the agent's answer.)&lt;/p&gt;


&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;All of this runs in the open-source demo (Demo 02),&lt;br&gt;
&lt;strong&gt;&lt;a href="https://github.com/elizabethfuentes12/why-agents-fail-sample-for-amazon-agentcore" rel="noopener noreferrer"&gt;why-agents-fail-sample-for-amazon-agentcore&lt;/a&gt;&lt;/strong&gt;. It has &lt;code&gt;chat.py&lt;/code&gt; (vector), &lt;code&gt;chat_decider.py&lt;/code&gt; (local decision model), &lt;code&gt;model_routing_with_jev.py&lt;/code&gt; (model routing), and a notebook that measures accuracy and tokens for each — including the hosted OpenAI Decisions API as a third selector.&lt;/p&gt;


&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Does trimming tools hurt accuracy?&lt;/strong&gt; No. In the demo it raised accuracy, because fewer similar tools means less confusion. The risk is dropping the right tool; tune how many you keep.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why a hook instead of rebuilding the agent?&lt;/strong&gt; Rebuilding loses the conversation. The hook changes the tools on the live agent, so memory survives and you switch strategy in one line.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does a decision model save tokens?&lt;/strong&gt; It sends fewer tool descriptions to the agent and generates no text itself. It is a separate, cheap call, not a chat turn.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is this tied to Strands?&lt;/strong&gt; The idea (filter before the model) is general. Strands makes it first-class: hooks, the tool-registry swap, and model routing are built in.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What do I need to run the OpenAI Decisions selector?&lt;/strong&gt; An &lt;code&gt;OPENAI_API_KEY&lt;/code&gt; and &lt;code&gt;openai&amp;gt;=3.26.0&lt;/code&gt; (or just POST to &lt;code&gt;/v1/decisions&lt;/code&gt;). It is in public beta on &lt;code&gt;gpt-6-luna&lt;/code&gt;, returns a typed &lt;code&gt;choice&lt;/code&gt; with confidence, and bills input tokens only — no output or cache charges.&lt;/p&gt;



&lt;p&gt;Gracias!&lt;/p&gt;

&lt;p&gt;🇻🇪 &lt;a href="https://dev.to/elizabethfuentes12"&gt;Dev.to&lt;/a&gt; &lt;a href="https://www.linkedin.com/in/lizfue/" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt; &lt;a href="https://github.com/elizabethfuentes12/" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; &lt;a href="https://twitter.com/elizabethfue12" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; &lt;a href="https://www.instagram.com/elifue.tech" rel="noopener noreferrer"&gt;Instagram&lt;/a&gt; &lt;a href="https://www.youtube.com/channel/UCr0Gnc-t30m4xyrvsQpNp2Q" rel="noopener noreferrer"&gt;Youtube&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag__user ltag__user__id__717518"&gt;
    &lt;a href="/elizabethfuentes12" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__pic"&gt;
        &lt;img src="https://media2.dev.to/dynamic/image/width=150,height=150,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F717518%2Fb550b165-b8b9-405d-acfb-e5dc846765b0.png" alt="elizabethfuentes12 image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/elizabethfuentes12"&gt;Elizabeth Fuentes L&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/elizabethfuentes12"&gt;I help developers build production-ready AI applications through hands-on tutorials and open-source projects.&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;



</description>
      <category>ai</category>
      <category>python</category>
      <category>jev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How I built this serverless API with the new AWS</title>
      <dc:creator>Fabricio Flores</dc:creator>
      <pubDate>Thu, 08 Oct 2026 21:56:17 +0000</pubDate>
      <link>https://dev.to/aws/how-i-built-this-serverless-api-with-the-new-aws-56jc</link>
      <guid>https://dev.to/aws/how-i-built-this-serverless-api-with-the-new-aws-56jc</guid>
      <description>&lt;p&gt;AI coding agents have shortened the path from an idea to working code. The &lt;a href="https://signin.aws.amazon.com/signup?request_type=builderId&amp;amp;trk=0a3e63d3-e29a-4c69-b70d-caa08a783f72&amp;amp;sc_channel=el" rel="noopener noreferrer"&gt;updated AWS experience&lt;/a&gt; is designed to make deployment keep pace. It connects your agent to an AWS project, configures the AWS tools it needs, and handles permissions between the resources it creates.&lt;/p&gt;

&lt;p&gt;I used that workflow to turn a short prompt into a Python API using Amazon API Gateway, AWS Lambda, and Amazon DynamoDB. The build starts by connecting the agent to AWS and ends with a working endpoint that I call from my terminal.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connect a coding agent to the AWS project
&lt;/h2&gt;

&lt;p&gt;After signing in, I followed the instructions in the &lt;strong&gt;Setup Agent Toolkit for AWS&lt;/strong&gt; dialog and pasted its setup prompt into my coding agent.&lt;/p&gt;

&lt;p&gt;The agent then:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;installed the AWS Command Line Interface (AWS CLI),&lt;/li&gt;
&lt;li&gt;used &lt;code&gt;aws login&lt;/code&gt; to sign me in,&lt;/li&gt;
&lt;li&gt;configured the AWS MCP server and core AWS skills, and&lt;/li&gt;
&lt;li&gt;added customizable rules for building on AWS.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2zqtaje453zxh3lyr6zp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2zqtaje453zxh3lyr6zp.png" alt="Setup Agent Toolkit for AWS dialog containing instructions to paste into a coding agent" width="800" height="647"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Describe the API in one prompt
&lt;/h2&gt;

&lt;p&gt;With the agent connected, I described the service I wanted:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjyekiwjqdtxnkgydlfih.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjyekiwjqdtxnkgydlfih.png" alt="Prompt asking a coding agent to create and deploy a serverless API on AWS" width="796" height="57"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I specified Python, asked for a stateful response I could test, and told the agent to show me the architecture before deploying. I left the AWS service choices open.&lt;/p&gt;

&lt;h2&gt;
  
  
  Review the proposed architecture
&lt;/h2&gt;

&lt;p&gt;Before creating resources, the agent proposed this architecture:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwbei5vecgnfc36hyl4iw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwbei5vecgnfc36hyl4iw.png" alt="Serverless API architecture showing a client calling Amazon API Gateway, AWS Lambda, and Amazon DynamoDB" width="800" height="140"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The detailed proposal defined &lt;code&gt;GET /counter&lt;/code&gt; as an atomic increment of a value stored in DynamoDB. API Gateway would expose the public endpoint, a Python Lambda function would handle each request, and an on-demand DynamoDB table would maintain state across calls. The atomic update would prevent duplicate values during concurrent requests.&lt;/p&gt;

&lt;p&gt;The plan also included conservative throttling, a least-privilege IAM role for the table update and function logging, CloudWatch log retention, local tests, and deployment through an AWS CloudFormation stack.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw9tbydh5dwx17f973pcf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw9tbydh5dwx17f973pcf.png" alt="Coding agent presenting the detailed serverless architecture and asking for approval before deployment" width="800" height="266"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The agent explicitly said that no AWS resources had been changed and asked me to approve the architecture and public endpoint before continuing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let the agent build and deploy
&lt;/h2&gt;

&lt;p&gt;After I approved the plan, the agent deployed the &lt;code&gt;serverless-counter-api&lt;/code&gt; CloudFormation stack in &lt;code&gt;us-east-2&lt;/code&gt;. The deployment included:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a public API Gateway endpoint,&lt;/li&gt;
&lt;li&gt;a Python 3.12 Lambda function,&lt;/li&gt;
&lt;li&gt;a DynamoDB table to store the counter, and&lt;/li&gt;
&lt;li&gt;an IAM role giving the function the access it needed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The API was intentionally public for this demo. Anyone with the URL could invoke it and generate usage, so a production API should use authorization appropriate to its callers and data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqy37tr0pevqeai4r6afe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqy37tr0pevqeai4r6afe.png" alt="Coding agent listing the AWS resources deployed for the serverless service" width="800" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Call the live endpoint
&lt;/h2&gt;

&lt;p&gt;The agent verified the deployment by calling the endpoint three times. Each call returned HTTP 200 with &lt;code&gt;{"value": 1}&lt;/code&gt;, &lt;code&gt;{"value": 2}&lt;/code&gt;, and &lt;code&gt;{"value": 3}&lt;/code&gt;. A consistent DynamoDB read confirmed that the stored value was &lt;code&gt;3&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Later, I set &lt;code&gt;API_URL&lt;/code&gt; to the &lt;code&gt;/prod/counter&lt;/code&gt; invoke URL and called it three times in a loop:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg0k4d2br1ak8mfe95ljr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg0k4d2br1ak8mfe95ljr.png" alt="Terminal showing three calls to the deployed API returning values 7, 8, and 9" width="800" height="205"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Those calls returned &lt;code&gt;{"value": 7}&lt;/code&gt;, &lt;code&gt;{"value": 8}&lt;/code&gt;, and &lt;code&gt;{"value": 9}&lt;/code&gt;. The increasing values confirmed that the service was live and maintaining state across requests.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I kept control of
&lt;/h2&gt;

&lt;p&gt;I chose what the API should do, reviewed the proposed architecture, and approved the public deployment. The agent handled the tooling setup, implementation, deployment, and first tests.&lt;/p&gt;

&lt;p&gt;Before wrapping up, I verified the result myself: Lambda updated DynamoDB atomically and returned the new value, the permissions were limited to what the function needed, and &lt;code&gt;GET /counter&lt;/code&gt; worked. The agent reported success, but the final call was mine.&lt;/p&gt;

&lt;p&gt;Try this with a coding agent you already use. &lt;a href="https://signin.aws.amazon.com/signup?request_type=builderId&amp;amp;trk=0a3e63d3-e29a-4c69-b70d-caa08a783f72&amp;amp;sc_channel=el" rel="noopener noreferrer"&gt;Get started here&lt;/a&gt;, then give your agent a small AWS project and ask to see the plan before it deploys anything. You make the calls and check the result. Let the agent handle the setup and get the first version running.&lt;/p&gt;

&lt;p&gt;Now go build something 😄.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>aws</category>
      <category>cloud</category>
    </item>
  </channel>
</rss>
