WEBVTT

00:00.200 --> 00:00.800
Okay.

00:01.320 --> 00:02.080
Moment of truth.

00:02.080 --> 00:02.760
I'm going to run it.

00:02.760 --> 00:04.920
And while it's running, I will talk through what it's doing.

00:04.960 --> 00:05.320
Hang on.

00:05.360 --> 00:06.120
Off it goes.

00:06.440 --> 00:10.640
So we have a new sales manager.

00:10.640 --> 00:14.640
We say you are the sales manager working for comply.

00:14.800 --> 00:17.640
You use the tools given to you to generate cold sales emails.

00:17.680 --> 00:19.880
Never generate one yourself, but always use the tools.

00:19.880 --> 00:24.440
You try all three sales email tools at least once before choosing the best one.

00:24.440 --> 00:26.600
You can use all the tools multiple times.

00:26.600 --> 00:31.840
If you're not satisfied with the results from the first try, you select the single best email using

00:31.840 --> 00:38.160
your own judgment of which email will be most effective, and then after picking it, you hand off to

00:38.200 --> 00:42.240
the email manager agent to format and send the email.

00:42.440 --> 00:47.320
Now again, I'm really spelling it out here, and you shouldn't need to be that prescriptive because

00:47.320 --> 00:49.640
the hand off description was there.

00:49.640 --> 00:54.800
But it helps to be to be precise, and particularly as these things get more complex, if you want it

00:54.800 --> 00:59.120
to stay on track and to be reliable, then this is a good practice to do.

00:59.440 --> 01:01.760
So then we create the agent.

01:02.000 --> 01:03.160
We it's a sales manager.

01:03.160 --> 01:04.520
We give it these instructions.

01:04.520 --> 01:08.470
We pass in both the tools and the handoffs.

01:08.470 --> 01:10.350
This is the crux of this.

01:10.550 --> 01:16.070
This is how we separate out the tools, which is where we is like a request response from the handoffs,

01:16.070 --> 01:17.630
which is a delegation.

01:17.630 --> 01:21.870
Control is passed across to take care of the rest of the work.

01:22.270 --> 01:24.950
And that is our message.

01:25.230 --> 01:30.630
And we put a trace around it, automated SDR and we give it a run.

01:30.630 --> 01:34.550
And it took about a minute and let's see what came back.

01:35.030 --> 01:39.830
This is the result and it's picked a very short one in the end.

01:39.830 --> 01:42.790
You remember one of them is a very concise email writer.

01:42.790 --> 01:44.430
It does indeed begin, dear CEO.

01:44.430 --> 01:46.310
And it ends, Alice, as we asked for.

01:46.550 --> 01:51.870
And it's given a nice, short, sharp, AI driven solutions that can optimize your business processes.

01:52.190 --> 01:55.270
And so it's nice and crisp.

01:55.750 --> 01:56.750
There we go.

01:57.550 --> 02:01.470
And importantly, we now have to go and look at the trace.

02:01.670 --> 02:04.790
So the trace here it is automated SDR.

02:04.830 --> 02:06.310
You can see how long it took.

02:06.430 --> 02:08.470
It used nine tools.

02:08.510 --> 02:09.790
Let's go and have a look.

02:09.870 --> 02:15.780
So it came in and it used sales agent one and two and three and then look at what happened.

02:15.780 --> 02:19.660
It went back and used sales one, two and three a second time.

02:19.860 --> 02:20.580
Load more.

02:21.780 --> 02:26.140
And then this was the handoff you can see here shown.

02:26.380 --> 02:28.540
Then it goes to the email manager.

02:28.740 --> 02:34.500
And then that goes to the subject writer followed by the converter followed by the send email.

02:34.500 --> 02:37.460
And you'll see that control does not then come back.

02:37.780 --> 02:40.540
So you're seeing everything in action here.

02:40.620 --> 02:45.020
The sales manager that's able to to handle things and it hands off here.

02:45.020 --> 02:51.220
And the email manager takes the rest of control for the rest of this blue timeline that you see highlighted

02:51.220 --> 02:51.820
in here.

02:51.820 --> 02:58.980
You can see the multiple calls to different agents and the handoff and the use of tools, both wrapping

02:58.980 --> 03:01.980
agents and just directly calling functions.

03:02.220 --> 03:10.580
And that is a satisfying conclusion to quite an interesting example of agentic workflows and design

03:10.580 --> 03:11.220
patterns.

03:11.900 --> 03:12.420
Okay.

03:12.460 --> 03:19.850
Well, we covered a few of the constructs and concepts with OpenAI agents SDK, including tools and

03:19.850 --> 03:20.490
handoffs.

03:20.610 --> 03:24.650
And the most important thing that I want you to take on board is that it was simple.

03:24.770 --> 03:26.290
It's relatively lightweight.

03:26.330 --> 03:32.050
We we achieved something quite complex, quite advanced, and we did it all in a matter of a few minutes.

03:32.410 --> 03:36.730
Now, some exercises for you as of course, very important that you now come back and spend some time

03:36.730 --> 03:37.330
on this yourself.

03:37.330 --> 03:38.850
That is the best way to learn.

03:38.930 --> 03:43.650
So first of all, go through and identify the agentic design patterns that we used here.

03:44.130 --> 03:50.490
Now, there was a moment in this when we moved from from doing what anthropic would just describe as

03:50.490 --> 03:57.730
agent workflows to something that was really like agentic agents under their definition, although I

03:57.730 --> 04:01.570
think it's a little bit, a little bit hand-wavy, but still, there was a clear moment.

04:01.610 --> 04:02.530
Can you identify it?

04:02.570 --> 04:07.450
Can you spot what was the change, the small change that made that difference?

04:07.770 --> 04:10.290
And then try adding in more tools and more agents.

04:10.290 --> 04:11.570
This is a great way.

04:11.570 --> 04:13.330
This is so easy to extend this.

04:13.370 --> 04:18.290
Obviously this is calling this an SDR was was maybe a bit of a stretch because it's really just a cold

04:18.290 --> 04:23.080
email writer, but it would be very easy to see how you could build this into something that's much

04:23.080 --> 04:24.000
more interactive.

04:24.520 --> 04:29.680
And then a hard challenge for you, particularly if you've got some engineering experience.

04:29.960 --> 04:38.760
Figure out if you could turn this into something which is more of a longer living agent workflow, in

04:38.800 --> 04:45.880
that someone could reply to that email, and the agent would then be able to pick up and continue the

04:45.880 --> 04:46.680
conversation.

04:46.720 --> 04:51.080
Have an email based conversation about the company.

04:51.320 --> 04:56.200
Now the hard part about that is handling replies back from SendGrid that we'll need to do a little bit

04:56.200 --> 05:01.080
of research and understanding about things like webhooks and how that will work, and how you'd use

05:01.080 --> 05:06.240
that to trigger this processing, and how would you identify who you sent it to?

05:06.280 --> 05:11.720
So there's a fair amount of stuff in there, but it's engineering stuff rather than much agentic stuff.

05:11.720 --> 05:11.920
So.

05:11.920 --> 05:15.520
So you could be forgiven for skipping it if it doesn't appeal to you.

05:15.520 --> 05:20.720
But if it does, then then that's a very interesting framework to put in place.

05:21.520 --> 05:26.160
And in terms of commercial applications, because you remember, I do always like to try and bring this

05:26.160 --> 05:28.870
back to how can you apply this to business?

05:29.110 --> 05:34.830
And hopefully I mean, obviously there's the fact that it could be literally a sales automation tool

05:34.830 --> 05:40.230
that could just be working to generate a bunch of different cold sales emails or email campaigns.

05:40.390 --> 05:46.030
And if you were to do this extra hard project, it could in fact be something that engages and continues

05:46.030 --> 05:47.070
the conversation.

05:47.070 --> 05:53.790
And generally, the point here is that you can really apply this to any end to end automation of these

05:53.790 --> 05:55.430
kinds of business processes.

05:55.430 --> 05:59.790
You can think of how you can apply this in this context of sales, but you can think of applying it

05:59.790 --> 06:01.350
to so many contexts.

06:01.390 --> 06:04.670
Imagine my day job at Nebula that involves recruitment.

06:04.910 --> 06:11.950
Imagine how applicable something like this is to that space as well, and many others.

06:12.070 --> 06:13.470
Think of a business area.

06:13.510 --> 06:19.870
Think of the kinds of activities that are done at scale with things like cold sales outreach.

06:19.990 --> 06:27.310
And picture how this kind of approach agents collaborating with a level of autonomy and with use of

06:27.350 --> 06:32.710
tools and handoffs, can automate a complex business process.
