Agentic AI

Foundations Of Agentic AI

From Traditional AI to Agentic AI

Each era subsumes the previous one rather than replacing it. An agent investigating a transaction will call a fraud classifier (traditional) and write the escal

JrCodex·6 min read

Jr Codex Agentic AI Notes

Level: Beginner Prerequisites: None Time to complete: ~15 minutes


Table of Contents

  1. Three Eras, One Lineage
  2. What Each Era Could Not Do
  3. The Actual Change
  4. The Same Task, Three Ways
  5. Why Now
  6. Summary & Next Steps

1. Three Eras, One Lineage

The Progression
─────────────────────────────────────────
  TRADITIONAL AI     PREDICTS
                     input ──► label or number
                     "is this transaction fraud?"

  GENERATIVE AI      PRODUCES
                     prompt ──► content
                     "write the fraud alert email"

  AGENTIC AI         ACTS
                     goal ──► a SEQUENCE of decisions
                     and actions in an environment
                     "investigate this transaction and
                      escalate if warranted"
─────────────────────────────────────────

Each era subsumes the previous one rather than replacing it. An agent investigating a transaction will call a fraud classifier (traditional) and write the escalation summary (generative). Agentic AI is a layer of orchestration on top, not a competing technique.


2. What Each Era Could Not Do

The clearest way to see the boundary is by what each is structurally incapable of.

Traditional AI cannot...
─────────────────────────────────────────
  decide WHICH question to ask. A fraud model
  answers exactly one question, on data you hand it
  in exactly the right shape.
Generative AI cannot...
─────────────────────────────────────────
  find out anything it was not told. Ask an LLM to
  "check whether this customer has prior disputes"
  and it will produce a fluent, plausible answer
  built on nothing — because producing text is the
  only action available to it.
Agentic AI closes that gap by...
─────────────────────────────────────────
  giving the model ACTIONS, and letting it choose
  among them repeatedly based on what it learns.

  The model can now say "I do not know, so I will
  look it up" — and then actually look it up.
─────────────────────────────────────────

That last line is the whole idea. Everything else in this curriculum is machinery to make it reliable.


3. The Actual Change

Three things become true when a model can act, and each creates work that did not exist before.

1. THE OUTPUT IS NO LONGER THE END
─────────────────────────────────────────
  Generative: the model produces text, a human reads
  it, the interaction ends. A bad answer is discarded.

  Agentic: the model produces an ACTION whose RESULT
  feeds the next decision. A bad action is not
  discarded — it is built upon.

  Errors COMPOUND rather than terminate.
2. THE NUMBER OF STEPS IS NOT KNOWN IN ADVANCE
─────────────────────────────────────────
  You cannot price, time-bound, or fully test a
  process whose length the model decides at runtime.

  Everything about cost control (Module 7) and
  budgets follows from this.
3. THE CONSEQUENCES LEAVE THE CONVERSATION
─────────────────────────────────────────
  A bad paragraph is a bad paragraph. A bad action
  is a sent email, a deleted record, a placed order.

  This is why Module 8 exists as a full module, and
  why "just add a confirmation step" is a design
  decision rather than a detail.
─────────────────────────────────────────

4. The Same Task, Three Ways

# TRADITIONAL — a fixed function answering one fixed question.
def is_fraud(transaction) -> bool:
    return model.predict(featurize(transaction))[0] == 1
# GENERATIVE — produces text about the transaction, and NOTHING ELSE.
def summarize(client, transaction) -> str:
    return client.chat.completions.create(
        model="gpt-4o-mini",
        messages=[{"role": "user",
                   "content": f"Summarise this transaction:\n{transaction}"}],
    ).choices[0].message.content
    # It CANNOT check the customer's history — it has no way to look.
# AGENTIC — the model chooses actions until the goal is met.
def investigate(client, transaction, tools, max_steps=8):
    messages = [
        {"role": "system", "content": "Investigate the transaction. Gather evidence "
                                      "with the tools before reaching a conclusion."},
        {"role": "user", "content": str(transaction)},
    ]
    for step in range(max_steps):                 # BOUNDED — see Section 3, point 2
        reply = client.chat.completions.create(
            model="gpt-4o", messages=messages, tools=tools.schemas,
        ).choices[0].message
 
        if not reply.tool_calls:                  # the model decided it has enough
            return reply.content
 
        messages.append(reply)
        for call in reply.tool_calls:             # ACT, then feed the result back
            result = tools.run(call.function.name, call.function.arguments)
            messages.append({"role": "tool", "tool_call_id": call.id,
                             "content": str(result)})
 
    return "Investigation incomplete: step limit reached."
What the Third Version Bought, and Cost
─────────────────────────────────────────
  BOUGHT   the model can now check dispute history,
           look up the merchant, compare against
           prior patterns — and DECIDE which of
           those is worth doing for THIS case

  COST     a loop with no fixed length, a
           non-deterministic sequence of real calls,
           an unpredictable bill, and errors that
           compound step over step
─────────────────────────────────────────

Both columns are the subject of this curriculum. The capability is easy; the second column is the engineering.


5. Why Now

Agents are not a new idea — the AI Notes date the perceive-decide-act framework to the foundations of the field. Three specific capabilities arrived recently enough to make LLM-driven agents work.

The Three Enablers
─────────────────────────────────────────
  RELIABLE STRUCTURED OUTPUT
    An agent must emit a machine-parseable action
    every single step. Prompt-and-parse was too
    fragile; constrained decoding (Gen AI Notes,
    Module 2, Chapter 3) made the loop possible.

  LONG CONTEXT
    The loop resends its entire history each step.
    At 4k tokens an agent forgot its own goal by
    step three. At 128k+ a real trajectory fits.

  INSTRUCTION FOLLOWING
    A model that reliably obeys "use a tool if you
    are unsure" is what makes the DECIDE step
    trustworthy enough to build on.
─────────────────────────────────────────
The Honest Framing
─────────────────────────────────────────
  Nothing about the agent LOOP is new or clever. It
  is a while-loop around an LLM call.

  What changed is that the model inside it became
  reliable enough that the loop terminates usefully
  more often than not.

  "More often than not" is doing heavy lifting in
  that sentence — which is why Modules 7 and 8 are
  about measuring and containing the rest.
─────────────────────────────────────────

6. Summary & Next Steps

Key Takeaways

  • The three eras layer rather than replace: agents call classifiers and generate text, adding orchestration on top.
  • Traditional AI cannot choose which question to ask; generative AI cannot find out anything it was not told; agents close that gap by having actions to choose among.
  • Acting changes three things — errors compound instead of terminating, step count is unknown in advance, and consequences leave the conversation.
  • The agent loop itself is trivial; what made it viable was reliable structured output, long context, and instruction following.

Concept Check

  1. Why can a generative model asked to "check the customer's dispute history" produce a confident answer that is entirely fabricated?
  2. Explain why errors in an agentic system compound in a way that errors in a generative system do not.
  3. Which of the three enablers most directly explains why agents were impractical with a 4,000-token context window?

Next Chapter

Chapter 2: What Makes a System Agentic


Jr Codex — 1-on-1 Personalized Coaching | Back to Module Index | Back to Agentic AI Index