DEV Community

Alejandro Hernández
Alejandro Hernández

Posted on

Agents Don't Start with Prompts. They Start with Events.

Lately, it seems like everything is an agent. Open LinkedIn and you'll
find posts about AI Agents. Go to YouTube and you'll see tutorials on
LangChain, OpenAI Agents, CrewAI, AutoGen, and a long list of frameworks
promising to build autonomous agents capable of performing complex
tasks.

After consuming enough of this content, it's easy to conclude that an
agent is simply an LLM connected to a set of tools. From my perspective,
that's the wrong way to think about it.

Most diagrams look something like this:

Prompt
  ↓
LLM
  ↓
Tool
  ↓
LLM
  ↓
Response
Enter fullscreen mode Exit fullscreen mode

There's nothing inherently wrong with this model. In fact, it's
extremely useful for solving a wide range of problems. The problem
begins when we confuse one implementation pattern with the complete
definition of an agent.

To understand why, let's think about something millions of people do
every day: hiring.

When someone applies for a job, an important fact has occurred. Someone
submitted an application, and the recruiting process has begun. From
that moment on, many things can happen: the resume is analyzed, an
interview is scheduled, feedback is collected, experience is validated,
an offer is approved, and eventually a decision is made.

If we represented that process as events, it might look something like
this:

CandidateApplied
        ↓
ResumeAnalyzed
        ↓
InterviewScheduled
        ↓
InterviewCompleted
        ↓
FeedbackReceived
        ↓
OfferSent
Enter fullscreen mode Exit fullscreen mode

Now let's ask an interesting question: where is the agent?

Under the current popular paradigm, we might say the agent is the model
that analyzed the resume. But that explanation is incomplete. Resume
analysis represents only a small part of the overall process. The
complete system observed new information, evaluated the current
situation, and executed actions to move the process forward.

In other words, the agent didn't appear when someone wrote a prompt.
The agent started acting when an event occurred.

This distinction may seem subtle, but it completely changes how we
design systems.

A recruiter doesn't wake up in the morning waiting for prompts. They
receive events. A candidate applies for a job. An interviewer submits
feedback. A manager approves a hire. A candidate rejects an offer. Each
new fact changes the state of the process and creates the need for new
decisions.

The same thing happens in almost every organization. A customer sends an
email. A payment is approved. A shipment changes status. A document is
uploaded. A support ticket is created.

The real world is made of events, not prompts.

Of course, an AI model may become involved at some point. It might
analyze a resume, classify an email, summarize a document, or determine
a customer's intent. It might even be an LLM. But regardless of the
technology being used, the agent is still the complete system. The model
participates in a decision; it doesn't define the agent by itself.

Imagine, for example, that a model analyzes a resume and determines that
the candidate meets the minimum requirements for the position. The
important output isn't the textual response generated by the model. The
important output is the new fact that was discovered:

ResumeAnalyzed
CandidateQualified
Enter fullscreen mode Exit fullscreen mode

From that point, the system can continue operating. It can schedule an
interview, request additional information, or notify the recruiter. The
model participated in a decision, but the overall flow remains
event-driven.

And this is where I think a more useful definition of an agent begins to
emerge.

If we look at the complete process, the agent isn't constantly producing
responses. It's observing facts, evaluating information, and generating
new facts that allow the process to continue moving forward.

  • A candidate applies for a job.
  • That produces new information.
  • That information is evaluated.
  • The evaluation produces a new fact: the candidate qualifies for the position.
  • That new fact triggers new decisions.
  • An interview is scheduled.
  • Feedback is collected.
  • An offer is recommended.

Each decision generates new facts that feed the next step in the
process.

From this perspective, an agent stops looking like a conversation with
tools and starts looking like an event-driven decision-making
system
.

Those decisions can be made using business rules, machine learning
models, LLMs, or a combination of them. The important thing isn't the
technology used to make the decision. The important thing is that there
is a system capable of observing what happens, evaluating the available
information, and reacting accordingly.

I think this is where the current conversation about agents becomes
confusing. We've spent enormous amounts of time talking about prompts,
tool calling, context windows, and reasoning, but relatively little time
talking about what causes an agent to act in the first place.

Because before a prompt exists, something has usually already happened:

  • A customer sent a message.
  • A document was uploaded.
  • A payment was approved.
  • An order was created.

The event is the trigger. The prompt, when one exists, is simply a
tool used during the evaluation process.

That's why I'm increasingly convinced that we've started this
conversation from the wrong end. Agents are much more than prompt
workflows connected to tools. They are systems that observe events, make
decisions, and execute actions.

Some of those decisions may be made by business rules. Others by machine
learning models. Others by LLMs. What matters is that the agent isn't
defined by the technology used to make a decision, but by its ability to
react to what happens.

Maybe we're not just beginning to build agents. Maybe we've been
building them for years, and we've simply added new tools that help them
make better decisions.

Prompts matter. LLMs matter too. But neither answers the fundamental
question:

What caused the agent to act?

Most of the time, the answer isn't a prompt. It's an event.

Agents don't start with prompts. They start with events.

Top comments (0)