1
00:00:00,200 --> 00:00:00,760
Okay.

2
00:00:01,280 --> 00:00:02,080
Moment of truth.

3
00:00:02,080 --> 00:00:02,720
I'm going to run it.

4
00:00:02,720 --> 00:00:04,880
And while it's running, I will talk through what it's doing.

5
00:00:04,920 --> 00:00:05,320
Hang on.

6
00:00:05,360 --> 00:00:06,080
Off it goes.

7
00:00:06,400 --> 00:00:10,640
So we have a new sales manager.

8
00:00:10,640 --> 00:00:14,600
We say you are the sales manager working for comply.

9
00:00:14,760 --> 00:00:17,600
You use the tools given to you to generate cold sales emails.

10
00:00:17,640 --> 00:00:18,760
Never generate one yourself.

11
00:00:18,800 --> 00:00:19,840
Always use the tools.

12
00:00:19,840 --> 00:00:24,440
You try all three sales email tools at least once before choosing the best one.

13
00:00:24,440 --> 00:00:26,560
You can use all the tools multiple times.

14
00:00:26,560 --> 00:00:31,800
If you're not satisfied with the results from the first try, you select the single best email using

15
00:00:31,800 --> 00:00:38,120
your own judgment of which email will be most effective, and then after picking it, you hand off to

16
00:00:38,160 --> 00:00:42,200
the email manager agent to format and send the email.

17
00:00:42,400 --> 00:00:47,320
Now again, I'm really spelling it out here, and you shouldn't need to be that prescriptive because

18
00:00:47,320 --> 00:00:49,640
the hand off description was there.

19
00:00:49,640 --> 00:00:51,880
But it helps to be to be precise.

20
00:00:51,920 --> 00:00:56,600
And particularly as these things get more complex, if you want it to stay on track and to be reliable,

21
00:00:56,600 --> 00:00:59,080
then this is a good practice to do.

22
00:00:59,440 --> 00:01:01,720
So then we create the agent.

23
00:01:01,960 --> 00:01:03,120
We it's a sales manager.

24
00:01:03,120 --> 00:01:04,480
We give it these instructions.

25
00:01:04,480 --> 00:01:08,470
We pass in both the tools and the handoffs.

26
00:01:08,470 --> 00:01:10,310
This is the crux of this.

27
00:01:10,510 --> 00:01:15,430
This is how we separate out that the tools, which is where we it's like a request response from the

28
00:01:15,470 --> 00:01:21,830
handoffs, which is a delegation control is passed across to take care of the rest of the work.

29
00:01:22,230 --> 00:01:24,910
And that is our message.

30
00:01:25,190 --> 00:01:30,630
And we put a trace around it, automated SDR and we give it a run.

31
00:01:30,630 --> 00:01:34,510
And it took about a minute and let's see what came back.

32
00:01:34,990 --> 00:01:39,790
This is the result and it's picked a very short one in the end.

33
00:01:39,790 --> 00:01:42,750
You remember one of them is a very concise email writer.

34
00:01:42,750 --> 00:01:44,390
It does indeed begin, dear CEO.

35
00:01:44,390 --> 00:01:46,270
And it ends, Alice, as we asked for.

36
00:01:46,510 --> 00:01:51,830
And it's given a nice, short, sharp, AI driven solutions that can optimize your business processes.

37
00:01:52,150 --> 00:01:55,230
And so it's nice and crisp.

38
00:01:55,710 --> 00:01:56,710
There we go.

39
00:01:57,510 --> 00:02:01,430
And importantly, we now have to go and look at the trace.

40
00:02:01,630 --> 00:02:04,790
So the trace here it is automated SDR.

41
00:02:04,830 --> 00:02:06,270
You can see how long it took.

42
00:02:06,390 --> 00:02:08,350
It used nine tools.

43
00:02:08,510 --> 00:02:09,750
Let's go and have a look.

44
00:02:09,870 --> 00:02:14,460
So it came in and it used sales agent one and two and three.

45
00:02:14,620 --> 00:02:15,740
And then look at what happened.

46
00:02:15,740 --> 00:02:19,660
It went back and used sales one, two and three a second time.

47
00:02:19,820 --> 00:02:20,540
Load more.

48
00:02:21,740 --> 00:02:26,100
And then this was the handoff you can see here shown.

49
00:02:26,340 --> 00:02:28,500
Then it goes to the email manager.

50
00:02:28,700 --> 00:02:34,460
And then that goes to the subject writer followed by the converter followed by the send email.

51
00:02:34,460 --> 00:02:37,460
And you'll see the control does not then come back.

52
00:02:37,780 --> 00:02:40,580
So you're seeing everything in action here.

53
00:02:40,580 --> 00:02:43,740
The sales manager that's able to to handle things.

54
00:02:43,740 --> 00:02:44,980
And it hands off here.

55
00:02:44,980 --> 00:02:51,180
And the email manager takes the rest of control for the rest of this blue timeline that you see highlighted

56
00:02:51,180 --> 00:02:51,780
in here.

57
00:02:51,780 --> 00:02:58,940
You can see the multiple calls to different agents and the handoff and the use of tools, both wrapping

58
00:02:58,940 --> 00:03:01,940
agents and just directly calling functions.

59
00:03:02,220 --> 00:03:10,540
And that is a satisfying conclusion to quite an interesting example of a genetic workflows and design

60
00:03:10,540 --> 00:03:11,180
patterns.

61
00:03:11,860 --> 00:03:12,380
Okay.

62
00:03:12,420 --> 00:03:19,810
Well, we covered a few of the constructs and concepts with OpenAI agents SDK, including tools and

63
00:03:19,810 --> 00:03:20,490
hand offs.

64
00:03:20,610 --> 00:03:24,650
And the most important thing that I want you to take on board is that it was simple.

65
00:03:24,770 --> 00:03:26,290
It's relatively lightweight.

66
00:03:26,330 --> 00:03:32,010
We we achieved something quite complex, quite advanced, and we did it all in a matter of a few minutes.

67
00:03:32,370 --> 00:03:36,690
Now, some exercises for you as of course, very important that you now come back and spend some time

68
00:03:36,690 --> 00:03:37,330
on this yourself.

69
00:03:37,330 --> 00:03:38,810
That is the best way to learn.

70
00:03:38,930 --> 00:03:43,650
So first of all, go through and identify the agentic design patterns that we used here.

71
00:03:44,090 --> 00:03:50,450
Now, there was a moment in this when we moved from from doing what anthropic would just describe as

72
00:03:50,450 --> 00:03:57,690
agent workflows to something that was really like agentic agents under their definition, although I

73
00:03:57,690 --> 00:03:59,650
think it's a little bit, a little bit hand-wavy.

74
00:03:59,650 --> 00:04:01,530
But still, there was a clear moment.

75
00:04:01,570 --> 00:04:02,530
Can you identify it?

76
00:04:02,570 --> 00:04:04,610
Can you spot what was the change?

77
00:04:04,650 --> 00:04:07,410
The small change that made that difference?

78
00:04:07,730 --> 00:04:10,290
And then try adding in more tools and more agents.

79
00:04:10,290 --> 00:04:11,490
This is a great way.

80
00:04:11,530 --> 00:04:12,970
This is so easy to extend.

81
00:04:12,970 --> 00:04:13,290
This.

82
00:04:13,330 --> 00:04:18,250
Obviously this is calling this an SDR was was maybe a bit of a stretch because it's really just a cold

83
00:04:18,250 --> 00:04:23,080
email writer, but it would be very easy to see how you could build this into something that's much

84
00:04:23,080 --> 00:04:29,640
more interactive and then a hard challenge for you, particularly if you've got some engineering experience.

85
00:04:29,920 --> 00:04:38,720
Figure out if you could turn this into something which is more of a longer living agent workflow, in

86
00:04:38,760 --> 00:04:45,840
that someone could reply to that email, and the agent would then be able to pick up and continue the

87
00:04:45,840 --> 00:04:46,640
conversation.

88
00:04:46,680 --> 00:04:51,040
Have an email based conversation about the company.

89
00:04:51,320 --> 00:04:56,160
Now the hard part about that is handling replies back from SendGrid that we'll need to do a little bit

90
00:04:56,160 --> 00:05:01,080
of research and understanding about things like webhooks and how that will work, and how you'd use

91
00:05:01,080 --> 00:05:06,240
that to trigger this processing, and how would you identify who you sent it to?

92
00:05:06,280 --> 00:05:11,680
So there's a fair amount of stuff in there, but it's engineering stuff rather than much genetic stuff.

93
00:05:11,680 --> 00:05:11,880
So.

94
00:05:11,880 --> 00:05:15,480
So you could be forgiven for skipping it if it doesn't appeal to you.

95
00:05:15,480 --> 00:05:20,680
But if it does, then, then that's a very interesting framework to put in place.

96
00:05:21,520 --> 00:05:26,160
And in terms of commercial applications, because you remember, I do always like to try and bring this

97
00:05:26,160 --> 00:05:28,870
back to how can you apply this to business?

98
00:05:29,110 --> 00:05:34,830
And hopefully I mean, obviously there's the fact that it could be literally a sales automation tool

99
00:05:34,830 --> 00:05:40,190
that could just be working to generate a bunch of different cold sales emails or email campaigns.

100
00:05:40,350 --> 00:05:46,030
And if you were to do this extra hard project, it could in fact be something that engages and continues

101
00:05:46,030 --> 00:05:47,070
the conversation.

102
00:05:47,070 --> 00:05:53,750
And generally, the point here is that you can really apply this to any end to end automation of these

103
00:05:53,750 --> 00:05:55,430
kinds of business processes.

104
00:05:55,430 --> 00:05:59,790
You can think of how you can apply this in this context of sales, but you can think of applying it

105
00:05:59,790 --> 00:06:01,310
to so many contexts.

106
00:06:01,350 --> 00:06:04,630
Imagine my day job at Nebula that involves recruitment.

107
00:06:04,910 --> 00:06:11,910
Imagine how applicable something like this is to that space as well, and many others.

108
00:06:12,070 --> 00:06:13,470
Think of a business area.

109
00:06:13,510 --> 00:06:20,510
Think of the kinds of activities that are done at scale with things like cold sales, outreach, and

110
00:06:20,510 --> 00:06:27,670
picture how this kind of approach agents collaborating with a level of autonomy and with use of tools

111
00:06:27,670 --> 00:06:32,710
and handoffs, can automate a complex business process.