Skip to content
All posts
AIAgentsArchitecture· 5 Aug 2026 · 5 min read

From API call to agents in production

Calling an LLM API is the easy 10%. The real engineering is the system around it — tools, guardrails, retries and human-in-the-loop. Notes from wiring agents into real products.

From API call to agents in production

A single API call gets you a chatbot. A product that acts on the user's behalf needs an agent — and an agent is mostly the engineering that surrounds the model, not the model itself.

Give the model real tools

Function calling turns a language model into something that can do work: query a database, create a record, send a message. Define narrow, well-typed tools and let the model choose — but validate every call before it runs.

Design for failure

Models are non-deterministic, so build like it. Add retries with backoff, validate outputs against a schema, and fall back gracefully when a tool errors. An agent that fails loudly and safely beats one that fails silently.

Keep a human in the loop

For anything irreversible — payments, deletions, outbound messages — put a confirmation step in front of the action. The model proposes; the human (or a strict rule) approves.

The interesting work isn't the prompt. It's the guardrails, the observability and the workflow design that make an autonomous system trustworthy enough to put in front of users.