Agentic Developer: Zero to Advanced, Part 1: Why Agentic AI, Why X-ray Defect Detection

Setting up the running example the rest of this series builds on

agentic-ai
langgraph
computer-vision
synthetic-data
python
Author

Hasan Goni

Published

September 5, 2026

Modified

October 18, 2026

Tip

This post is part of the Agentic Developer: Zero to Advanced series.

Note

Rewritten on 2026-10-18. The first version of this series ran on the public GDXray casting radiographs. GDXray is free for research and education only and does not allow redistribution, so I should not have shown its images on a public blog. Every post in the series was redone on a synthetic dataset that I generate myself, with fresh runs and new numbers. Where a conclusion changed, the post says so.

I already have an Agentic Development series on this blog. That one exists because I went through Andrew Ng’s Agentic AI course and rebuilt every example around my own work: semiconductor X-ray void detection, following the course’s own five modules, then four more posts past where the course stops. It assumes you already know roughly what an agent is. And it uses proprietary imagery – you can’t actually run the code yourself.

This series starts from zero instead. A dataset you can regenerate yourself in under half a minute, so every example is something you can run. And it goes deeper into the actual framework mechanics – LangGraph, Deep Agents – than a course survey has room for. Same author, same interest in defect inspection, just a different starting point and more ground covered. If you’ve read the other series, some of Arc 1 and Arc 2 here will feel familiar. If you haven’t, that’s fine too.

The full roadmap is on the series index – 30 posts across six arcs plus a capstone, plus a companion series that ports the same architecture to supply chain. This post does two things: says what “agentic” actually buys you over a plain LLM call, and explains why X-ray defect detection beats the usual chatbot demo as a teaching example.

0.1 What “agentic” actually buys you

A plain LLM call is one-shot. You send a prompt, you get text back, and whatever happens next is on you to code. An agentic system adds three things on top of that:

  • It acts. It calls real functions – a detector model, a database query, a rule check – instead of just describing in prose what it would do.
  • It iterates. It looks at what its own tool call returned and decides whether that’s good enough, or whether something needs to happen again with different inputs.
  • It decides. It chooses what happens next based on that output, instead of you hard-coding every branch in advance.

None of that needs a fancy framework. You could write the loop yourself in twenty lines of Python: call a tool, check the result, ask the LLM what’s next, repeat. LangGraph (which this series leans on from Arc 2 onward) exists to keep that loop’s state, branching, and retries manageable once you’ve got more than a couple of steps – not because the idea itself is complicated.

Drag the slider below to compare the two shapes directly: a plain call is a dead end after one box; an agentic loop keeps circling back until the decision itself says “stop.”

left: a plain LLM call (one shot, dead end)  |  right: an agentic loop (acts, observes, decides, repeats)

0.2 Why not another chatbot demo

Most agentic AI content reaches for the same examples: a customer-support bot, a research assistant, a coding helper. Fine for showing off conversation. Bad for showing off the part that actually matters in production – a decision with real consequences at the end of the tool call.

X-ray defect detection has that built in:

  • A CV baseline already exists. Object detection and defect classification on X-ray images is a mature field, so Arc 1 can put a real, non-agentic model in front of you on day one – something to compare every later agentic layer against, instead of taking it on faith.
  • The output has a natural pass/fail shape. “Is this defect real, how severe is it, does it need to be flagged for a human” is exactly the kind of structured decision an agent’s tool-use and planning patterns are built for – much closer to a real inspection workflow than “write me a poem.”
  • It stays reproducible. No proprietary data, no NDA-covered imagery. The dataset is generated by code in the repo, so every example is something you can actually clone and run – the biggest gap in the older series.
  • It generalizes on purpose. The companion supply-chain series exists to prove that none of the architecture built here is actually about X-rays – swap the tools and the data, keep the graph.

0.3 The dataset: synthetic voids with exact masks

The running example is a synthetic X-ray void dataset that I generate with a short script. A Fashion-MNIST silhouette (a shirt, a sandal, a boot) plays the metal part. Its grey level is used as the part’s thickness, voids are cut into it by removing thickness, and the image is rendered with Beer-Lambert attenuation, blur, gain drift and noise. That gives 4,000 images of 224 by 224 pixels with an exact mask for every void, split by source shape into 2,800 train, 600 validation and 600 test images.

Why synthetic, and why this way:

  • The licence is clean. The generator is my code (MIT), the silhouettes come from Fashion-MNIST (MIT), and the images can be shown on a public blog. I tried real casting radiographs first and could not keep using them: the licence does not allow redistribution.
  • The ground truth is exact. Because I made the voids, every box and mask is right, and the dataset records each void’s contrast and size, so a failure can be sliced and explained.
  • It is honestly unrealistic. Shirts are not castings and the voids are smooth. The numbers in this series say how a pipeline behaves on this data, not on a production line. The dataset post lists exactly where it differs from real X-rays.

How the dataset is built has the whole recipe, the code and the checks. Throughout the series the val split is the dev set (every choice is made there) and the test split is the held-out set (looked at once per question).

0.4 Jargon, explained simply

Agentic AI. An LLM given the ability to call real functions and decide what happens next, instead of only producing text in response to a single prompt. Daily-life version: a cookbook can only ever tell you what to do; a smart oven that turns itself on, checks the cake at the 20-minute mark, and gives it five more minutes because it’s still wobbly is agentic. Same recipe, but one of them actually bakes the cake.

Tool calling. The mechanism by which an LLM invokes a real function (a detector model, a lookup, a calculation) and gets a real result back, rather than describing what it would do. Daily-life version: asking a friend what the weather looks like (“probably sunny”) versus asking a friend who actually walks outside, checks, and tells you it’s raining right now. The second friend used a “tool” – their own eyes – instead of guessing from memory.

LangGraph. A library for building agent control flow as an explicit graph of state and nodes, so branching, retries, and multi-step pipelines don’t have to live in ad hoc if statements. Daily-life version: a recipe card with numbered steps and a decision box (“if the toothpick comes out wet, go back to step 4”) beats holding the whole recipe and every “what if” in your head at once – same idea, applied to an agent’s steps instead of a cake’s.

Baseline model. A plain, non-agentic model run first, specifically so every later agentic addition has something concrete to be compared against. Daily-life version: the 5k time you ran before you hired a running coach. Every week after that, “better” only means something because you know the number you started from.

Structured output. A model response constrained to a defined shape (JSON with specific fields, for example) rather than free-form prose, so downstream code can reliably parse it. Daily-life version: a tax form with labeled boxes for name, income, and date, instead of a rambling free-text letter explaining your finances – the person (or program) on the other end can process a filled-in box far more reliably than prose.

Synthetic dataset. Data generated by a program instead of collected from the world, so the right answer is known exactly. Daily-life version: a flight simulator. The “weather” is made up, which is the point: you know precisely what you put in, so you can check what the pilot did with it. It is not the sky.

0.5 What’s next

Part 2 loads the synthetic dataset, runs a plain CV detection model with no agent anywhere in sight, and establishes the ground-truth baseline every later post in Arc 1 and Arc 2 gets compared against.

Reuse

Citation

BibTeX citation:
@online{goni2026,
  author = {Goni, Hasan},
  title = {Agentic {Developer:} {Zero} to {Advanced,} {Part} 1: {Why}
    {Agentic} {AI,} {Why} {X-ray} {Defect} {Detection}},
  date = {2026-09-05},
  langid = {en}
}
For attribution, please cite this work as:
Goni, Hasan. 2026. “Agentic Developer: Zero to Advanced, Part 1: Why Agentic AI, Why X-Ray Defect Detection.” September 5.
Free email course · 7 days

Industrial Vision Foundations

AI can write the code, but someone still has to know which method fits a real inspection line. One short lesson a day for 7 days on the classical computer vision techniques that still run production systems.

Runnable code in every lesson. No spam, unsubscribe any time.

Questions, corrections or feedback?

Found a mistake, or want a topic covered next? Leave a comment below (sign in with GitHub), or write to hasanme1412@gmail.com. I read everything.