firaz.
← writing
agentsJun 5, 2026·2 min read

stop treating ai like a magic trick. treat it like software.

the reason most ai agents become unmaintainable is that people build them as clever prompts instead of as software. the fix isn't a better model — it's engineering discipline you already know.

the most useful thing i've read about ai agents lately wasn't a launch or a benchmark. it was a complaint: "we are treating ai like a magic trick instead of software, and it's making agents unmaintainable."

that's the whole problem in one sentence. and it's why so many impressive demos turn into messes nobody can touch three weeks later.

the magic-trick trap

you write one clever prompt. it works. it feels like magic. so you never turn it into real software — no versioning, no logging, no way to see why it did what it did. then the inputs drift, the model updates, a client's data looks slightly different, and the whole thing quietly breaks. you can't debug magic. you can only re-cast the spell and hope.

a prompt you can't read, version, and fix isn't an agent. it's a liability waiting for a bad input.

treat it like software, because it is

everything we already know about building maintainable systems applies — we just keep pretending it doesn't because there's an llm in the loop:

  • make it inspectable. log what the agent saw and what it decided. if you can't answer "why did it do that," you can't run it in production.
  • version the prompts like code. they ARE code. a prompt change is a deploy. treat it with the same respect.
  • constrain the surface. a narrow agent that does one thing reliably beats a magic do-everything agent that fails in ways you can't predict.
  • test against drift. the inputs will change. the model will change. build the checks that catch it before a client does.

why this is the whole game

the teams that win with agents aren't the ones with the cleverest prompts. they're the ones who treated agents as software from day one — boring, inspectable, maintainable. the magic-trick builders get a viral demo. the software builders get a system that's still running, and still making money, a year later.

i build an entire operating system on this premise. the agents that run my company aren't magic. they're software i can read, fix, and trust at 2am. that's the only kind worth building.

written by firaz fhansurie