Come creare un'azienda agentica con gli Agenti AI di Claude Code 😎 — Transcript
Full transcript
- 0:00Alright, let's get started. Today, a
- 0:02little lesson on agentic work: how to
- 0:04work with agents, how to build a small
- 0:06company where most tasks are delegated
- 0:09to an AI agent. To do this, I've
- 0:11brought along the great Pietro
- 0:13Virgilito. Are you there, Pietro? Can
- 0:15you hear me?
- 0:16Hi Dario, I'm here, I can hear you.
- 0:18Good morning. Hello everyone. Ok.
- 0:20Pietro, for those who don't know, works
- 0:22in cybersecurity, has worked with the
- 0:24Senate and other institutions, and
- 0:26he’s here to do what I can't: explain
- 0:28to you, from a technical standpoint,
- 0:30how best to use agents. I use agents
- 0:33every day in my work, but I said we
- 0:34need someone better prepared than me to
- 0:36answer any potential objections. Today
- 0:41Pietro, tell me if I'm wrong, we've
- 0:42brought along a small example of what
- 0:44could be the starting structure for a
- 0:46company that wants to operate mostly
- 0:48through agents, right?
- 0:51Exactly. Meaning, we thought about how
- 0:54to propose a basic agentic architecture
- 0:56to help people understand what an
- 0:58agentic company is, how it can ideally
- 1:00be implemented, what the components are
- 1:02, and what the workflows look like.
- 1:06Obviously, this is an example and not a
- 1:09full-fledged production system, but it
- 1:11helps to understand how "agentization"
- 1:13can be viewed for companies.
- 1:17Also because last time we started by
- 1:19saying that the most important thing,
- 1:21perhaps, when working with agents is
- 1:22the information architecture you end up
- 1:24creating. Because in the end,
- 1:29everything we build is nothing more
- 1:31than a set of rules, principles, and
- 1:32content that, by putting them together,
- 1:34puts existing agents—it's not like
- 1:36we're building them—in the position
- 1:38to interpret the role they need to play
- 1:40. Tell me if that's correct.
- 1:44Absolutely, yes. Meaning that making
- 1:49the effort to determine what the
- 1:51business processes are, what the
- 1:53business data is, where it resides, how
- 1:55it’s manipulated, and therefore how
- 1:57it's possible to automate or "agentize"
- 1:59parts of the business is fundamental.
- 2:05So it's a pre-analysis phase without
- 2:07which agentization doesn't succeed.
- 2:10Exactly, it's not a plug-and-play
- 2:12system. Agentization is a system that
- 2:14comes after an analysis, a company
- 2:17self-analysis to understand
- 2:18architecture and processes exactly.
- 2:21Great. I'll go ahead and add your
- 2:23screen to the stream so we can see for
- 2:25a moment what we're working on. Ok. You
- 2:30should know that Pietro and I are
- 2:31developing a product idea, a project, a
- 2:33startup that is based mostly on agentic
- 2:35work. So, in another video that I might
- 2:39link in the description, we talked
- 2:40about how we used over 150 agents to
- 2:42get our product into development,
- 2:44because we didn't have the money to
- 2:46afford hiring 10 full-time developers.
- 2:50And so, a large part of the work we do
- 2:52on this product today is performed
- 2:54through agents; and the first thing
- 2:55that was done by Pietro and Frankie,
- 2:57who are the people managing the work
- 2:59and these agents, was to build the
- 3:01information system that would allow the
- 3:02agents to become operational and
- 3:04develop the product. What we are seeing
- 3:08now is our little information system
- 3:09for the company case study we’ve
- 3:11brought today. If you want to tell us
- 3:13something, Pietro. Yes, absolutely. An
- 3:17example we thought of doing was the
- 3:19following, that is, trying to imagine
- 3:21the agentization of a small software
- 3:23house digital agency that needs to
- 3:25produce, to develop websites on behalf
- 3:27of clients who ask them exactly for
- 3:29this. So, develop a website for me.
- 3:35Since this operation, uh, the operation
- 3:38of creating a quote, of analysis,
- 3:40assessment, and creation of the quote,
- 3:42usually involves various actors,
- 3:44various processes, company data, time,
- 3:47and effort. Uh, we thought precisely of
- 3:54trying to agentize it, uh, to, let's
- 3:56say, create an example that was, uh, as
- 3:58clear as possible and show how each of
- 4:00these components of this, of this
- 4:02agentic company, can be created, can be
- 4:04integrated with the general system and,
- 4:06in short, how it all works a bit.
- 4:11Then, obviously, during the course of
- 4:12this video, we will address the various
- 4:14objections, like, "uh, but how reliable
- 4:16are the agents?""Uh, but then I have to
- 4:19spend more time reviewing the mistakes
- 4:20they've made, uh, but how can I trust
- 4:22them?" and so on, right? What is the
- 4:25starting context here? What any
- 4:28entrepreneur or any company should do,
- 4:30which is to go and analyze their own
- 4:31business or the business they are going
- 4:33to create and imagine what all the
- 4:35flows will be that will be part, right,
- 4:36of their business that will contribute
- 4:38to the construction of the
- 4:39entrepreneurial project. So, if, for
- 4:44example, I am an entrepreneur at the
- 4:45head of an agency, I will have a
- 4:47process that concerns, for example, the
- 4:49development of offers to send to
- 4:51clients in response to a quote; maybe
- 4:53then I will have the website
- 4:54construction process, together with all
- 4:56the other processes that go to build
- 4:58the sum of all the work that an agency
- 5:00carries out. Today, what we are seeing
- 5:03is a small part of this work. So we are
- 5:07analyzing perhaps the core process of
- 5:09client acquisition—or rather, not
- 5:11even client acquisition, but client
- 5:13management: a request arrives from a
- 5:15client who has an idea for a website
- 5:17they want to build, and I, the agency,
- 5:19need to be able to provide my agents
- 5:21with a development process for an offer
- 5:23that will then be sent to the final
- 5:25client, right? Tell us a bit more,
- 5:29Pietro. Perfect. Exactly. So, let's say
- 5:31here—I don't know if you can see this
- 5:33—this is the diagram of the workflow
- 5:35we've imagined. Essentially, we start
- 5:41with a client request, which in this
- 5:43case is just a simple text file
- 5:44requesting the development of a website
- 5:46. Okay? Eh,
- 5:51so here we’re imagining the client
- 5:53sending us an email, right? Exactly,
- 5:55look, if you want, we can look directly
- 5:57at the example I created. Okay, let's
- 6:01imagine this message. Okay. Website for
- 6:05our tattoo studio. Good morning, I am
- 6:07Giulia Ferri from the Ago di Inchiostro
- 6:09studio. There are two of us, blah blah
- 6:11blah. People have been asking for our
- 6:13site for years, we can't put it off
- 6:15anymore. We’d like an introduction
- 6:17page for the studio, the portfolio, et
- 6:19cetera, et cetera. They provide
- 6:21additional information. Photos aren't a
- 6:23problem, we already have plenty. Two
- 6:27fundamental things: online booking for
- 6:28consultations and a flash design list
- 6:30that we want to update ourselves
- 6:32whenever the designs change. If
- 6:36possible, we’d also like to sell our
- 6:38gift cards, uh, and then there's also a
- 6:40note.
- 6:43Come on, honest,
- 6:45honest.
- 6:46Um, one last important thing: on August
- 6:4829th and 30th, we’ll be at the
- 6:50Bologna Convention. We’d like to have
- 6:52the site online by then.
- 6:53Well, € 3,000 is not enough.
- 6:56€ 3,000 is not enough. Exactly.
- 6:59There’s also the surplus for the
- 7:00urgency, for sure, but let's say it's a
- 7:03request
- 7:04it's a request, exactly. That arrives
- 7:07via email or through a contact form,
- 7:09perhaps following an ad campaign, in
- 7:15short, and it is usually received by a
- 7:17person, read, and handled. Um, this—
- 7:23this is the entry point, okay, that
- 7:25reaches our system and that, in our
- 7:27agentic system, will be passed to an
- 7:30analyst who
- 7:32So the analyst is the first agent, is
- 7:34the first agent that comes into play
- 7:36here.
- 7:36Yes, let's say it's the second because
- 7:38there is a parent orchestrator agent
- 7:40that manages them all. Okay? So, let's
- 7:42say, there is the parent agent that, uh
- 7:45, as a first
- 7:46manages the entire workflow,
- 7:49manages the entire flow and, first of
- 7:52all, it will pass the email to the
- 7:54analyst agent so that the analyst can
- 7:56extract the request. Okay? If we want
- 8:02to take a quick look, maybe this way I
- 8:04can start introducing the general
- 8:06architecture. This is our little
- 8:09project. Uh,
- 8:10so by project you mean a folder, right,
- 8:12in which there are
- 8:13a directory. A directory where there
- 8:15are subdirectories. In this case, we
- 8:19now see data, offers, scripts, and the
- 8:21code directory, where let's say all the
- 8:24code needed to run our agent is
- 8:26contained. And as I was saying before,
- 8:33the basic general architecture of this
- 8:35system involves the analyst, who
- 8:37analyzes the customer's request and
- 8:39extracts a standard semantics, okay, of
- 8:42what was asked, and this standard
- 8:44semantics is normalized, which means it
- 8:46is made readable in a schematic way by
- 8:48whom? by two other agents, which are
- 8:54the estimator and the planner. The
- 8:59estimator is that agent who takes care
- 9:01of taking the request that arrives from
- 9:03the analyst and understanding, based on
- 9:05the company price list, which is
- 9:07therefore company data, how much this
- 9:09service or product will cost, okay? And
- 9:15it is responsible for returning the
- 9:17cost data to the parent agent. Okay?
- 9:23While the planner, which receives the
- 9:25same information as input, i.e., the
- 9:28semantics of the customer's request,
- 9:30verifies the work availability of the
- 9:32agency, so it reads the agency's agenda
- 9:34, which in this case is an Excel file,
- 9:37but it could be anything. It verifies
- 9:44development timelines, checks the
- 9:46agency's commitments for the coming
- 9:48weeks and months, and manages to
- 9:49calculate the agency's availability and
- 9:52therefore the timelines to release
- 9:54exactly that product. After the
- 10:00estimator and planner, based on what
- 10:02was passed to them by the analyst,
- 10:04report their results to the
- 10:06orchestrator, to the main orchestrator
- 10:08agent, the main orchestrator has all
- 10:10the information to tell the writer,
- 10:12great, I know how much it will cost, I
- 10:14know by when we can do it. Writer, um,
- 10:21write an email,
- 10:22write the email, generate the correct
- 10:24email, okay? Because here too, mind you
- 10:27, the writer has, we will see it later,
- 10:29specific instructions on how to write
- 10:31the email and format it exactly how we
- 10:33want it. When you're finished, we pass
- 10:37it to the archivist. The archivist will
- 10:44simply take care of saving it in a
- 10:45specific subdirectory; obviously, in a
- 10:48more advanced phase with a complex
- 10:49production architecture, the archivist
- 10:51can even send it directly, send a
- 10:53WhatsApp message, in short, actually
- 10:55act and get it directly to the end
- 10:57customer. What I would like people,
- 11:05those watching us, to understand is
- 11:07that, okay, many of you might already
- 11:09use Claude, or have automations or
- 11:10skills running that do most of these
- 11:12things, like sending emails on our
- 11:14behalf. What really makes the
- 11:20difference here, however, is
- 11:21understanding how to build a
- 11:22well-crafted structure that allows you
- 11:24to work effectively at an agentic level
- 11:26and have a set of rules and a framework
- 11:28that lets you get the cleanest possible
- 11:30outputs from your inputs. As an
- 11:33entrepreneur, what I notice, Pietro, is
- 11:35that first of all, you have to map all
- 11:37your business processes. As we were
- 11:39saying before, it's the foundation,
- 11:40because once you have the business
- 11:42processes mapped, you move on to phase
- 11:44two as an entrepreneur: that is, hiring
- 11:46people who can take care of those
- 11:48processes. Meaning, once I have tasks
- 11:50to assign, I have to ask myself who can
- 11:52actually do that task. So, at an
- 11:54entrepreneurial level, there are two
- 11:56things to do. Number one, define the
- 11:58tasks as best as I can, that is,
- 11:59translate into a written procedure how
- 12:01a thing must be done, to the best of my
- 12:04ability, with the highest level of
- 12:05understanding and clarity I can provide
- 12:07to the person I will then hire. And the
- 12:11second, the second step, is to ask
- 12:13myself who I need to hire, which in
- 12:15this case are agents, and therefore who
- 12:17these figures are, how they should work
- 12:18, and to describe as well as possible
- 12:20the person, the personality, and the
- 12:22skills that this role must have to
- 12:24successfully perform the process I am
- 12:26delegating to them. Tell me if that's
- 12:28all correct.
- 12:29Perfect. The only thing Perfect. The
- 12:33only thing I would add is why do all
- 12:35this instead of giving all the
- 12:37instructions and all the data in a
- 12:39single prompt, in one request, or in
- 12:40one go to the agent or to the
- 12:45why to the AI because AIs have context
- 12:48limits, okay? and so, let's say they
- 12:51handle a broad context of information,
- 12:53but the more you fill it and the more
- 12:55homogeneous this information is, the
- 12:57higher, the very highest, the
- 12:58probability of producing wrong results.
- 13:00Okay? And so, for example, an incorrect
- 13:05use, for instance, of ChatGPT or Claude
- 13:07that I see, that I have often seen done
- 13:09, is that of prompting these agents,
- 13:11these chatbots, with massive requests
- 13:14and, above all, requests that even
- 13:16required performing computations. Well,
- 13:21language models, in general, are not
- 13:23good at computing data, okay? And so,
- 13:28for example, data computation, data
- 13:30calculation, well, it's better if it's
- 13:32done by an agent or even better by a
- 13:34script that the agent invokes, and
- 13:36therefore they are, let's say, removed
- 13:38from this generic prompt that only
- 13:40risks confusing the artificial
- 13:42intelligence. Look, I have a classic
- 13:46example, that is, step one is filling
- 13:49the chat with a giant prompt, right?
- 13:52You write everything you want in it,
- 13:53you keep the prompt, you copy and paste
- 13:55it every time, and there you are really
- 13:57at the base, right, of understanding
- 14:00what you are doing. But if it is really
- 14:03simple, if the thing you have to do is
- 14:05simple, people can do it. The second
- 14:08step is to build the classic custom
- 14:10little project inside Claude, the web,
- 14:12or ChatGPT and add as much information
- 14:14as possible into the project. And there
- 14:18I realized that it works up to a
- 14:19certain point, that is, in the sense:
- 14:21if things are not too complex, if you
- 14:23don't add too much stuff into the
- 14:24context. Because when you start putting
- 14:28as many documents, with as much
- 14:29information, with as many procedures as
- 14:31possible into a project, the more that
- 14:33project becomes inefficient,
- 14:35ineffective, and its quality is even
- 14:37marred. I don't know if that's correct.
- 14:45Instead, in this case, it's as if we
- 14:47were going to build an information
- 14:49hierarchy to deliver to Cloud Code so
- 14:51that Cloud Code can somehow launch
- 14:52different agents and ensure that each
- 14:54agent has very specific tasks,
- 14:56well-defined within a very clear
- 14:57perimeter in which to work.
- 15:03Perfect. But the two words you said are
- 15:06perfect: inefficient and ineffective.
- 15:09So more effective, better result, more
- 15:12efficient, less labor cost. Okay? So
- 15:17the moment you imagine if you had a
- 15:19company where you have three or four
- 15:21different departments and you decided
- 15:23to have a meeting with everyone
- 15:24together, from the engineer to that
- 15:26person
- 15:30saying everything to everyone,
- 15:32everything to everyone. Obviously,
- 15:33there is total confusion. If instead
- 15:37you think about giving instructions to
- 15:38a workgroup plus another workgroup,
- 15:40then maybe connecting them, surely it's
- 15:42a better result because the agents, the
- 15:44workers, are clearer on what they have
- 15:46to do.
- 15:47It is very important in the
- 15:48entrepreneurial field; one of the
- 15:50things that is often talked about is
- 15:51the concept of accountability, right?
- 15:53That is, in the sense, if you want
- 15:55things to be done, not only do you have
- 15:57to describe how they must be done, but
- 15:59it must also be very clear who has to
- 16:01do them. And when you find yourself in
- 16:05a chaotic environment and throw in the
- 16:06whole pile of stuff you want to get
- 16:08done, well, what usually happens is
- 16:10that nobody takes ownership of a role
- 16:12that maybe isn't clear or well-assigned
- 16:14; however, when the role and the
- 16:15process are clear and well-assigned, it
- 16:17becomes much easier to work on. I'll
- 16:21share my screen again.
- 16:22Yes, yes. Absolutely, this is another
- 16:25of the qualities of agents, which is
- 16:27defining the agent's domain; so not
- 16:29just precisely what you have to do and
- 16:31how you have to do it, but everything
- 16:33you don't need to worry about, okay?
- 16:38Which is information just as important
- 16:40so as not to mess up the work of others
- 16:42and to keep the focus on what the
- 16:44objective is for a single worker, for a
- 16:46single person. So, just like for our
- 16:51employees or collaborators, giving
- 16:53precise, bounded, and clear information
- 16:55is important; the same must be done
- 16:57with agents, and that's a bit of the
- 16:59logic behind everything.
- 17:02Let's proceed.
- 17:02Let's proceed. So, we've more or less
- 17:05seen the outline. Now, perhaps very
- 17:07briefly, I'll describe the directory
- 17:09structure. Okay, here we are inside the
- 17:12Agentic Digital Agency project.
- 17:14Guys, I'm going to play the role of the
- 17:15dummy who asks stupid questions so that
- 17:17everyone can understand, because I also
- 17:19started from scratch, so I asked myself
- 17:21these questions. So when we work with
- 17:23Cloud Code or with agents, we usually
- 17:25work with folders that contain files
- 17:27and other folders inside them, right?
- 17:29Yes, yes, yes, yes. Let's say that,
- 17:32generally, we can consider a directory
- 17:35as the project directory inside which
- 17:37we put all the instructions needed for
- 17:39the authentic execution of that single
- 17:41project. Okay? So we start from a
- 17:45source directory inside which we find
- 17:47the code that manages everything a bit.
- 17:51Our source directory is called Agentic
- 17:53Digital Agency, which contains
- 17:55for the dummies like me, a directory
- 17:57just means folder, for those who didn't
- 17:59know.
- 17:59A folder. Exactly. Yes, yes, yes. A
- 18:02folder. A folder, perfectly. And that
- 18:05basically contains what else? Nothing
- 18:07in particular. Other folders, other
- 18:09subfolders, or other files. In the end,
- 18:11it's all a directory, all a file;
- 18:13there's nothing magical about it. So,
- 18:17you see that we've already started
- 18:19organizing the contents, okay? So we
- 18:23decided to make a directory folder
- 18:24called "data" where I decided to put
- 18:26the company's data inside. So, for
- 18:31example, we created two Excel files, a
- 18:33price list where the prices are
- 18:35contained. and the agency's schedule
- 18:39with the calendar of availability. Now
- 18:44I should have the Schedule file, the
- 18:46Excel Schedule file, open here. For
- 18:48example, you will see here that there
- 18:50are two sheets: commitments and
- 18:52standard times. So, in this Excel, we
- 18:55have noted, for example, the standard
- 18:57timelines for a showcase site, a
- 18:59booking form, a digital menu, and the
- 19:01company's commitments. From July 1st to
- 19:05the 17th, there is an ongoing project
- 19:07we are working on, then there is a free
- 19:09period, there are vacations, and so on.
- 19:12Obviously, these are Excel files.
- 19:17Instead of these Excel files, you will
- 19:19tend to connect—we might show you in
- 19:21another video later—your Google
- 19:22Calendars, your databases, your
- 19:24software that contains all the company
- 19:26information, okay? It doesn't
- 19:29necessarily have to be an Excel file;
- 19:31in this case, it's just for simplicity.
- 19:34So, the data directory contains the
- 19:36company data, what Dario was talking
- 19:38about earlier. These are pieces of
- 19:40information that the agent doesn't have
- 19:42, okay? And they must always be
- 19:44available and must always be readable,
- 19:46okay? And they shouldn't be thrown into
- 19:49the context, into the prompt randomly
- 19:51every time you talk to the agent, but
- 19:53only when the agent actually needs to
- 19:54check prices or availability. Perfect.
- 20:04Um, the script file, this is an
- 20:05interesting thing because here we
- 20:07address the topic of probabilism versus
- 20:09determinism, in the sense that agents
- 20:11are left to choose autonomously
- 20:12precisely thanks to their intelligence
- 20:14in certain contexts, okay? But there
- 20:22are some operations that are better
- 20:23performed in a secure and deterministic
- 20:25way. So, for example, here we have
- 20:29three scripts that are like three tools
- 20:31in our agent's toolbox that I prepared,
- 20:33which help it do simple, clear things
- 20:35where it cannot make a mistake. For
- 20:39example, this is a Python file that
- 20:41simply calculates the days remaining
- 20:43from one date to another. Before we see
- 20:47this file, can you explain better the
- 20:49difference between probabilistic and
- 20:50deterministic, and why don't we just
- 20:52ask the AI to do these things instead
- 20:54of making a script that does them?
- 21:00Well, a probabilistic operation is an
- 21:02operation, let's say, where given an
- 21:04input, the output is generated based on
- 21:06a certain probability, okay? So you
- 21:13don't know, you know what the output
- 21:14will be generated with a certain
- 21:16probability. So you say that in 95%of
- 21:21cases the output might be within a
- 21:22range of results, but you don't know
- 21:24exactly what the result will be, okay?
- 21:28And this is very powerful, um, in
- 21:30reasoning contexts, okay? When we want
- 21:35to make the language model reason, or
- 21:37maybe when we want to make the language
- 21:39model use its creativity, or when we
- 21:41want it to read text. Okay? So this, um
- 21:45, approach is powerful in these
- 21:47specific cases, but when we have to
- 21:49perform simple operations where we know
- 21:51the expected result, for example,
- 21:53mathematical operations.
- 21:55Sure. Okay. And so mathematical
- 21:58operations like subtraction,
- 22:00multiplication, division on a large
- 22:02dataset, okay? It is much better to
- 22:08write a program that can
- 22:10deterministically calculate correctly,
- 22:12always correctly—so not 95%of the
- 22:14time, but 100%of the time—calculate,
- 22:17for example, the exact sum of the quote
- 22:19amounts. So, let's say that
- 22:26probabilistic work is great because it
- 22:28allows people to explore the world of
- 22:30creativity; so we ask it to write this
- 22:32copy or write me a story where there is
- 22:34a character who does this, that, and
- 22:35the other, and that's when you enter
- 22:37the realm of the probabilistic. When,
- 22:42instead, I enter the realm of the
- 22:44deterministic, it's: this thing is done
- 22:46this way, period. Do not go outside the
- 22:49perimeter of the instructions I give
- 22:51you. Perfect. For example, look at the
- 22:53sum amounts file. Okay, this sum must
- 22:55be perfect and precise. If I ask in
- 22:59ChatGPT or Claude, "tell me what 5 + 5
- 23:02is," it's clear it won't make a mistake
- 23:04, but the moment there are, uh,
- 23:06calculations done on 10,000–100,000
- 23:08pieces of data where you need to do
- 23:11sums, subtractions, and, uh, other
- 23:13complex arithmetic operations. It is
- 23:17very likely that the language model
- 23:19will create incorrect output data. Okay
- 23:21? So it is not, it is not the way to
- 23:24use, uh, language models. In that case,
- 23:28what should you simply tell the
- 23:30language model?
- 23:31Language models belong more to the
- 23:33world of words than they do to numbers.
- 23:35Perfect. Okay. And so, here you are
- 23:38telling it: when you have to use
- 23:39numbers, don't delegate, don't use
- 23:41creativity, instead rely on what I
- 23:43wrote for you in this script.
- 23:45Exactly. Trust what I have written for
- 23:47you in this script that works. Know
- 23:51that, interestingly, this is a
- 23:52technical issue because it's the loop,
- 23:54what we tell the language model is that
- 23:56this script exists, okay? And we tell
- 24:00it what it's for, we tell it how to use
- 24:02it, and to read the result. So it's the
- 24:05artificial intelligence
- 24:06Exactly. The artificial intelligence
- 24:08that is, let's say, instructed by us on
- 24:10how to use this script. So, the moment
- 24:13it needs to perform a calculation, it
- 24:15knows to use that, passes the data as
- 24:17input, reads the output, and continues
- 24:19its agentic execution, moving from a
- 24:21probabilistic context to a
- 24:23deterministic one, only to return to a
- 24:25probabilistic context. Ok? Ok, great.
- 24:29That's clear to me. Let me ask you a
- 24:32question, though, because here we are
- 24:33looking at Python scripts that, while
- 24:35simple—I assume they don’t do
- 24:37anything extraordinary—are still
- 24:38scripts nonetheless. Now, if a person
- 24:44doesn't know how to develop code today,
- 24:46to what extent can they ask—I mean,
- 24:48does it make sense to ask an agent,
- 24:50i.e., artificial intelligence, to
- 24:51develop a script that does a certain
- 24:53task and then reuse that script time
- 24:55and again? I mean, I understand the
- 25:01flaw, because you're asking the AI to
- 25:03develop something that shouldn't allow
- 25:05for errors, and you're doing it—you
- 25:06want to use that script precisely
- 25:08because it's the AI that develops it,
- 25:10despite the margin of error—but it's
- 25:11still better than relying solely on the
- 25:13language model.
- 25:16Yes, it is better. And it's possible to
- 25:18do it even for those who don't program.
- 25:20There are some best practices or pieces
- 25:22of advice I would give: first of all,
- 25:24the principle of atomization, meaning
- 25:27try to make scripts that don't do
- 25:28hyper-complex things, okay? So, if, for
- 25:32example, there are arithmetic
- 25:34procedures that can be split into three
- 25:36or four scripts, create three or four,
- 25:39don't create one mega-script that does
- 25:41everything. Ok? Ok?
- 25:44So, once the operation is atomic—that
- 25:46is, smaller—it is much easier for the
- 25:48language model not to make mistakes
- 25:51when developing the script. I can tell
- 25:54you that, in my opinion today, at least
- 25:56based on my experience, when developing
- 25:59scripts of 300-400 lines, it almost
- 26:01never makes mistakes, unless they are
- 26:04scripts that do excessively complex
- 26:06things. So I recommend
- 26:08So let me ask you a question. I take
- 26:13the deterministic operation I need to
- 26:15perform, break it down into its most
- 26:17elementary processes, and for each
- 26:19process, I create a script that
- 26:21performs that specific task, and then
- 26:23in sequence, the agent will use one
- 26:26script, then another, and then another
- 26:28one still. Exactly. And also, when the
- 26:34language model produces them for you,
- 26:36it is much easier for it to get them
- 26:39right because, again, it has a smaller
- 26:41task and so it manages to be more
- 26:43focused on the goal and tends to make
- 26:45fewer mistakes. As far as I can tell
- 26:48you, nowadays all my scripts, whether
- 26:50Python, Bash, or even in other
- 26:52languages of 200-300 lines, I have them
- 26:54written always and only and exclusively
- 26:57by the language model. Uh, one tip I
- 27:00can give is maybe writing it with, for
- 27:03example, ChatGPT and asking Claude to
- 27:06evaluate it, okay? Uh, so saying, does
- 27:09this script actually work, does it have
- 27:12bugs, um, does it have security issues,
- 27:14so asking, for example, a Language
- 27:17Model to evaluate its quality. Okay? So
- 27:21, usually, after two or three cycles of
- 27:23this type, things go well and let's say
- 27:26it's all quite, I mean, you can trust
- 27:28it almost blindly. Then, clearly, I
- 27:33always review them myself because I
- 27:35understand what's inside. Those who
- 27:38don't know how to program definitely
- 27:40have to go through a verification cycle
- 27:42from one language model to another to
- 27:44say, check that this script does
- 27:46exactly what it's supposed to do. So I
- 27:50take what I did with one model, pass it
- 27:52to the other model and tell it,
- 27:54challenge this thing.
- 27:55Exactly. Find the bugs, find the
- 27:57security issues, or does everything
- 27:59work? And this, in my opinion, is
- 28:01powerful and it works. So let's say we
- 28:04left off at this directory that
- 28:06contains the scripts, so this is the
- 28:08sum of the amounts to create the quote.
- 28:11Read Excel is a tool we give to the
- 28:13language model to open, process Excel,
- 28:15and read what's inside. Days remaining,
- 28:18it's simply a calendar calculator for
- 28:20how many days are left from now until
- 28:22September 30th. Um, then what else is
- 28:26there? So, we've seen the data, we've
- 28:29seen the scripts, the directory has the
- 28:31cloud file. MD has the .cloud directory
- 28:34. These, this file and this folder,
- 28:41their names are not chosen at random,
- 28:42but are mandatory because in this case
- 28:44we are using Cloud Code as an
- 28:46orchestrator agent, and therefore we
- 28:48must follow the Cloud Code rules to
- 28:49implement a generic service within
- 28:51Cloud Code.
- 28:55And now I'll ask you the absolute
- 28:57beginner questions. If I knew nothing,
- 28:59what is the cloud.md file for, why do I
- 29:02have to create it, and above all, what
- 29:04are the files? MD ah the
- 29:08files. MD are technically called
- 29:10Markdown. Um, let's say they are files
- 29:16that have a specific syntax. If I open
- 29:20it, we can see it. For example, uh,
- 29:24actually they are, maybe I'll add two
- 29:26or three things myself, they are simple
- 29:28text files, only that Practical knows
- 29:30these things very well, because, for
- 29:32example, when you had to write blog
- 29:34articles, one hashtag was equivalent to
- 29:36an H1, so it was a header, a very large
- 29:39title. Then there was the H2 with two
- 29:42hashtags which was a slightly more
- 29:44important subtitle, the H3, and then
- 29:45the dashes which are perhaps the bullet
- 29:48points. Actually, it's a simple text
- 29:51file. If you look at it, you might say,
- 29:53"Wow, it looks like code," but it's not
- 29:55code. Where there are two asterisks,
- 29:57that means bold text and so on.
- 29:58Yes, exactly. It is a text file that
- 30:05follows conventions where, if we put
- 30:07specific characters before a string of
- 30:10text, that string becomes a title, a
- 30:12subtitle, a comment, or a list. Okay?
- 30:18So,
- 30:20to reassure people, I always say that
- 30:22if you use Cloud Code or artificial
- 30:24intelligence, it's often the AI itself
- 30:26that writes and creates these files.
- 30:30It's not like I ever sit down and write
- 30:32the markdown files I need to describe
- 30:34procedures and such myself. So, being
- 30:40super lazy, one thing I do is use a
- 30:42computer extension, a computer app
- 30:44called Super Whisper—but there are
- 30:46many others like Whisper Flow—where
- 30:48you can talk to the software you use
- 30:50for Cloud Code. Now, Pietro uses it via
- 30:55the terminal, but I, for example, use
- 30:57VS Code, and from VS Code, I talk to
- 30:59the Cloud Code chat and tell it: "I
- 31:01need to develop a file where we explain
- 31:03this, that, and the other thing, we do
- 31:05it this way, etc.," and then it writes
- 31:08the whole file and the procedures for
- 31:10me.
- 31:11Which is exactly what I did, too; in
- 31:13the sense that of what you see here, I
- 31:15wrote very few lines, meaning I always
- 31:17gave Cloud Code the task of compiling
- 31:19these files. And I, for example, don't
- 31:22remember the MD file syntax by heart at
- 31:24all, so I check it every time; so,
- 31:26exactly, it is not necessary to
- 31:28memorize it. But why is this file
- 31:31important? Because this cloud.md file
- 31:38is a file that Cloud Code loads during
- 31:40every turn of the dialogue obligatorily
- 31:42, so it contains information that is
- 31:44always made available to the language
- 31:46model when we use Cloud Code. So, in
- 31:56here, there is information that is
- 31:58important and must always be
- 32:00obligatorily taken into account by the
- 32:01agent whenever we run it. Okay? So, by
- 32:07agent in this case, I mean Cloud Code
- 32:09as a whole. And that is the reason. So,
- 32:11for example, when Cloud Code has to
- 32:13work on a project, inside that project
- 32:15folder, there is a cloud file. It is
- 32:21the master file where the entire
- 32:22project is described: the components,
- 32:24what is inside the folder, and the most
- 32:26important, fundamental rules that Cloud
- 32:28Code must interpret when it works
- 32:30within that folder. Is that correct?
- 32:34Did I understand that right?
- 32:35Absolutely correct. Well, let's say,
- 32:38perhaps put more technically, its
- 32:40content is always in the agentic
- 32:42context, always. So, in every turn of
- 32:46the dialogue, this content is passed
- 32:48along and it always has it in memory,
- 32:50because there are other files—exactly
- 32:52what we were saying earlier, for
- 32:54example, data, the calendar, the price
- 32:56list—that don't need to be passed
- 32:57continuously; those will only be used
- 32:59when needed. To explain what we were
- 33:03saying earlier, I would add that, quite
- 33:05often, we have said that adding too
- 33:07much information degrades, it lowers
- 33:09the quality of the output, of the
- 33:11agentic work. So, cloud.md, as Pietro
- 33:15was saying, is always loaded into
- 33:17memory: it's the agent's identity,
- 33:19right? Of the macro-orchestrator agent;
- 33:22it is always loaded in memory, whatever
- 33:24it does. So, at any moment you write
- 33:26anything, these are the pieces of
- 33:28information our agent always has with
- 33:30it. Instead, what we include in other
- 33:38documents, in other contexts, other
- 33:39subfolders, are documents, texts, and
- 33:41information that are only used if we
- 33:43have defined in the agent's behavior
- 33:45the methods, the moments, and the
- 33:47instructions for the agent to use that
- 33:49information so as not to overload it.
- 33:58So, for example, the information
- 34:00regarding the date when I am available
- 34:02to provide the work will be used as
- 34:04information loaded into memory only at
- 34:05the moment when the agent—whose name
- 34:07I don't remember right now, which we
- 34:09are building—has to go and create the
- 34:11action plan and decide by which dates
- 34:13we will develop the project, right?
- 34:18Exactly. And so, let's say we see that
- 34:23in this Cloud.md, which is the central
- 34:25file that, let's say, is what
- 34:26determines the parent orchestrator
- 34:28agent, we describe exactly this: what
- 34:30this orchestrator must do, right? So it
- 34:36tells it, "Look, you have office rules,
- 34:38" so let's say these are the office
- 34:40manager's rules, and it tells it, "Look
- 34:42, you have five specialists: the
- 34:44analyst, the estimator, the planner,
- 34:46the editor; you are the orchestrator."
- 34:49Okay? And this is something it must
- 34:52always keep in mind. It doesn't do the
- 34:55jobs, it assigns them, okay? So its
- 34:57role is emphasized to it. And then, for
- 35:00example, it describes who the agents
- 35:02are, right? And, well, practically, to
- 35:05whom to assign the work. When the user
- 35:09reports a new customer request, okay,
- 35:11it triggers, you start your whole crew
- 35:14of agents, right? You have the analyst,
- 35:18and pay attention, there's an order
- 35:20here too, this is important. Okay? So
- 35:22it says, "Look, you have an initial
- 35:24agent that is the analyst, who must be
- 35:26called first because they need to read
- 35:28the user's request. Often customers
- 35:32don't write entirely clear requests and
- 35:33often we waste a lot of time trying to
- 35:35understand exactly what is being asked
- 35:37of us. Because it seems like a trivial
- 35:42role now, but imagine a sub-agent that
- 35:44is truly capable of schematizing in 3
- 35:46seconds the request of a client who has
- 35:48sent you three emails, four phone calls
- 35:50, five WhatsApp messages, and you no
- 35:52longer understand anything of what they
- 35:54want. Okay? Imagine this highly
- 35:59developed sub-agent that has access to
- 36:00all this information and creates a very
- 36:02precise instance regarding what the
- 36:04user wants, perhaps even knowing the
- 36:06history of that same user, so it
- 36:08becomes an interesting role. So, first
- 36:12phase: analysis of what is being
- 36:14requested by the client. Then, in
- 36:18parallel—this is underlined because
- 36:20this phase here, where we have the
- 36:22estimator and the planner work, is a
- 36:23phase where these two workers have two
- 36:25completely separate tasks that have
- 36:27nothing to do with each other, but are
- 36:29both important to move the work forward
- 36:31. So I, as let's say the company
- 36:36manager, tell them: work together, go
- 36:38ahead. Okay? And this can be said,
- 36:40yes, it's not that one has to wait for
- 36:41the other to finish before starting.
- 36:44You can work together, or rather
- 36:45simultaneously more than together.
- 36:48Exactly. What must the drafter do
- 36:50instead? The drafter must wait for the
- 36:53estimator and the planner to finish and
- 36:55give them the cost of what was
- 36:56requested. Okay? And the timelines.
- 37:04When the drafter has received this
- 37:06information passed by the agents who
- 37:07worked in parallel, they can move
- 37:09forward. In the meantime, they wait.
- 37:16When this information arrives, they
- 37:18create a quote and plan summary,
- 37:19meaning all the information needed to
- 37:21then be sent as an email to the
- 37:23customer, telling them," Okay, this is
- 37:25our response, this is our proposal,
- 37:27accept it. "The archivist agent here
- 37:32does nothing but take the information
- 37:34from the reply email that the drafter
- 37:36created and save it in a file. Even
- 37:40here it might seem like overkill in
- 37:42this case, but consider that this can
- 37:44be saved to a database, an email can be
- 37:46sent, then a message can be sent via
- 37:48WhatsApp or Telegram. So the archivist
- 37:52can do a thousand things: it can log
- 37:54all the operations that have been
- 37:56performed, it can notify the company
- 37:58director:" Look, the quote has been
- 37:59sent. "Okay? So all these sub-agents
- 38:06can actually be expanded and even have
- 38:08sub-agents of their own that perform
- 38:10further operations, reaching a level of
- 38:12complexity and granularity capable of
- 38:14mapping and executing operations even
- 38:16for companies with extremely complex
- 38:18workflows. And the last step is showing
- 38:23the result to the user. General rules,
- 38:26this is interesting. Each specialist,
- 38:30therefore each sub-agent, receives all
- 38:32the text it needs in its assignment.
- 38:35The specialists don't talk to each
- 38:36other, okay? So, this interesting
- 38:38isolation, what does it mean? Each
- 38:40specialist receives all the text it
- 38:42needs in its assignment. It tells them,
- 38:47" Be careful that when one of the
- 38:48sub-agents returns the result to you,
- 38:50pass that result completely to the next
- 38:52agent. "Don't make any evaluations
- 38:56yourself; you just have to act as a
- 38:58pass-through. Okay?
- 38:59Okay.
- 39:01Don't—don't summarize, don't shorten,
- 39:03don't add anything. Okay.
- 39:06And why don't the specialists talk to
- 39:08each other? Specialists don't pass
- 39:11information, they don't talk to each
- 39:13other by design, in the sense that when
- 39:15you have—by design in this context,
- 39:17meaning that if you want the agents to
- 39:19be in series or parallel, having
- 39:21isolated tasks,
- 39:23ok,
- 39:24it is necessary that they don't talk to
- 39:26each other. This is the first phase,
- 39:29let's say, it's the first model and it
- 39:31is the basic agentic implementation
- 39:33model. There are design patterns that
- 39:37provide for inter-agent dialogue, okay?
- 39:40But maybe we'll see those later on,
- 39:42also because, for example, Cloud Code
- 39:44implements it with a design pattern
- 39:46that I think is called Agent Teams, but
- 39:48since it's in beta, if I remember
- 39:50correctly, precisely because it's not
- 39:52yet solid and makes a few little errors
- 39:54. Okay? Um, so let's say that the basic
- 39:57structure, which in my opinion you
- 39:59should keep in mind, covers 70-80%of
- 40:05cases, um, is this architecture which
- 40:07provides for the verticalization of
- 40:10agents by assigning limited scopes.
- 40:16Which means that each of these
- 40:17sub-agents has its own closed context
- 40:19that only it sees and that the others
- 40:21do not see. This is cleanliness and
- 40:25focus. Okay? While I'm giving a quick
- 40:29introduction, we're talking about a
- 40:31horizontal multi-agent design pattern
- 40:33where sub-agents can talk to each other
- 40:35. Wait, what is a design pattern? I
- 40:40mean, I understand when you talk, but
- 40:42...
- 40:42Yes, you're right. A design pattern,
- 40:46how to explain it...it's a standard
- 40:48scheme, a standard way of doing things,
- 40:50okay? When there's, when you have to do
- 40:55something complex, okay? So, maybe an
- 41:01operation that requires various steps
- 41:03together, that have a specific order,
- 41:05that must be done in a certain way, and
- 41:07you refine this process over the years
- 41:10because you say," Look, to make this
- 41:12cake, I need this, this, and this. I
- 41:17follow these steps, and it turns out
- 41:19well. "Okay? And so I created my own
- 41:22scheme for how to make that type of
- 41:24cake, or how to make all cakes of that
- 41:26type. If I write this scheme down, and
- 41:29say, for example, watch out—
- 41:32Watch out, never put cold butter in the
- 41:35cake; first, let it warm up a bit
- 41:37outside. I am creating a design pattern
- 41:42to perform a specific operation that
- 41:44can be associated with multiple
- 41:45operations of that type. Every one of
- 41:48them.
- 41:49Certainly. So a design pattern is,
- 41:51let's say, the way you conceive the
- 41:53right way to do things, and the right
- 41:55repeatable way to do things. Exactly.
- 41:59While keeping in mind, though, that
- 42:01there can be different ways to do it.
- 42:03So this is your way. If I have to build
- 42:11Notre Dame tomorrow, I could decide to
- 42:12start by going to collect the right
- 42:14bricks to build the building, or think
- 42:16about the foundations first and then go
- 42:17acquire the right materials to build
- 42:19the architecture once I've finished the
- 42:21foundations, right? So I imagine that
- 42:30every developer has their own signature
- 42:32, their own way of conceiving work,
- 42:34their own patterns for design, product,
- 42:36development, and in this case, for
- 42:38agentic design; because I might decide
- 42:40—for the same task—I could do it
- 42:42with different agents structured in a
- 42:44different way, while Pietro does it
- 42:45another way that is more obvious,
- 42:47clearer, and more effective for him.
- 42:51Exactly. Uh, but there is also, let's
- 42:54say, this is a classic topic in
- 42:56software engineering. When you have to
- 43:01build extremely complex things and
- 43:03someone has already created a design
- 43:05pattern that allows you to build them
- 43:07in a solid, scalable, secure, and fast
- 43:09way, we often study that design pattern
- 43:11and reimplement it. Okay? Let's just
- 43:17say programmers like to say," Don't
- 43:18reinvent the wheel. "Right? Sure, if
- 43:22someone has already solved a certain
- 43:24problem in a complex way,
- 43:27we borrow it,
- 43:29feel free to test that kind of
- 43:30procedure as well. Then maybe many
- 43:33programmers, for instance, prefer to do
- 43:35it their own way; in some cases, I'm
- 43:37someone who strictly follows design
- 43:39patterns because I trust them and I
- 43:41know they're the best. In other cases,
- 43:43I say no, this is overkill, it's a mess
- 43:45to over-engineer it, it's just mental
- 43:47gymnastics for engineers. Let's leave
- 43:49it be, let's keep it simple, okay?
- 43:51Let's make an MVP, let's make a simple
- 43:53and functional product and forget about
- 43:55the standard design patterns floating
- 43:57around. So it's absolutely the user's
- 44:00choice, but I recommend getting
- 44:02informed about the design patterns that
- 44:04are out there and seeing, let's say,
- 44:06how they are made, what problems they
- 44:08solve, and what problems they create.
- 44:12Because any architecture solves some
- 44:14problems, but it also creates others.
- 44:17Right? Yeah.
- 44:19Like in any architecture, even with
- 44:21buildings, there's always some weak
- 44:23point.
- 44:24Exactly, exactly, exactly. There is no
- 44:27rule. The important thing is that the
- 44:29points don't collapse.
- 44:30The important thing is that the points
- 44:31don't collapse. And so, compared to
- 44:35what we were saying earlier, the
- 44:36inter-agent dialogue, meaning between
- 44:38sub-agents, requires more engineering
- 44:40because you have to define the
- 44:42communication methodologies and
- 44:43communication repositories between
- 44:45users, so how sub-agents communicate
- 44:47with each other, where they write, and
- 44:49what they write. Okay. And it also
- 44:54seems to me like something that greatly
- 44:56increases the probability of ending up
- 44:58in a probabilistic environment instead
- 45:00of a deterministic one. Am I wrong?
- 45:02Spot on.
- 45:04I mean, there's a lot more chaos. If
- 45:08you take many agents that you're
- 45:09already struggling to manage and you
- 45:11have many agents talking to each other
- 45:13and passing the ball back and forth,
- 45:14there's a high probability that you'll
- 45:16find yourself not understanding what
- 45:18it's doing and not getting an output
- 45:19like you had imagined.
- 45:22Exactly. So you're moving in the
- 45:24direction of greater autonomy, but
- 45:26you're also moving in the direction of
- 45:28less control. Therefore, the moment
- 45:31that type of architecture isn't really
- 45:34solid, stable, and controllable, you
- 45:36risk ending up with a system that makes
- 45:41a mess and isn't efficient. But, man,
- 45:49this stuff is really cool, because so
- 45:51many people don’t realize this and
- 45:53dream of an artificial intelligence
- 45:54where you just give it a simple task
- 45:56and it does everything; then they go
- 45:58around complaining on forums, on Reddit
- 46:00, that AI sucks or that you spend more
- 46:02time reviewing and fixing errors than
- 46:03the time you actually saved because you
- 46:05didn't get what you dreamed of. The
- 46:14reality is that, in my opinion, the
- 46:16more time you spend building the right
- 46:18architecture—making it as clear,
- 46:19perfect, and functional as possible—
- 46:21the more time you save later by
- 46:23avoiding problems and fundamental
- 46:25errors in the work performed and
- 46:26delivered by your agents. But this puts
- 46:30us in a position to understand just how
- 46:33damn important this work of structuring
- 46:35, clarifying, and exemplifying
- 46:36everything that needs to be done, how
- 46:38it should be done, in what order, and
- 46:40in what way, really is. And in the end,
- 46:44this is the pattern design you were
- 46:45talking about, which is perhaps where
- 46:47the real intelligence in working with
- 46:49AI lies, and it’s not something so
- 46:50obvious that everyone can do. I mean,
- 46:56this is why even today, someone with a
- 46:58software engineering or developer
- 47:00approach still has a huge competitive
- 47:02advantage over a person who just takes
- 47:04ChatGPT or Claude and plays around with
- 47:06them a bit, because, let's be honest,
- 47:08building custom projects on Claude, Web
- 47:10, or ChatGPT is absolutely not
- 47:12comparable to what we are talking about
- 47:14in this video. Here, it’s not about
- 47:19knowing how to develop, but knowing how
- 47:21to architect, which is still something
- 47:23very important if you are an
- 47:24entrepreneur, if you work in business,
- 47:26or generally if you are capable of
- 47:28building something good in life,
- 47:29because I realize that intelligence is
- 47:31often something horizontal, not
- 47:33vertical. It’s not" oh, he knows how
- 47:36to develop, so he’s mega-intelligent,
- 47:37"or" he knows how to do his homework,
- 47:39he’s good at math, he can solve a
- 47:41Rubik’s cube in 10 seconds, "those
- 47:43are just specific skills. In my opinion
- 47:46, intelligence is something horizontal
- 47:48that allows you in life to succeed in
- 47:50building and architecting an existence,
- 47:52a job, a profession, or a business that
- 47:54carries with it principles capable of
- 47:56bringing order to chaos and
- 47:58systematizing complexity. Exactly.
- 48:03Balance, and so I completely agree with
- 48:06you; I mean, pure human intelligence is
- 48:08exactly this: knowing how to architect
- 48:10and keep the various components of life
- 48:12in balance—even if it might seem
- 48:14off-topic now, I'll say it: physical
- 48:16intelligence, right? I mean, having a
- 48:23good relationship with one's body, with
- 48:25the things around us, living peacefully
- 48:27in our own living space, the
- 48:29environment we live in, is, let's say,
- 48:31not so disconnected from this way of
- 48:32thinking; and it is also important
- 48:34because, uh, compared to the
- 48:36discussions we had other times, um, it
- 48:38makes us understand how important we
- 48:40still are despite the presence of
- 48:41artificial intelligence, which can
- 48:43automate a lot of the work, right? On
- 48:50the contrary, there is even more
- 48:52responsibility to properly architect
- 48:54our processes from beginning to end. Um
- 48:58,
- 48:59let's
- 48:59then, let's, let's go ahead. Uh, so we
- 49:03were at Cloud MD, which is the central
- 49:05file that organizes, that orchestrates,
- 49:07let's say, the parent agent. The other
- 49:12agents are, are, are, are in here,
- 49:15inside cloud. Agents. Ok.
- 49:19That's why specifically Cloud and
- 49:20agents, I mean, it's a folder that must
- 49:22, if you build agents, they necessarily
- 49:24have to be inside cloud and inside an
- 49:26agents folder.
- 49:27Yes, in cloud code, yes. If we use
- 49:30cloud code, the naming and nesting must
- 49:33be exactly this. So, uh, point clode uh
- 49:40, agents, and generally one file per
- 49:42agent. Let's open one at random, let's
- 49:45see what's inside. They're always MD
- 49:47files anyway, by now you've understood,
- 49:49you've got it. Uh, what is generally
- 49:52inside a file that describes an agent?
- 49:56The name, the description, uh, the
- 49:59tools. This is perhaps a bit more
- 50:02complex, but we can look at it. Uh, so,
- 50:04for example, this is the analyst. The
- 50:07description reads a client's request,
- 50:09turns it into an organized sheet. Ok?
- 50:14Uh, read tools read. What does that
- 50:17mean? This is a security specification.
- 50:21Ok? So here we are limiting what that
- 50:23agent can do. This agent must not write
- 50:27files, must not send messages, must not
- 50:29send emails, must not execute code, it
- 50:32must only read, uh, an instance and
- 50:34understand it. Ok?
- 50:36So you are building an action perimeter
- 50:38, I mean, are you defining the action
- 50:39perimeter here? It's reading the
- 50:41incoming files, but not writing
- 50:42anything else.
- 50:43Exactly. I tell it, look, you can only
- 50:46read; since you only have to read, you
- 50:48can only read, ok? Uh, this is the
- 50:52principle of least privilege, it's
- 50:54called, ok? In IT, not just IT, it's
- 50:59extremely important: if you have a
- 51:01process, an agent, a program, a
- 51:03software, a system, whatever
- 51:05technological thing you have,
- 51:07configuring it to do more than what it
- 51:09needs to do is introducing a risk. Ok?
- 51:15So if you have, um I don't know, a
- 51:21camera at home that only needs to look
- 51:23at room A, room B and that's it, you
- 51:25have to prevent it from being able to
- 51:26look at room C. Okay? You'll ask me,
- 51:30why this? Because in case I somehow
- 51:36manage, voluntarily or involuntarily,
- 51:39to modify the behavior of this, of this
- 51:41, okay? If I am a malicious actor, or
- 51:47simply if the language model is
- 51:49hallucinating and thus wants to use my
- 51:50agent in a negative or dangerous way.
- 51:54Here it has a block, it has a block
- 51:56that tells it, look, you can only read
- 51:57anyway, so at most you read poorly, you
- 52:00don't write something dangerous, you
- 52:01don't take active actions, okay?
- 52:05Therefore, when defining agents, it is
- 52:07good practice to only define, to assign
- 52:09to that agent the minimum privileges
- 52:11necessary to perform the task it must
- 52:13do.
- 52:17In this case, Tools colon read with a
- 52:19capital R, is that a convention? Is it
- 52:21something that must be precise and
- 52:23written like that or
- 52:24Yes, yes, yes. This, this is a schema,
- 52:27by the way, the Yaml format, but anyway
- 52:29, let's leave that aside. It's, so this
- 52:32is, the name must be name equals name,
- 52:34description, description colon
- 52:36description tools. These must be the
- 52:39Cloud Code tools, read, bash, write,
- 52:42etcetera, etcetera. There are, there is
- 52:44a list of them, they can be found. Or
- 52:45you ask Cloud, who knows them better
- 52:47than anyone, and anyway, then here you
- 52:49tell it what it is. You are an analyst,
- 52:55always produce, always produce a text
- 52:57to send back to the parent orchestrator
- 52:59where you must put what is being asked,
- 53:01what the constraints are, and if there
- 53:02are any open questions. For example,
- 53:07what the client doesn't say and should
- 53:09be asked. Uh, rules, one item line by
- 53:12line, so write, write them for me line
- 53:15by line. So it is, it is a fairly
- 53:17simple agent. Let's see if there is
- 53:19something a bit more complex. Here,
- 53:22maybe this one.
- 53:23I'll ask a question now. Here we are
- 53:25doing a stylistic exercise, a very
- 53:27simple example so that people
- 53:29understand how the architecture of a
- 53:31project running on AI agents is
- 53:32structured. But, for example, if you
- 53:35had to develop a product tomorrow and
- 53:38you need agents that are, in short,
- 53:40functional and effective in the field,
- 53:42to what extent do you delve as much as
- 53:44possible into the agent's work? Meaning
- 53:48, what is the right balance between too
- 53:50much and too little? I mean, should
- 53:55these documents where you specify how
- 53:57the agents should work be as
- 53:59comprehensive as possible and specify
- 54:01everything, or, since Cloud Code agents
- 54:03are already trained on an infinite
- 54:05amount of information, do we take for
- 54:07granted that they already know how to
- 54:09do many things and do them very well?
- 54:14You've asked the question of the
- 54:16century, in the sense that it is a
- 54:18problem that already exists in software
- 54:21in other ways, but regarding agents, it
- 54:23is a very hot topic in these last few
- 54:25months; that is, how to break things
- 54:27down, what is the level of
- 54:29fractionation and atomization of
- 54:30agentic operations. Right? Well,
- 54:37generally speaking, it is very rare to
- 54:39start with a precise and perfect
- 54:40architecture where you create the right
- 54:43number of agents with the correct
- 54:44number of instructions for each one.
- 54:49What you do is get a general and
- 54:51balanced idea, okay? Trying not to
- 54:55overload them with information, but
- 54:57also not creating stupid agents that
- 54:59perform only a single operation. Right?
- 55:02I cannot just ask an agent to tell me
- 55:04how many files are in a directory. I
- 55:06don't make an agent that just does that
- 55:08, okay? Instead, I create an operation,
- 55:11a tool that does that, so I try to
- 55:13semantically identify the operations to
- 55:16isolate. Then I build an agent. If I
- 55:21then see that I am asking it to do too
- 55:23many things, I am probably overloading
- 55:25it in that case and I need to
- 55:26re-fractionate the agent so that
- 55:32So, for example, if I have an agent
- 55:34that needs to develop an offer and the
- 55:36offer becomes a quote, and the quote
- 55:38must have a well-written writing
- 55:39component, a PDF construction component
- 55:41with a good design, and all these
- 55:43things, at a certain point I might no
- 55:45longer have just the agent that
- 55:46develops the quote, but I will have two
- 55:48agents. One that writes the copy or the
- 55:53body of the quote text that then passes
- 55:55it to the designer, and the designer
- 55:57who goes, according to different
- 55:59specifications you gave it, to build
- 56:01the design of the PDF, pastes it inside
- 56:02, and then exports it. That could be an
- 56:05example,
- 56:06right? It's a perfect example that also
- 56:08applies to the real world, isn't it?
- 56:09Because if you start a business and
- 56:11maybe hire one or two people who do a
- 56:13whole set of operations, then you see
- 56:15that the work grows and it has to
- 56:17become more and more complex and more
- 56:19and more specific. Right? For example,
- 56:21I don't know, you have to develop
- 56:23software, you hire a full stack dev who
- 56:25does both the design, the frontend, and
- 56:27the backend, then you start making
- 56:29increasingly complex software or you
- 56:30want greater specialization,
- 56:32You take on the frontend, you take on
- 56:34the quality assurance, and then, as we
- 56:36were saying before, when it's not clear
- 56:38who is responsible for a task because
- 56:40the task is too broad, it usually all
- 56:41falls through the cracks.
- 56:43Exactly. Exactly. Here, here is the
- 56:46quote generator. Why am I showing it to
- 56:48you quickly? Because it's a bit more
- 56:50complex than the other one and because
- 56:52there's the shift from probabilism to
- 56:53determinism. Okay? So, for example,
- 56:55here name, quote generator, description
- 56:57, transforms a list of requests into a
- 57:00quote using exclusively the project
- 57:02price list because, watch out,
- 57:03it's in all caps and all caps has an
- 57:05effect on LLMs, okay?
- 57:07Yes, yes, it has weight, it has weight,
- 57:09meaning people say," Wow, he wrote it
- 57:11in all caps, it must be important. "
- 57:13Exactly.
- 57:13So it's the same thing that happens in
- 57:15my mind when Denise sends me a message
- 57:17with something written in all caps.
- 57:19It means you have to, you have to focus
- 57:21.
- 57:21Buy the eggs. Remember.
- 57:24This time remember it. Exactly. Yes,
- 57:28yes, it works like that. So, let's say,
- 57:31this also means they should be used
- 57:32with a grain of salt because
- 57:34highlighting too many things is like
- 57:36highlighting nothing at all. Sure.
- 57:40Um, here it is highlighted precisely
- 57:42because here a quote needs to be made,
- 57:44the correct prices must be taken. So I
- 57:49want to emphasize, I want this agentic
- 57:51process to actually work this way, not
- 57:53for it to make up prices or invent
- 57:55discounts for the user, okay? So I
- 58:01start by telling it that it must only
- 58:03use the project price list, so first of
- 58:05all I write the data for it in an Excel
- 58:07file or somewhere else so that it is
- 58:09absolutely impossible for it to make up
- 58:10data and I tell it to use that. Okay?
- 58:18Um, so I reinforce, I try to reinforce
- 58:20in every way and limit as much as
- 58:22possible the option that it might
- 58:24actually do something it shouldn't or
- 58:25read data it shouldn't read. The tools
- 58:31here, um, it has three: read, grep.
- 58:37Read the files. Grep is borrowed from a
- 58:41very famous Linux command used to
- 58:42search for occurrences in files. Find
- 58:46me all the files where I mentioned that
- 58:47client. Um, Bash instead is a tool that
- 58:51the agent can use to actually execute
- 58:53code or commands. This is extremely
- 58:56sensitive, but we need it. Why do we
- 58:58need it? Because look at what we tell
- 59:01the quote generator. Your only source
- 59:03of prices is the file. You must quote,
- 59:06you must quote correctly. You must use,
- 59:11um, you must use the script that allows
- 59:13you to read Excel, okay? And you must
- 59:19read the price list .xlsx, okay? and
- 59:23you must never do it any other way. So
- 59:26every time you need to provide a quote,
- 59:28you must run specific commands that
- 59:30read the files and obtain the data from
- 59:32those files. Okay? In this way, there
- 59:36is a shift from probabilism to
- 59:37determinism. Okay? And language models
- 59:45have become very, very good at what is
- 59:47called tool calling, which is the
- 59:49transition from text to the execution
- 59:51of a tool. Okay? Uh, so in this
- 59:56specific case, this is where the
- 59:58transition happens. Here, the agent
- 1:00:02will use the data within the Excel file
- 1:00:04by using this Python script, which is
- 1:00:07read_excel.python. And then the other
- 1:00:11instructions are, let's say, semantic,
- 1:00:14right? Uh, create an entry for each
- 1:00:16request. Compose the table with item,
- 1:00:19price, list price, and note. Anything
- 1:00:21not on the price list has no price; put
- 1:00:23it in the off-list section. to
- 1:00:26calculate the totals. Here too. Now, if
- 1:00:31it's three or four digits, probably
- 1:00:33three or four items on a price list, uh
- 1:00:35, language models probably won't make
- 1:00:37mistakes, but imagine a very complex
- 1:00:39system that might have to work with
- 1:00:41many figures, perhaps even with commas
- 1:00:43or in different formats, and maybe
- 1:00:45across hundreds of products, okay? So
- 1:00:50maybe even a large company or thousands
- 1:00:52of products. I need the totals to be
- 1:00:54correct. Okay? Even here, do you see
- 1:00:57what I'm saying? Totals are never
- 1:00:59calculated in your head. Never.
- 1:01:01Totals are never calculated in your
- 1:01:03head.
- 1:01:03Never in your head. You must use the
- 1:01:06sum amounts script written in Bash.
- 1:01:09Okay. And this Bash tool will be used
- 1:01:12here. So it must have this in order to
- 1:01:14run that. Uh, and you give it an
- 1:01:17example. So run it like this, pass it
- 1:01:20all the amounts, and the script itself
- 1:01:22will give you the actual result of the
- 1:01:24amounts. Don't make it up yourself. Uh,
- 1:01:27close the quote with the total, total
- 1:01:29options, etcetera, etcetera. So, let's
- 1:01:33say this was a slightly more complex
- 1:01:35agent that I wanted to show you, but in
- 1:01:37the end, they are all like this. So
- 1:01:41here we can list all the agents we have
- 1:01:43created in this agents directory folder
- 1:01:45. Then there is the setting.json file.
- 1:01:48Anyway, this isn't very important, but
- 1:01:50we'll open it to see what's inside. Uh,
- 1:01:53here, so, this is a security
- 1:01:55instruction that I wanted to give. I
- 1:01:59mean, here Cloud Code allows you to
- 1:02:01create this file in this strange format
- 1:02:03called JSON, where I told it:" Never
- 1:02:05dare to remove anything, so never
- 1:02:07delete anything; there is never any
- 1:02:09case where you should delete anything,
- 1:02:11never do it. "And this...and this
- 1:02:14blocks it. Okay? Because in my system,
- 1:02:17you don't
- 1:02:19use JSON files instead of MD in these
- 1:02:21cases.
- 1:02:23But why, then? Because a JSON file is a
- 1:02:26file that is read deterministically.
- 1:02:28Okay.
- 1:02:29Okay. So, for each line, what is inside
- 1:02:32is actually executed. It's not
- 1:02:33evaluated, it's actually executed. Eh,
- 1:02:36what am I telling it here?
- 1:02:37Script context.
- 1:02:40It's not a script, it's a, it's a, it's
- 1:02:42a data structure, let's put it that way
- 1:02:44. Okay. Okay, okay.
- 1:02:46But because it contains scripts, for
- 1:02:48example, look here. So it contains
- 1:02:50scripts.
- 1:02:52And here, for example, I'm...I'm in the
- 1:02:54allow list, I'm telling it...I'm
- 1:02:56telling it:" Look, um, these these
- 1:02:58three operations read Excel, calculate
- 1:03:01missing days, sumamounts.sh are are
- 1:03:03scripts I made, they are safe, you can
- 1:03:05always execute them; don't bother
- 1:03:07asking me: can I execute this, this,
- 1:03:09and that. "I made those, go ahead this
- 1:03:13way. Why did I do this? I did this
- 1:03:17because this way there is no need for a
- 1:03:19man-in-the-loop during the agentic
- 1:03:21phase, okay? So the agent goes ahead,
- 1:03:24does all the steps we saw before, so
- 1:03:26analyst, estimator, assembler, etcetera
- 1:03:29, etcetera, until the end, because
- 1:03:31these operations are assigned as valid
- 1:03:33by default. Eh, that's all. So this
- 1:03:38settings JSON, obviously this is an
- 1:03:40example of a settings JSON, you might
- 1:03:41find huge ones with everything inside,
- 1:03:43but it's useless to look at all the
- 1:03:45scenarios. And that's it, we're done.
- 1:03:49Then what else is there to see? There's
- 1:03:53, here I also made an example file with
- 1:03:55the client's email where, uh, there is
- 1:03:57the email subject.
- 1:04:00Ah, we already saw this one before.
- 1:04:02Actually,
- 1:04:03we already saw this one before. There
- 1:04:05is also another one with
- 1:04:06the price.
- 1:04:07There's also this other one here, eh? A
- 1:04:11website for a trattoria. Okay. These
- 1:04:14are two client emails, which are
- 1:04:16therefore the actual input.
- 1:04:24If, for example, here in this small
- 1:04:26company of agents we are developing, we
- 1:04:28had wanted the agent, the first agent,
- 1:04:30to go and fetch the emails directly
- 1:04:32from our Gmail account, we could have
- 1:04:35simply asked Cloud Code to interface
- 1:04:37with our account's MCP. Gmail and check
- 1:04:44every morning at 9:00 a.m. for emails
- 1:04:46and import every quote request email.
- 1:04:50Exactly. Exactly. Meaning that,
- 1:04:53obviously, we didn't go and agentize
- 1:04:55this portion of this example, but it's
- 1:04:57something that is absolutely done and
- 1:04:59must be done in these types of systems.
- 1:05:04I'm not the one reading the emails and
- 1:05:06saving them in here, but through MCP or
- 1:05:08an ad hoc script, or well, there are a
- 1:05:11thousand ways to retrieve client emails
- 1:05:13, identify the new ones, and start
- 1:05:15working on them. Now let's see, just
- 1:05:19out of curiosity, if the agents have
- 1:05:21been registered. There is a command
- 1:05:25inside Claude Code that tells us which
- 1:05:27agents are registered. Ah, yes, look,
- 1:05:31here there's analyst, archivist,
- 1:05:33planner. Then here starts a ton of
- 1:05:36those from Minimaco, let's let's skip
- 1:05:38them. An infinite list, but you see,
- 1:05:44Claude Code registered them correctly,
- 1:05:46so we have them and he can use them. If
- 1:05:53you want, I'll try to
- 1:05:54Go ahead, let's run a test.
- 1:05:57Okay. So,
- 1:06:03this is Claude Code from the terminal.
- 1:06:05Obviously, I, for example, use VS Code
- 1:06:07or perhaps there are people who use it
- 1:06:09directly from the Claude app. Exactly.
- 1:06:13Now I will tell him," Look, the tattoo
- 1:06:16studio request has arrived, the request
- 1:06:18from the client has arrived, it's here.
- 1:06:28What's it called? Request
- 1:06:33tattoostudio.md. You see, I use the at
- 1:06:36symbol, I don't know if you do it too,
- 1:06:39when I want to reference a file so that
- 1:06:41it is
- 1:06:42already inside working, right? Sure, so
- 1:06:44he's sure he doesn't have to search for
- 1:06:46it because he already knows what the
- 1:06:48path is. Eh, process it, let's see what
- 1:06:55it does. Let's try to do
- 1:06:57play-by-play commentary of what Claude
- 1:06:59is doing. Okay. He activated the read
- 1:07:04tool and read the file, and the main
- 1:07:06agent is already starting to dialogue
- 1:07:08with us, right? He says, "Look,
- 1:07:11so it's the orchestrator, this
- 1:07:12is the orchestrator, eh, says:" I'm
- 1:07:14starting the standard flow, first the
- 1:07:16analyst to produce the sheet. "Okay, he
- 1:07:18has already launched the analyst, in
- 1:07:20fact, we see it here at the bottom as
- 1:07:22well. You see that there are two agents
- 1:07:24currently working at the same time.
- 1:07:27You can also enter the analyst and you
- 1:07:29can go back to the main. I did it a bit
- 1:07:31fast just now.
- 1:07:31Okay. To see specifically the agent's
- 1:07:34work
- 1:07:34and what he is doing. Exactly. The
- 1:07:38analyst is at work on the Ago
- 1:07:40Inchiostro request. As soon as he
- 1:07:44delivers the card, remember the analyst
- 1:07:46extracts the requests from the client's
- 1:07:48instance and passes them in parallel to
- 1:07:50the estimator and the planner.
- 1:07:53Because they had to work simultaneously
- 1:07:55.
- 1:07:55Because they had to work simultaneously
- 1:07:57for the sake of process optimization,
- 1:07:59right? So here too, there is the effort
- 1:08:01of determining what can be done
- 1:08:02simultaneously in my company to avoid
- 1:08:05wasting time, and what cannot. In fact,
- 1:08:08you can see down here that the
- 1:08:10estimator has been activated, and now
- 1:08:15the planner too, do you see? So now
- 1:08:18there is the main one, and there are
- 1:08:20two others working in parallel. Uh, by
- 1:08:24the way, it says it here, there are two
- 1:08:26agents in the background, so right now
- 1:08:28we have three working. Tattoo site
- 1:08:32estimate, planning, and scheduling the
- 1:08:34timeline for the site. And so, and so
- 1:08:40basically, every time I have to figure
- 1:08:42out whether to choose to have my agents
- 1:08:44work in parallel or sequentially, right
- 1:08:46? So what I do in parallel is have them
- 1:08:49do things that are not interdependent
- 1:08:51on one another. So, for example, if I
- 1:08:56have a client and for that client I
- 1:08:57have to develop a website design and
- 1:08:59then some social media graphics, these
- 1:09:01two things are not necessarily
- 1:09:03interdependent, so I can have two
- 1:09:05separate processes. But if for the same
- 1:09:09site I have to develop the copy and the
- 1:09:11design, obviously the designer will
- 1:09:13wait to start and will wait for the
- 1:09:15copywriter's work, who sends them the
- 1:09:16copy and the text to put on the web
- 1:09:18pages, because it wouldn't make sense
- 1:09:20to start designing if you don't first
- 1:09:22know how much text has to go in, how
- 1:09:23many sections, what is written, and so
- 1:09:25on, right? Exactly. This is a typical
- 1:09:33way of proceeding in architectural
- 1:09:35planning that is very, very important,
- 1:09:37and considering that these systems can
- 1:09:39parallelize hundreds of processes
- 1:09:41simultaneously, the more we can
- 1:09:42parallelize, the more efficiency and
- 1:09:44effectiveness we have. Okay? So I gave
- 1:09:51this example precisely because the
- 1:09:53effort we were talking about earlier on
- 1:09:54the part of the entrepreneur to
- 1:09:56understand how their own company works,
- 1:09:58identifying these important nodes
- 1:09:59ensures that the agentic construction
- 1:10:01by the software house or the programmer
- 1:10:03building it for you is even more
- 1:10:04effective, right? So if we remember to
- 1:10:08tell them, look, these things can be
- 1:10:10done together,
- 1:10:11it already knows and develops them in
- 1:10:13parallel.
- 1:10:14Let me ask you a question. Go ahead.
- 1:10:18Uh, when I work with Cloud Code,
- 1:10:19working inside VS Code, I usually have
- 1:10:21my screen where I see the files on the
- 1:10:23right, I have my chat on the left, and
- 1:10:25look, I can even show it to you. I'll
- 1:10:29share my screen too.
- 1:10:30Yes.
- 1:10:31Uh, share screen, window, vscode. Here
- 1:10:35it is. So you see it appearing. No,
- 1:10:38wait, I need to show it here. Wait. Ok,
- 1:10:42here it is. Add to stage. I'll remove
- 1:10:45yours for a second. I'll add mine. Here
- 1:10:47I have my Cloud Code, and as you can
- 1:10:49see, on the right, I have the chat with
- 1:10:51Cloud, right? And on the left, I have
- 1:10:53the entire structure of my Cloud folder
- 1:10:55, and here I have an open document.
- 1:10:59If I start chatting here, for example,
- 1:11:01I can write: start two agents in
- 1:11:03parallel. One, uh, executes executes
- 1:11:09skill. Hello world. The other one does
- 1:11:19a Reddit search on the news I'm
- 1:11:21interested in today, right? This way,
- 1:11:28uh, he will launch, I think two, or
- 1:11:30maybe he'll ask me questions before
- 1:11:32launching one of them if he needs more
- 1:11:34context. What I'm wondering is, right
- 1:11:38now I've started two agents in parallel
- 1:11:40, if they start, right? Now he will
- 1:11:41reason. I imagine that right now I'm
- 1:11:43talking to Cloud Code. Cloud Code will
- 1:11:45understand what I asked him, he will
- 1:11:46ask me questions, or rather, he will
- 1:11:48launch the two agents in parallel
- 1:11:49immediately to do these two things. My
- 1:11:51hello world skill does a ton of stuff,
- 1:11:53and even there I have agents that are
- 1:11:55launched in sequence instead. What I'm
- 1:11:59wondering is, if instead of doing this
- 1:12:01thing here, which I'll stop now, I had
- 1:12:03done two different chats, so here I
- 1:12:04said hello world, so the skill starts,
- 1:12:06and then I start a new chat and ask
- 1:12:08something else here, would anything
- 1:12:10have changed compared to launching two
- 1:12:12agents in parallel?
- 1:12:15Uh, they don't have they can't share
- 1:12:17the context if you launch two instances
- 1:12:19of Cloud Code. Ok. Basically, yes.
- 1:12:23Basically, the convenient thing is that
- 1:12:24if I do everything in a single chat,
- 1:12:26the moment the two agents return from
- 1:12:28the orchestrator agent, so in the chat,
- 1:12:30and give me the two responses, at that
- 1:12:32point in the chat I have the double
- 1:12:34context of both agents and I can work
- 1:12:36simultaneously on the context that is
- 1:12:37returned to me.
- 1:12:39is returned to me. Ok. The important
- 1:12:43thing to say about eh parallel agents
- 1:12:45is that the important rule is that you
- 1:12:48need to be sure they don't go and do
- 1:12:50the same thing, or for example, go and
- 1:12:52modify the same file. Ok? This is a
- 1:12:56typical software engineering topic;
- 1:12:58it's called a race condition, ok? So,
- 1:13:03to work in parallel, you must be sure
- 1:13:05they don't do the same thing, otherwise
- 1:13:07you might find your output ruined
- 1:13:09because both agents didn't know the
- 1:13:11other one was also working on that file
- 1:13:13. Ok?
- 1:13:16So,
- 1:13:18they work very well if they are eh if
- 1:13:20they are completely separate.
- 1:13:23Yes. Ok. Let's go back to our eh friend
- 1:13:27, and see what he is doing.
- 1:13:29Actually, our friend has finished.
- 1:13:31Ok, let's see. So,
- 1:13:33our friend has finished. Now let's see
- 1:13:36a bit what he told us, eh. He says:"
- 1:13:38Chain completed, offer ready and filed
- 1:13:41in summary, base total 2600 VAT, bla
- 1:13:44bla bla ". Request sheet: so it
- 1:13:49summarizes what the analyst produced,
- 1:13:51the constraints eh contained in the
- 1:13:53client's request, open questions (for
- 1:13:55example, something that was not clear
- 1:13:57from the from the from the client's
- 1:13:59request), the quote calculated based on
- 1:14:02the price list in a deterministic way,
- 1:14:09time plan. The planner, so earliest
- 1:14:11useful date, calculated the first
- 1:14:13available start date based on
- 1:14:15commitments, ok? Eh, the standard
- 1:14:19duration and the delivery also based on
- 1:14:21the company holidays.
- 1:14:24Ah.
- 1:14:25Eh, and so he did he did everything and
- 1:14:27also created the email. Ok. So the
- 1:14:29email,
- 1:14:30by the way, I also found the verdict
- 1:14:32with the whole scope: by August 29th we
- 1:14:33can't make it. We can make it if the
- 1:14:35bookings slide to phase two, so site
- 1:14:37online Friday, August 28th
- 1:14:39the day before the convention. Booking
- 1:14:41Friday 4th week. Ok. Ok. Perfect. And
- 1:14:45so he created, then he went to create
- 1:14:47this file inside offers, he created he
- 1:14:49created it here which is the equivalent
- 1:14:51. This too is also written in Markdown.
- 1:14:58But you see, this is the output of this
- 1:15:00agentic work which seems trivial, but
- 1:15:02it is an email written with language,
- 1:15:04with language that was chosen in the
- 1:15:06ways that were chosen, which reasoned
- 1:15:08on the client's request, which reasoned
- 1:15:10on the company's prices, which reasoned
- 1:15:13on company availability, it is work.
- 1:15:16Whoever has
- 1:15:17Sure. Whoever is a freelancer or
- 1:15:19whoever has a small agency, small or
- 1:15:21large, knows that this is the result of
- 1:15:23work. If this work is done well by a
- 1:15:25team of agents, it really saves a lot
- 1:15:27of time and provides high quality. The
- 1:15:30price is the analysis we saw earlier
- 1:15:32and the implementation of the code we
- 1:15:34have seen until now.
- 1:15:36Yes, by the way I want to say one thing
- 1:15:38because very often people come to me
- 1:15:40and say" Yes, but it seems like super
- 1:15:42complex stuff to me ". Actually, very
- 1:15:44often everything we have seen now can
- 1:15:46Cloud Code teach us how to do it, or is
- 1:15:48it Cloud itself that does it for us? It
- 1:15:52is obvious, however, that it is always
- 1:15:54important to have awareness of what one
- 1:15:56is doing and what all the processes are
- 1:15:58that should be delegated to Cloud Code.
- 1:16:02As long as we're doing Cloud, as long
- 1:16:03as we're doing things that aren't too
- 1:16:05complex, it's unlikely we'll build
- 1:16:07anything dangerous, but obviously, what
- 1:16:09can be dangerous is wasting a lot of
- 1:16:10time doing something that doesn't work
- 1:16:12the way we want. And earlier, I was
- 1:16:24looking for a message I received
- 1:16:26earlier from someone, because I had
- 1:16:27mentioned we were going to make this
- 1:16:29video, and there was a person who
- 1:16:31criticized me, saying:" Yeah, it's all
- 1:16:33nice, but the truth is there's a lot of
- 1:16:34wasted time because, more often than
- 1:16:36not, these processes we try to delegate
- 1:16:38to AIs don't bring the results we dream
- 1:16:40of, because the complexity of all the
- 1:16:42things that need to be added time and
- 1:16:43again to patch up what doesn't work
- 1:16:45often takes more time than we would
- 1:16:47spend doing things the way we wanted
- 1:16:49ourselves. "I'm looking for the little
- 1:16:59message, let's see if I find it.
- 1:17:01Lorenzo, maybe it was this one. No, it
- 1:17:04wasn't this one either. Nothing, I
- 1:17:06can't find it. Too many messages lately
- 1:17:09, but hey,
- 1:17:11let's say it's a fair objection, in the
- 1:17:13sense that it requires you to reflect
- 1:17:15on whether the game is worth the candle
- 1:17:17. Okay? So, if I tell you:" Look, I
- 1:17:21need to cross the street, go here and
- 1:17:23there, "and you say:" Well, maybe it
- 1:17:25would be cool to do it on a Vespa, but
- 1:17:27I don't have a Vespa, let me wait to
- 1:17:29buy it, have it delivered, just to
- 1:17:30cross the street, "maybe it's overkill.
- 1:17:35But if I have to go to work every day,
- 1:17:37and my work is 25 km away in traffic,
- 1:17:39then probably buying that Vespa, which
- 1:17:42costs me time, money, effort, etc., has
- 1:17:44long-term value for me. Anyway, that's
- 1:17:49how I see it. What I realize is that
- 1:17:52what really makes the difference in my
- 1:17:54specific case is working in an
- 1:17:56extremely granular way.
- 1:18:00I mean, I see many people trying to
- 1:18:01build macro-roles like" you are my
- 1:18:03assistant for developing my social
- 1:18:05media editorial plan. "" Every day you
- 1:18:11have to find good ideas that I can
- 1:18:13bring into my content work, "and then
- 1:18:15you propose 10 ideas and they're, well,
- 1:18:17they're crap. Instead, what I realized
- 1:18:22is that I built many small agents that
- 1:18:24run every day and have specific
- 1:18:26functions. So, for example, I used to
- 1:18:29think that something I wasted a lot of
- 1:18:31time on was catching up and looking at
- 1:18:33all the news; I had to go to every site
- 1:18:35that interested me, Reddit, The
- 1:18:37Economist, The Atlantic, and so on. Now
- 1:18:41I've built a series of agents that go
- 1:18:43to all these sites every morning,
- 1:18:44analyze every post that has come out,
- 1:18:46and they know. I gave them a list of
- 1:18:50all the sources I'm interested in, all
- 1:18:52the subreddits that interest me most,
- 1:18:54the topics I find most fascinating, and
- 1:18:56so on. So, based on this dataset and
- 1:19:01the information I provided, they
- 1:19:02analyze all the posts and give me only
- 1:19:04the 50 news items or 50 posts worth
- 1:19:06opening, with a short brief on what's
- 1:19:08written and so forth. For me, this is
- 1:19:15super effective because over time it
- 1:19:16started saving me a lot of time, and
- 1:19:18then I began to transform it all
- 1:19:20because, in the beginning, it was just
- 1:19:22a small list I received in a daily MD
- 1:19:24format. In my offline database. Then,
- 1:19:32over time, I started making it more
- 1:19:33complex, eventually building much more
- 1:19:35sophisticated things like the one I
- 1:19:37showed you the other time, which is my
- 1:19:39information supply source that I called
- 1:19:41a dashboard. Now let's see if I can
- 1:19:45share it here. Um, okay, I need to stop
- 1:19:48yours for a second. I'll activate mine,
- 1:19:51which is this one, right? If I analyze
- 1:19:53it this way, it seems like a super
- 1:19:55complex thing, and, in fact, it is.
- 1:19:57It's quite complex if you look at it,
- 1:19:59let's say, in its entirety. But what I
- 1:20:04mean is that to get to having developed
- 1:20:06this over time, I built all the little
- 1:20:08grains that do small things, which then
- 1:20:10, once I validated the various things
- 1:20:12—like the agent analyzing Reddit,
- 1:20:14boom, it worked for four weeks, that
- 1:20:16one's set. Then I made the agent that
- 1:20:22somehow has to manage to catalog the
- 1:20:24information, decide which is a target,
- 1:20:26which has a higher potential for
- 1:20:28virality, which could get more
- 1:20:29engagement if I talk about that news
- 1:20:31item. And having validated that, I
- 1:20:35moved on to the next one, until I put
- 1:20:37together this thing that is now online
- 1:20:39and available to the team of marketers
- 1:20:41working in the company, which, however,
- 1:20:43seen like this, looks very difficult.
- 1:20:49If I had started with this idea in mind
- 1:20:51from the beginning and said," Wait, let
- 1:20:53me build all of this, "it probably
- 1:20:54would have turned out like crap,
- 1:20:56because the moment you start wanting to
- 1:20:58put everything together to build a
- 1:21:00giant project, you usually can't
- 1:21:01achieve that level of detail and depth
- 1:21:03in the processes, roles, and so on,
- 1:21:05which are necessary to slowly build up
- 1:21:07the broader vision. So, exactly
- 1:21:12returning to the architecture parallel,
- 1:21:14if you want to build Notre-Dame, you
- 1:21:16need foundations. If you want to end up
- 1:21:18developing something more complex, at
- 1:21:20the beginning you must first ask
- 1:21:21yourself: what do I want to start from?
- 1:21:23What are the foundations? What are the
- 1:21:26main roles, the main actors—in this
- 1:21:27case, the main agents—that I need to
- 1:21:29develop those small things I want to
- 1:21:31start with today? And so, if I'm an
- 1:21:37entrepreneur, if I start again from
- 1:21:39process mapping, maybe I find that
- 1:21:41there's a professional or an agency; I
- 1:21:43discover there are extremely
- 1:21:45deterministic processes where little
- 1:21:47creativity comes into play, which are
- 1:21:49easily describable and transformable
- 1:21:51into written procedures that, then, if
- 1:21:53taken and passed to an agent
- 1:21:54circumscribed within its perimeter—
- 1:21:56you know, of action, instruction, etc.
- 1:21:59—become very easy to, uh, delegate.
- 1:22:04If, on the other hand, I start from" I
- 1:22:07want to make my personal assistant that
- 1:22:09helps me manage social media for me,
- 1:22:11make content "and I enter, correct me
- 1:22:13if I'm wrong, an extremely
- 1:22:14probabilistic environment where it
- 1:22:16becomes very easy, uh, to build
- 1:22:18something complex that runs every day,
- 1:22:20costs me tokens, costs me money, costs
- 1:22:22me effort, and I look at the output and
- 1:22:25say:" Meh, that wasn't what I imagined.
- 1:22:27"
- 1:22:27Yeah, yeah, yeah, yeah. In the sense
- 1:22:30that this architectural effort is
- 1:22:32important; so, on one hand, having the
- 1:22:34general image of what we want to do,
- 1:22:36but knowing that it's impossible to
- 1:22:38generate it from 0 to 100 in a second.
- 1:22:40So, isolating the components,
- 1:22:42modularizing, starting to run tests
- 1:22:44with small modules starting from those
- 1:22:47that are most useful, those that solve
- 1:22:50my biggest emergencies, those that seem
- 1:22:52clearest to me; playing, trying to
- 1:22:55develop them, implementing them and, uh
- 1:22:57, once you have 1, 2, 3, 4 working.
- 1:23:00Then, at that moment, you say," Maybe
- 1:23:02putting them together, orchestrating
- 1:23:04them, making them act together can
- 1:23:07start to mean agentizing my work in a
- 1:23:09complete way. "
- 1:23:11But 100%.
- 1:23:13Hey! Pietro, we've been together for an
- 1:23:15hour and 23.
- 1:23:17It flies! I don't know, I don't know if
- 1:23:19there's anyone who made it to the end
- 1:23:20and got this far. In that case, guys,
- 1:23:22we want to say thanks. Thank you for
- 1:23:24being with us, and we hope we've given
- 1:23:26you something of value, a series of
- 1:23:28directions and information that, in my
- 1:23:30opinion, have been useful both for
- 1:23:31beginners and for those who are perhaps
- 1:23:33already halfway through their work and
- 1:23:35are experimenting in the agentic world;
- 1:23:37still, you know, having some structure
- 1:23:39in the information, in learning things,
- 1:23:41always helps. Let us know if you want
- 1:23:44more tutorials and maybe we can go even
- 1:23:46more into specifics, if you want
- 1:23:48simpler or more advanced stuff, if it
- 1:23:50was at your level or if you found it
- 1:23:51too complex. We thank you and we'll see
- 1:23:53you in the next episode. Pietro, thank
- 1:23:55you.
- 1:23:55Bye. Thanks a lot. Bye Dario, thanks to
- 1:23:57you.
- 1:23:57Bye. Bye everyone. Bye. Bye.
About this transcript
This page contains the full transcript of Come creare un'azienda agentica con gli Agenti AI di Claude Code 😎 by Dario Vignali, generated from the public captions YouTube serves with the video. The transcript has 13,283 words across 2,054 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.