Prática de Shadowing: Build a proactive agent workflow with Claude Code - Aprenda a falar inglês com vídeo

Criando lição...
1
Hello everyone, how are you?
2
Good.
3
Okay, amazing.
4
Welcome to the last workshop session of the day.
5
I hope you have all enjoyed the very first day of Code with Claude.
6
My name is Maya.
7
I'm a member of our Applied AI team here at Anthropic.
8
What that means is I spend about half my time developing our own first -party products
9
and features and the other half of my time helping customers develop their very own products, features, agents on top of our models.
10
Today, I'm here to talk to you about how to build a proactive agent workflow with Claude Code.
11
Can I get a show of hands?
12
Who has used our routines feature inside of Claude Code?
13
All right.
14
Some folks over here.
15
Awesome.
16
Awesome.
17
That's what I'm going to be talking about today.
18
Okay.
19
So, first off, a question for the group here.
20
Who has tried to run Claude Code on a cron?
21
Can I get a show of hands?
22
Folks, put your hands up high.
23
Awesome.
24
Awesome.
25
Now, keep your hands up if you've enjoyed building all of that infra and maintaining that job.
26
All right.
27
We have one guy back there.
28
We have one guy.
29
Thank you.
30
Thank you for your effort.
31
Thank you for your work.
32
We felt similar pain internally at Anthropic as we tried to develop proactive agents that run on Claude code,
33
and we decided to do something about it.
34
So, we believe that coding agents shouldn't wait for you to press enter to get started.
35
Right now, Claude Code is a really powerful coding tool, but we want to take Claude Code and turn it into a really powerful coding teammate.
36
A teammate notices when something breaks and does something about it.
37
Right now, a tool waits for you to enter your prompt and actually press enter.
38
So, the goal of today's presentation is to talk about how
39
we have created this feature called Routines to take Cloud Code from a tool today into the teammate of tomorrow.
40
So today, we'll be talking about four things.
41
I'll go through some of the challenges that you folks have felt building proactive agents today.
42
I'll go through this new feature inside of Cloud Code called Routines.
43
We'll go through a real example about how we use routines internally at Anthropic to automate documentation creation.
44
And then finally, we'll talk about applying routines to your own workflows.
45
So I want to talk first through the challenges with building proactive agents today.
46
We all know it's doable.
47
But I want to talk about what's a little bit cumbersome with this.
48
The first thing that's a little bit difficult with building proactive agents today is deciding where these agents should run.
49
You probably don't want them running on your local machine because if you close your laptop or your laptop dies, your agent session is done.
50
What that means is you'll need to manage things like hosting, data persistence, and authentication.
51
Basically, you'll need to build a whole infrastructure stack outside of your prompts, which is doable, But it's a lot of work and there's a lot of boilerplate code there.
52
The next thing you'll need to do is figure out when to actually kick off these sessions and trigger these agents.
53
Again, you can build things and build on top of cron
54
or you can do things like posts to end points that you have to spin up.
55
But again, there's a lot of info that you need to build yourself here.
56
Finally, the challenge with building proactive agents today is sometimes you want to be a human in the loop, but other times you want to be a human out of the loop with these agents.
57
Right now, when you kick off a headless Claude Code session, it's often hard to figure out what your agent is actually doing in real time.
58
There's no way to watch, steer, bound, or even resume your agent session.
59
It's difficult to do that.
60
So, we wanted to address each of these three issues and build routines.
61
Routines is a brand new feature inside of Cloud Code.
62
It's an automation where you can kick off a remote Cloud Code session by only defining the prompt, what repos you want to connect it to,
63
what connectors it has available to work with, and a trigger.
64
Cloud Code handles the rest.
65
So, there were three kind of main things we were thinking about as we went ahead
66
and developed this routines feature inside of Cloud Code.
67
The first thing is that we We wanted these agents to be always available.
68
These agents, these routines run on cloud code's managed infrastructure, and what's nice with that is that we deal with the hosting,
69
the session state, and the connector auth for you.
70
Nothing depends on your laptop being opened, and we deal with all of the cloud stuff for you, which I think is quite nice.
71
The next thing is we want these agents to be able to work proactively with customizable triggers.
72
You might want to kick them off on a time -based schedule or you might want to work event -based.
73
We have the ability to work natively with GitHub events as well as your own custom events
74
that you can post to webhooks and endpoints with the event payload as context.
75
Finally, and the last point that I think is really nice is
76
that these Claude code sessions that get launched with these routines
77
are interactive and steerable as if you were launching cloud code in the terminal.
78
Every routine is really just a cloud code session under the hood that you can open, you can watch, follow up on,
79
steer, and resume from web, CLI, and desktop.
80
And so, I want to walk you guys through a real use case that we use here at Anthropic internally.
81
So, the question for us and for a member of our engineering team is, how can we automate docs creation with routines?
82
So just to add a little bit of data behind this, weekly PRs for Cloud Code have gone up 200 % since the beginning of the new year.
83
This has been super awesome for our Cloud Code engineering team.
84
Their productivity is insane.
85
This has been really awesome for you folks because you get new features inside of Cloud Code very, very quickly.
86
The one person that this has not been
87
so awesome for is the one engineer responsible for maintaining our documentation across Cloud Code and the Agent SDK.
88
And so, when Routines launched, she was a super big fan and early adopter.
89
And I want to walk you through how she set up
90
a couple of routines to help automate documentation creation for Cloud Code in our Cloud Agent SDK.
91
So, on my side here, I have the terminal open, and I encourage you all to open your terminal and launch Cloud Code.
92
And inside of the terminal here, I'm able to type what we see on the screen here, slash schedule, and actually type in something that Sarah,
93
our documentation queen, has done to actually set up this routine.
94
So, she went and typed in Once a week, please review all the new changes merged to main against our documentation repo
95
and create a PR to update docs if you see any changes.
96
I encourage you folks to think right now.
97
What are some tests that you do every day that would help if they could run on a schedule?
98
Or if Claude Code could actually initiate these sessions for you?
99
I encourage you to think about that that.
100
After kicking this off inside of Claude code, Claude comes back and prompts me with a couple questions.
101
It might ask, hey, Maya, what time every week do you want me to actually kick this off?
102
Or once I create a PR, do you want me to notify you in any way, maybe ping you on Slack?
103
And once I answer these questions, Claude actually goes ahead and creates a routine that we'll view in a little bit inside of Claude code on the web.
104
But first, I want to walk through the three main decisions you'll need to make as you create any routine.
105
The first decision is you'll need to figure out when your routine should trigger.
106
What's actually the event or is there a certain cadence that you want this to run?
107
The second decision is what context or what information does Claude need to have to actually be successful here?
108
Do you need access to certain docs or does Claude need access to certain tools to ping you?
109
Finally, the last thing to think about is how do you actually steer Claude in the session to keep it honest?
110
How do you guide Claude to the output that you want?
111
And so we'll dive into each one of these and I'll talk through how Sarah, a member of our team, actually does this to automate documentation creation.
112
So, the first one is the trigger.
113
When should this event actually run?
114
So, inside of routines, there's basically two ways to do this.
115
You can have things kick off on a schedule on a time -based trigger.
116
For that earlier example I showed you, this is how we do a weekly review of differences between
117
our source code for Cloud Code as well as our documentation repo.
118
You can also have routines kick off on an event -based cadence.
119
So, maybe every time a release is cut, you can diff the release branch against the docs and see
120
if there's any new features that you'll need to spin up PRs for in our documentation repo.
121
Or maybe your engineer is actually deploying changes and creating PRs might tag their changes.
122
Maybe this is a new feature.
123
They could tag it with a label that says need docs.
124
And you could actually kick off Claude code sessions any time one of these labeled PRs get merged.
125
The next thing you'll need to think about is context.
126
What does your agent actually need to know to be successful?
127
Likely, you'll need to give it access to either one or more code -based repos.
128
So, for this docs example, we need to give Claude access to not only our Claude code source code to figure out what new changes exist there, but also our docs repo,
129
right, for Claude to actually create new PRs there.
130
Next, you might want to provide additional context to these sessions.
131
Maybe for this one example, I want Claude to have access to all of our existing marketing briefs.
132
Maybe I want Claude to use similar language and verbiage that we use in other marketing materials externally and anthropic.
133
So maybe all of this lives inside of Google Drive, and I'll want to give Claude access to these files during the session, so I'll hook up the drive connector.
134
Or maybe any time Claude creates a PR, I'll actually want it to ping me on Slack, so I'll give it access to the Slack connector.
135
It's important to think about this as you're setting up the routine, because Because whatever context Claude has,
136
that's the ceiling of how successful Claude will be.
137
Finally, the last thing to think about here is steerability.
138
How do we actually ensure the quality of Claude's outputs?
139
There are a couple ways to do this.
140
One thing that I think is quite interesting is to actually invest in agent -on -agent review.
141
If folks have actually designed multi -agent systems here and have heard of the generator critiquer pattern, this is something that we borrowed here.
142
You can actually set up one routine to go ahead and create docs PRs, and you can set up another routine that maybe triggers on
143
that PR's creation to actually go ahead and leave comments on the PR before a human actually gets to it.
144
Another option we had emphasized, it's nice to have a human out of the loop, but sometimes you actually do need to monitor these Cloud Code sessions and maybe nudge Cloud in a different direction.
145
What's really nice and what I'll show you in a second is
146
that you can actually open Cloud Code on the web
147
and you can view what's happening inside of a live session as if you would working with Cloud in the terminal.
148
You can ask it questions mid -session.
149
You can push it in another another direction.
150
You can also resume a past routine or a past session and continue the conversation.
151
Finally, the last thing we do and what I think is quite obvious is that we verify Claude's outputs.
152
For this documentation example, we actually render the page that or the documentation page
153
that Claude has changed and created and we confirm those outputs are what we expect.
154
And so, now, I'll jump back into that initial routine that we've kicked off here in this demo.
155
And we'll jump to the demo slides.
156
Awesome.
157
And so, we can see right now I'm in Claude .ai, and I can go over to this left side panel and actually click on this code button.
158
And I can jump into Routines on this left -hand side.
159
And I can actually click click on this routine that I had created earlier.
160
On the left -hand side here, you can see that it's connected to two repositories,
161
our mocked up cloud code source code as well as our cloud code documentation.
162
You can see that this runs every Monday at 10 a .m and it's connected to GitHub as well as Slack.
163
These instructions here on the right -hand side Claude generated for me based on the initial prompt
164
that I pasted in and the questions that I answered.
165
We can see here that this is a weekly documentation sync for our Claude code fork.
166
And I can actually go ahead and click on a session here.
167
And I can see that these initial instructions are what gets pasted in for the very beginning of this Claude Code session.
168
We can see that Claude has read these instructions and started by looking at the source code repository to see any changes,
169
any recent PRs that have emerged, looked at our change log, and compared that to what's inside of the documentation repo.
170
We can see Claude's actually found some changes here and gone ahead and opened a PR for me.
171
This is one example where you can kick off a routine on a schedule.
172
Now, I want to show you another example where we can actually kick off a routine based on a GitHub event.
173
So here I've actually created a new routine, and I've already filled some of this in.
174
I want to make another documentation automation routine.
175
But this time I want this to actually trigger every time I create a new GitHub issue.
176
So, I pasted in some instructions here basically to investigate the issue that this session triggers on, figure out if it's related to a documentation gap,
177
and then if it is and if you believe that this is a gap, go ahead, open a PR and actually ping me in this channel.
178
So, I've gone ahead and connected our cloud code documentation repo as well as our source code again, and I want to show you how I actually set up this trigger.
179
Like I had mentioned before, there's two different types of triggers, schedule -based and event -based.
180
And within event -based triggers, we have native GitHub events supported here, as well as the ability to trigger from your own code by sending a post request.
181
So, here, I'll create a GitHub event trigger
182
and trigger on issue opens any time I open an issue inside of this cloud code documentation repo.
183
And I want this connected to Slack so I can send me a ping any time I make a PR, as well as our GitHub NCP.
184
So, I will go ahead and create this here.
185
And now, let's make sure that this is working.
186
So, I have a new issue open here that I'm about to create inside of our Cloud Code docs repo.
187
So, I happen to know that there are a few tools missing from docs in this new version.
188
So, I'm going to go ahead ahead and actually create this.
189
So I can see here that I've gone ahead and created that.
190
And now let's refresh this page.
191
And we can see actually that a new run has gotten picked up here.
192
We can see that these initial instructions are the very first prompt.
193
And we can see that this additional context from this issue were passed in as well.
194
I happen to know that I actually already have another PR open for this.
195
So, let me just guide Claude to stop this session.
196
I've already made these changes.
197
And we can see here the ability to actually steer Claude in real time after routine gets kicked off.
198
Awesome.
199
Now let's come back and talk about the different ways that we can use routines to actually automate your challenges as developers.
200
I want to talk through a couple ways
201
that we could turn common software engineering or developer challenges into routines with quad code.
202
The first one I want to talk through is this deploy verifier.
203
Maybe you have recently just deployed changes to a service
204
and you want make sure that this service is healthy and you shouldn't roll back these changes.
205
I want to think about this in three ways.
206
First, what should my trigger be here?
207
Second, what context is important to provide to Claude in this routine?
208
And lastly, how do I plan to actually interact or steer this routine to keep Claude honest?
209
I happen to know that my CD pipeline can post after every deploy, so this seems like a pretty good trigger to actually kick off this routine on.
210
I can actually post to this webhook that we support inside of routines, and this can actually kick off my Cloud Code session.
211
In terms of what context I think is important to provide Cloud here, I can think of a couple things.
212
One, it's probably nice to give Cloud access to the source code for the service that we recently deployed on.
213
Next, it's probably important to give Claude access to monitoring tools.
214
Maybe that's Datadog, maybe that's Grafana.
215
I don't know what you folks use, but likely helpful to give Claude access to these monitoring tools.
216
And maybe if something goes down, I want Claude to alert me.
217
I want Claude to ping me on Slack or send me an email
218
or maybe even send me a text using Twilio or something like that.
219
These are some of the connectors or the tools that I would give Claude access to inside of this session.
220
In terms of keeping Claude honest or actually steering my session, maybe I'd start by having Claude run an investigation for me
221
and giving me an eventual no -go or no -go decision to actually roll back this change.
222
I could jump into Claude code on the web and actually view and read Claude's analysis for this session.
223
Then maybe I can continue to work with Claude
224
if I actually think that this should be rolled back and actually use Claude to help me roll back a change.
225
Maybe eventually as I watch Claude work more and more and trust its decisions, I can let Claude roll back the change itself
226
if based on the monitoring data it has access to if I deem that that's the right decision.
227
There are other challenges, like maybe you want to build an on -call investigator
228
or maybe you're actually a PM and your job is to go through a lot of issues inside of your backlog.
229
Maybe that's GitHub issues.
230
Maybe that's posts inside of a Slack channel.
231
And maybe you want to kick off a weekly job that actually reads through all of these issues.
232
Maybe it's kicked off on a time -based trigger.
233
You give it access to GitHub and Slack and wherever your issues live.
234
And you Claude to actually help you prioritize and maybe open PRs for the most important issues.
235
Okay.
236
My final takeaway is here.
237
Proactive agents beat reactive agents.
238
We want Claude to go from a tool to a teammate.
239
You can move from an agent that is waiting for you to actually press enter
240
and create a PR to an agent that reacts to problems and opens a PR itself.
241
We built routines so you don't have to focus on maintaining all of this infra, but instead you can actually concentrate on your domain and process expertise.
242
This is what routines handle for you.
243
And finally, I encourage you to get started with routines today.
244
You're a single slash schedule command inside of Claude code, away from creating your very first routine.
245
Awesome.
246
Thanks so much.
247
We'll be right back.

Objetivos de fala para este vídeo

Este vídeo é perfeito para quem quer alcançar um marco de fluência: a capacidade de seguir e reproduzir conversações técnicas em inglês com clareza e confiança. Ele ajuda a treinar a escuta ativa e a pronúncia, especialmente em contextos profissionais, como discussões sobre ferramentas de IA e fluxos de trabalho. Ideal para quem quer aprender inglês com vídeos de forma prática e direta!

Banco de frases reutilizáveis

  • "Can I get a show of hands?" (Posso pedir que levantem as mãos?)
  • "We felt similar pain internally" (Nós sentimos uma dor similar internamente)
  • "turn it into a really powerful coding teammate" (transformá - lo em um colega de programação realmente poderoso)
  • "the goal of today's presentation is to talk about" (o objetivo da apresentação de hoje é falar sobre)
  • "What that means is" (O que isso significa é)

Corrija seus pontos fracos

Um dos maiores desafios aqui é a pronúncia de palavras técnicas (como "proactive", "workflow", "infra") e a ritmo das frases longas. O vídeo é excelente para praticar o shadowing em inglês (técnica de repetir imediatamente o que se ouve). Teste o "shadowspeak": reproduza pequenos trechos da fala da Maya, imitando sua entonação e pausas. Isso ajuda a melhorar a pronúncia em inglês e a fluência de forma rápida. Lembre - se: a chave é a repetição! Mesmo frases curtas, quando praticadas com atenção, trazem grandes resultados.

O que é a Técnica de Shadowing?

Shadowing é uma técnica de aprendizado de idiomas com base científica, originalmente desenvolvida para o treinamento de intérpretes profissionais. O método é simples, mas poderoso: você ouve áudio em inglês nativo e repete imediatamente em voz alta — como uma sombra seguindo o falante com 1-2 segundos de atraso. Pesquisas mostram melhora significativa na precisão da pronúncia, entonação, ritmo, sons conectados, compreensão auditiva e fluência na fala.

Técnica de shadowing: leia o guia completo passo a passo →