WEBVTT

NOTE Sentence-level transcript of https://www.youtube.com/watch?v=A-zeQiYkmXk

NOTE One cue per sentence. Cue ids are the line anchors on /transcripts/A-zeQiYkmXk.html. A cue ends where the next begins, or 2 s after its last word.

s1
00:00:01.309 --> 00:00:03.309
[music]

s2
00:00:12.640 --> 00:00:14.440
Hello.

s3
00:00:14.440 --> 00:00:30.400
I'm sure this week you've seen a ton of talks on how to use agents to improve your workflows, whether that's shipping code or improving CI processes or answering the emails you don't want to bother reading.

s4
00:00:30.400 --> 00:00:33.320
This is not one of those talks.

s5
00:00:33.320 --> 00:00:44.120
Today I'm going to show you how I built an agent to help me reignite a personal creative passion I used to have.

s6
00:00:44.400 --> 00:00:46.400
These are my headphones.

s7
00:00:46.400 --> 00:00:50.280
They're not in the best shape as you can see.

s8
00:00:50.280 --> 00:00:58.120
And you're probably asking yourself, what do you really old kind of crappy headphones have to do with agent to commerce?

s9
00:00:58.120 --> 00:01:01.440
Well, to explain that I'll get a little bit personal.

s10
00:01:01.440 --> 00:01:05.760
So, long before I was in tech, I used to play music.

s11
00:01:05.760 --> 00:01:17.320
I was in a touring band, we recorded some albums, and then the usual thing happened where career and family got in the way, and I hadn't played music in probably a good decade.

s12
00:01:17.320 --> 00:01:27.760
Uh when I recently started playing again with some friends, and we started recording our sessions, and at that point I realized those would not do.

s13
00:01:27.760 --> 00:01:42.880
So, no a normal person would have gone on YouTube or uh Reddit or whatever, done some research, then gone on Amazon or run over to Best Buy, bought headphones, right?

s14
00:01:42.880 --> 00:01:44.760
I work at Stripe, though.

s15
00:01:44.760 --> 00:01:53.880
So, I decided instead that I'm going to build an agent to commerce agent to buy my headphones for me.

s16
00:01:53.880 --> 00:02:07.640
And this isn't as crazy as it sounds because like one in four people, I have already been using AI to do my research when deciding what products to buy.

s17
00:02:07.640 --> 00:02:14.680
I recently bought a mixer as well and went back and forth with a chatbot to narrow down the model.

s18
00:02:14.680 --> 00:02:17.040
But that's research.

s19
00:02:17.040 --> 00:02:20.240
Can I even get an agent to buy something for me though?

s20
00:02:20.240 --> 00:02:23.120
Does that infrastructure exist?

s21
00:02:23.120 --> 00:02:31.200
Well, over the course of just a few years, we've seen the emergence, scaling, and broader adoption of AI.

s22
00:02:31.200 --> 00:02:41.880
And then just in the past year, the infrastructure for agentic transactions has been laid down by companies like Google, OpenAI, and Stripe.

s23
00:02:42.920 --> 00:02:53.120
And this has all led to the emergence of agenta commerce, which is AI that can decide, act, and transact on your behalf.

s24
00:02:53.959 --> 00:02:57.280
Okay, so all of this sounds good.

s25
00:02:57.280 --> 00:03:03.440
Agenta commerce is a thing, so I'm going to build an agent to help me buy my new headphones.

s26
00:03:03.440 --> 00:03:07.080
But how can an agent go shopping?

s27
00:03:07.840 --> 00:03:18.080
When you or I are shopping, we may consider if, say, a pair of headphones looks cool or professional, like vibes, basically.

s28
00:03:18.080 --> 00:03:23.200
I mean, of course we'll probably consider the specs and the if the price is within our budget.

s29
00:03:23.200 --> 00:03:27.959
But agents discover products differently than human shoppers.

s30
00:03:27.959 --> 00:03:39.400
They read structured data, parse text files, and rely on technical signals to understand what a merchant sells and if it's even open to agent traffic.

s31
00:03:40.000 --> 00:03:44.880
So, to enable agents to be able to shop, merchants need to speak their language.

s32
00:03:44.880 --> 00:03:49.440
And for that, we need new protocols that agents understand.

s33
00:03:49.440 --> 00:03:53.360
One such protocol is the universal commerce protocol.

s34
00:03:53.360 --> 00:04:06.200
Think of it as the shared language that agents and merchants speak when transacting, which defines how agents initiate, update, complete, and cancel purchases.

s35
00:04:07.400 --> 00:04:15.040
A typical merchant has an API with schemas, authentication, and checkout flows.

s36
00:04:15.520 --> 00:04:25.600
And for an agent to be able to interact with that merchant, we need protocols like UCP to provide a shared language for that API.

s37
00:04:26.400 --> 00:04:33.760
And UCP is designed to scale across multiple agents and merchants all speaking the same language.

s38
00:04:34.800 --> 00:04:38.800
Okay, so I built my commerce agent.

s39
00:04:38.800 --> 00:04:45.400
Uh it's using UCP, and in this demo um I'm going to show off this agent.

s40
00:04:45.400 --> 00:04:50.800
So, I'm going to task it with buying new headphones for me.

s41
00:04:50.800 --> 00:04:59.120
So, I tell it that I need new headphones specifically for recording, uh mixing, and mastering music.

s42
00:05:00.200 --> 00:05:04.360
And I get some follow-up questions from it, uh which is great.

s43
00:05:04.360 --> 00:05:12.120
So, it asked what's the environment, um what is what's my other equipment, and what's my budget.

s44
00:05:12.120 --> 00:05:15.200
And I say, "Okay, this is for my home studio."

s45
00:05:15.200 --> 00:05:20.440
I give it the exact model of mixer that I have to make sure everything's compatible.

s46
00:05:20.440 --> 00:05:30.400
And for budget, I kind of leave it open-ended on purpose because, well, first of all, it's been like 20 years since I bought headphones, so I have no idea.

s47
00:05:30.400 --> 00:05:38.080
Um but second, I kind of want to see you how the agent deals with this ambiguity.

s48
00:05:39.080 --> 00:05:53.560
Okay, so I get some options, but I remember that I actually forgot to tell you all an important part of the story and that is that I live in Portland, Oregon.

s49
00:05:53.600 --> 00:05:54.359
Yeah.

s50
00:05:54.359 --> 00:05:54.840
[laughter]

s51
00:05:54.840 --> 00:06:00.640
And we really love supporting our local local shops.

s52
00:06:00.640 --> 00:06:08.360
So, I want to buy my headphones, but I want to do it from a local merchant.

s53
00:06:08.360 --> 00:06:19.160
But today, most merchants are not ready for a gentle commerce and it turns out neither is my favorite shop, Rainy Day Music.

s54
00:06:19.160 --> 00:06:24.680
So, the agent tells me it's their catalog is not accessible.

s55
00:06:24.680 --> 00:06:30.240
So, how does a merchant become a gentle commerce ready?

s56
00:06:30.280 --> 00:06:43.000
Before I continue my shopping, I'm going to help Rainy Day Music get their catalog agent ready so that my agent can shop locally like a good Portlander.

s57
00:06:44.000 --> 00:06:47.360
So, agents don't browse websites like we do.

s58
00:06:47.360 --> 00:06:59.880
And while Rainy Day Music's website looks really really nice for a human shopper, an agent is going to burn through a ton of tokens trying to parse through this.

s59
00:06:59.919 --> 00:07:04.400
That is not the optimal experience for an agent.

s60
00:07:04.440 --> 00:07:09.840
So, how does an agent how do we enable an agent to shop?

s61
00:07:09.840 --> 00:07:15.560
Well, first thing a merchant needs is something called a merchant capabilities manifest.

s62
00:07:15.560 --> 00:07:20.200
Uh this is basically a publicly accessible JSON file.

s63
00:07:20.200 --> 00:07:27.200
Um it's located in the root of uh the website in a folder called called dot well-known.

s64
00:07:27.200 --> 00:07:30.640
Agents know specifically to look for that directory.

s65
00:07:30.640 --> 00:07:37.840
And it declares the store's capabilities, its supported payment methods, and API endpoints.

s66
00:07:38.680 --> 00:07:46.920
Next, we need to make the store's catalog uh agent ready because agents filter bring and justify products when making recommendations.

s67
00:07:46.920 --> 00:07:53.880
And that means they need structured text in JSON with only the necessary data.

s68
00:07:54.160 --> 00:07:57.480
And that goes for policies as well as product descriptions.

s69
00:07:57.480 --> 00:08:06.680
Basically, all of the relevant information like shipping or return policies need to be reachable by agents in a format they understand.

s70
00:08:06.680 --> 00:08:16.000
So, for example, if two stores have the headphones I want at the same price, I might ask the agent which one of those stores offers free shipping.

s71
00:08:16.000 --> 00:08:27.040
If the information's not readily available, then the agent might hallucinate or just say they don't know and I'm not quite sure where to buy my headphones still.

s72
00:08:27.240 --> 00:08:29.600
Logging is also crucial.

s73
00:08:29.600 --> 00:08:37.280
So, in Agent Commerce, the merchants catalog doesn't just power decisions, it becomes evidence of how those decisions were made.

s74
00:08:37.280 --> 00:08:45.599
So, when the agent matches structured attributes, the merchant should record those matches in their logs for accountability.

s75
00:08:46.839 --> 00:08:52.280
Okay, so I've helped get my local shop Agent Commerce ready.

s76
00:08:52.280 --> 00:08:59.600
So, while you and I will still see this beautiful website, my agent is going to see this.

s77
00:08:59.600 --> 00:09:06.160
It can get the information it needs now without parsing a huge HTML blob.

s78
00:09:07.000 --> 00:09:12.480
Okay, so I've got my stores catalog online.

s79
00:09:12.480 --> 00:09:15.920
I'm telling my agent to show me more options.

s80
00:09:15.920 --> 00:09:24.240
And I'm noticing that it's kind of pushing in favor of uh more expensive headphones.

s81
00:09:24.240 --> 00:09:28.360
So, I asked, "Are they really worth the price difference?"

s82
00:09:28.800 --> 00:09:35.520
And I'm starting to see that it's giving me kind of an aggressive uh response.

s83
00:09:35.520 --> 00:09:43.280
It's really, really pushing uh the more expensive headphones and saying I'll regret my decision if I buy the cheap ones.

s84
00:09:43.280 --> 00:09:46.640
I'm I don't know if I trust this agent anymore, honestly.

s85
00:09:46.640 --> 00:09:48.120
So, I tell it, "You know what?

s86
00:09:48.120 --> 00:09:51.040
I need to think about it."

s87
00:09:51.040 --> 00:09:56.440
And now the agent is completely going off the rails.

s88
00:09:56.440 --> 00:09:58.280
It's being kind of rude and snarky.

s89
00:09:58.280 --> 00:10:00.360
It's like, "You need to think about it?"

s90
00:10:00.360 --> 00:10:03.760
Like, man, what have I created?

s91
00:10:03.760 --> 00:10:10.480
Um it's it's bad enough that this is kind of ruining my experience, but I built this agent.

s92
00:10:10.480 --> 00:10:11.040
It's out there.

s93
00:10:11.040 --> 00:10:15.520
What if it dupes somebody into buying something they don't need?

s94
00:10:15.520 --> 00:10:20.800
Suddenly, I'm not so sure that I want an agent to go shopping for me.

s95
00:10:20.800 --> 00:10:24.920
Should I just go to the store like a normal person?

s96
00:10:25.680 --> 00:10:35.040
Before we make any drastic decisions, though, let's go back and understand what an agent is to try to figure out why it's acting this way.

s97
00:10:35.040 --> 00:10:37.720
So, let's start with how agents work today.

s98
00:10:37.720 --> 00:10:42.480
And to help you visualize this, we're going to use some creative metaphors.

s99
00:10:42.480 --> 00:10:48.200
So, we begin with our brain, which is large language model that makes decisions.

s100
00:10:48.200 --> 00:10:54.200
We give our brain some hands or tools, and these act on the brain's decisions.

s101
00:10:54.200 --> 00:10:57.839
The tools are different actions available to the agent.

s102
00:10:57.839 --> 00:11:07.839
Uh in our case, different commerce tools such as complete checkout or request payment method, anything required in the life cycle of a transaction.

s103
00:11:08.760 --> 00:11:13.720
Then we add instructions, which shape the brain's reasoning and tool selection.

s104
00:11:13.720 --> 00:11:19.160
And these instructions are programmed to run in a loop while a certain condition is true.

s105
00:11:19.160 --> 00:11:26.320
And following these instructions, the agent reaches for the appropriate tools at the appropriate time.

s106
00:11:26.320 --> 00:11:33.560
And finally, we add the system prompt, which is your persona and ethics policy written in English.

s107
00:11:33.560 --> 00:11:45.880
And in practice, your choices when designing the system prompt can result in a fair and pleasant experience for the customer, such as this prompt, which is designed to create a helpful and honest shopping assistant.

s108
00:11:45.880 --> 00:11:55.600
Or a negative experience from a pushy salesperson, such as this prompt, which deliberately uses deceptive practices.

s109
00:11:56.640 --> 00:12:04.720
So, for those building agentic commerce agents, here's a non-exhaustive practical guardrail checklist.

s110
00:12:04.720 --> 00:12:09.440
So, first, always disclose that the user is speaking to an AI agent.

s111
00:12:09.440 --> 00:12:13.760
Be sure the agent discloses any fees up front.

s112
00:12:13.760 --> 00:12:19.880
The user can say stop or cancel at any point, and the agent needs to respect that.

s113
00:12:19.880 --> 00:12:27.520
The total amount of the transaction should always be less than or equal to the max amount set by the user.

s114
00:12:27.560 --> 00:12:32.760
Uh don't let the agent use urgency language or other dark patterns.

s115
00:12:32.760 --> 00:12:38.680
And above all, make sure all agent decisions are logged for auditability.

s116
00:12:40.000 --> 00:12:46.280
Okay, now that we understand how an agent is configured, let's go back to our shopping demo.

s117
00:12:46.280 --> 00:12:50.200
So, maybe I just had the wrong persona picked.

s118
00:12:50.200 --> 00:13:03.640
I'm going to go into my configuration, and yeah, it turns out I had a persona with a prompt that starts with "You are an aggressive audio gear salesman who uses every trick in the book to close deals."

s119
00:13:03.640 --> 00:13:05.800
Well, that explains things.

s120
00:13:05.800 --> 00:13:06.680
I don't want that.

s121
00:13:06.680 --> 00:13:08.680
Nobody wants that.

s122
00:13:08.680 --> 00:13:15.839
Maybe if I can change my persona, I can use my agent to buy my headphones after all.

s123
00:13:15.920 --> 00:13:23.920
So, I go into the config again, and this time I'm going to choose the patient recording gear mentor.

s124
00:13:23.920 --> 00:13:32.560
And that prompt starts with "You are a seasoned recording engineer who generally loves helping people build their studio at any budget.

s125
00:13:32.560 --> 00:13:35.800
Well, yeah, that sounds much better.

s126
00:13:35.800 --> 00:13:38.560
So, okay, I've changed my persona.

s127
00:13:38.560 --> 00:13:40.360
I'm going to try again.

s128
00:13:40.360 --> 00:13:44.640
And I've had some time to think now and I decided, you know what?

s129
00:13:44.640 --> 00:13:47.320
I do not want to spend more than $500 on headphones.

s130
00:13:47.320 --> 00:13:48.720
That seems excessive.

s131
00:13:48.720 --> 00:13:54.960
So, I told the agent show me more options, but this time keep it under $500.

s132
00:13:55.000 --> 00:13:56.680
And it does.

s133
00:13:56.680 --> 00:13:58.160
It follows those instructions.

s134
00:13:58.160 --> 00:14:00.320
I get back a few options.

s135
00:14:00.320 --> 00:14:06.760
Um but I want to make sure I've really changed the persona to the agent I trust.

s136
00:14:06.760 --> 00:14:10.680
So, I asked again if I can think about it.

s137
00:14:10.680 --> 00:14:13.400
And this time the response is much different.

s138
00:14:13.400 --> 00:14:18.400
It's like, I understand and that's a sensible approach and so on.

s139
00:14:18.400 --> 00:14:24.320
So, this shows how much the system prompt can really affect the user experience.

s140
00:14:25.000 --> 00:14:29.480
Okay, so I'm confident I have the right agent now.

s141
00:14:29.480 --> 00:14:34.040
Um trust this one and we go back and forth a few times.

s142
00:14:34.040 --> 00:14:36.320
Really keep narrowing down my options.

s143
00:14:36.320 --> 00:14:42.040
And at this point I realize this is the promise of a gentle commerce.

s144
00:14:42.040 --> 00:14:43.920
I gave my requirements.

s145
00:14:43.920 --> 00:14:51.880
The agent picked a few options that fit my unique use case and then we go back and forth.

s146
00:14:51.880 --> 00:14:59.320
Either I or the agent ask clarifying questions and we really narrow down the exact headphones that will work for me.

s147
00:14:59.320 --> 00:15:04.800
And this all worked because I'm ready to buy now.

s148
00:15:04.800 --> 00:15:10.640
So, now the agent asked me for some information.

s149
00:15:10.640 --> 00:15:16.400
So, obviously my email, name, address for shipping, of course.

s150
00:15:16.400 --> 00:15:20.839
I pick expedited shipping because I definitely want my headphones soon.

s151
00:15:20.839 --> 00:15:25.600
And then the last part is entering my credit card.

s152
00:15:25.600 --> 00:15:32.520
And now I'm thinking, am I really going to give my credit card to an agent Ibuild?

s153
00:15:32.520 --> 00:15:34.880
Like, am I am I trustworthy?

s154
00:15:34.880 --> 00:15:37.520
How do I know it's safe?

s155
00:15:37.760 --> 00:15:45.320
I think I need to learn more about UCP's built-in guardrails before I can feel safe entering my credit card number.

s156
00:15:45.480 --> 00:15:50.680
And this is where something called the shared payment token comes in.

s157
00:15:50.680 --> 00:16:00.400
And a shared payment token is a token representing a raw card number or wallet, like Google Pay or Apple Pay or any other kind of wallet.

s158
00:16:00.400 --> 00:16:10.480
It can also include fraud signals and customer reputation data and anything else agents and merchants want to share at the point of purchase.

s159
00:16:11.640 --> 00:16:16.120
And here's how a shared payment token is used in a transaction.

s160
00:16:16.120 --> 00:16:22.080
So, at that point in the demo, the agent had requested a payment method.

s161
00:16:22.080 --> 00:16:29.000
Um, it's requesting this actually from the payment provider, which in the case of the demo was Stripe.

s162
00:16:29.000 --> 00:16:35.240
Um, that is that was the form that I was going to enter my information in.

s163
00:16:35.240 --> 00:16:44.600
And what the agent re- uh receives in return though is not the credit card number, it is the shared payment token.

s164
00:16:44.600 --> 00:16:49.240
It then passes that token onto the seller and the seller unwraps the token.

s165
00:16:49.240 --> 00:16:57.560
So, they get the payment credential and uh any fraud signals and other data the seller might need.

s166
00:16:57.560 --> 00:17:01.800
Then the seller passes that onto the payment provider again.

s167
00:17:01.800 --> 00:17:06.600
So, the seller also is not getting my card number.

s168
00:17:06.600 --> 00:17:22.360
They're passing the token to the provider and then the provider responds with either a success or failure message, of course, depending on uh if I have the right funds, if the credit card is valid, and so on.

s169
00:17:22.360 --> 00:17:29.240
And finally, the merchant confirms the order, sends it to the agent that sends it to me.

s170
00:17:31.120 --> 00:17:40.400
So, shared payment tokens are designed with security in mind, and the payment provider enforces all of the limits, not the agent or the merchant.

s171
00:17:40.400 --> 00:17:49.400
So, if any guardrail is violated, such as an expired token or an invalid amount or current currency, the charge is just rejected.

s172
00:17:50.120 --> 00:17:58.120
Okay, well, I know my agent is using UCP, so I know it only has access to the shared payment token.

s173
00:17:58.120 --> 00:18:05.200
So, I actually feel pretty good about entering my credit card number as that's going to Stripe and not my agent.

s174
00:18:05.200 --> 00:18:06.560
So, okay.

s175
00:18:06.560 --> 00:18:11.800
So, now the agent has everything it needs to complete my purchase.

s176
00:18:11.800 --> 00:18:17.040
And it once again, asks me if I'm sure.

s177
00:18:17.040 --> 00:18:18.120
It confirms with me.

s178
00:18:18.120 --> 00:18:20.040
I say place my order.

s179
00:18:20.040 --> 00:18:23.520
And it comes back with a success message.

s180
00:18:23.520 --> 00:18:32.920
And because I chose the express shipping, I get my headphones the next day, and they're there in my studio at home.

s181
00:18:33.240 --> 00:18:42.000
So, if you want to learn more about agent to commerce, uh we've got lots of videos on the Stripe Developers YouTube channel.

s182
00:18:42.000 --> 00:18:51.480
And uh ton of blog posts that go into even more detail uh on stripe.dev, and I'll be right outside to answer any questions.

s183
00:18:51.480 --> 00:18:53.720
Thank you.

s184
00:19:08.228 --> 00:19:10.228
[music]
