A year ago, an agent that called a tool and finished a task was a demo worth sharing. Today a developer can scaffold one in an afternoon with any of the major SDKs. What still takes months is the work nobody films: keeping that agent correct, safe, affordable and debuggable once real customers and real data sit on the other side.
I run generative AI trainings for developer teams, and the questions I get have shifted. Fewer people ask how to build an agent. More ask why it did that, why the bill is three times the estimate, and who approved that tool call. The nine concepts below are the vocabulary for answering those questions. Models will keep changing every few months. These engineering ideas will still matter in 2027.
To keep things concrete, I follow one agent through the whole article: a KYC onboarding agent at a fictional retail bank, XYZ Bank. A new customer uploads an ID, a proof of address and a short questionnaire. The agent extracts the data, screens the name against sanctions and PEP lists, scores the risk against the bank’s policy, asks for missing documents and prepares a file for a human compliance officer. It is regulated, multi-step and tool-heavy, and it gets expensive fast when something goes wrong.
Each concept gets three layers: a plain analogy you can repeat to anyone, what it looks like in production, and where it breaks. The checklist at the end pulls the nine together.
Think of a student who actually checks their homework. They read the question, try an approach, look at the result, spot the mistake, fix it, and stop when the answer holds up. A chatbot answers once. An agent repeats plan, act, observe and reflect until the task is done or a limit is reached.
For the KYC agent, one turn of the loop might look like this: plan “verify the address”, act by calling the document extraction tool, observe that the proof of address is older than three months, reflect that a newer one is needed, then go around again. The model picks the next step. Your code decides how many steps it gets, what “done” means, and what happens when it is stuck.
That second half is where production teams spend their time. Every loop needs:
OpenAI’s harness engineering write-up describes Codex agents that review their own changes, ask other agents for review and keep iterating until the reviewers are satisfied, with single runs working on one task for more than six hours. Long loops are normal now. Unbounded loops are a bug.
Three failures show up again and again: the polite infinite loop, where the agent asks the same tool the same question; premature success, where it declares the file complete with a field missing; and compounding errors. If each of 10 steps succeeds 95% of the time independently, the full run succeeds only about 60% of the time (0.95 to the power of 10 is 0.599). That arithmetic is the reason the other eight concepts exist.
Think of USB-C. Before it, every device shipped with its own cable. Before MCP, every agent framework needed a custom connector for every tool. MCP defines one plug: a server exposes tools, resources and prompts, and any compatible client (an IDE assistant, a chat app, your own agent) can use them.
The KYC agent needs the customer master data, the sanctions screening service, the document store and the CRM. Exposed as four MCP servers, each with a named owner, those connectors can be reused next quarter by the fraud team’s agent without a rewrite.
The protocol is no longer one vendor’s side project. In December 2025 Anthropic donated MCP to the Agentic AI Foundation, a Linux Foundation fund co-founded with Block and OpenAI (O’Reilly Radar). The current specification, dated 2026-07-28, is the largest revision since launch (AAIF announcement):
For a bank, that means treating each MCP server like any other API boundary. Version it, contract-test it, mock it in CI, give it an owner, and let agents load only servers published through an internal registry or allowlist.
MCP standardizes the plug. It does not establish trust. A tool description is free text that the model reads and follows, which makes it an injection surface, and the spec itself tells clients to treat tool annotations as untrusted unless they come from a trusted server. A malicious or compromised server in your agent’s toolset is a supply-chain attack; OWASP lists agentic supply chain vulnerabilities as ASI04. Plugging in 40 community servers because it takes five minutes is the 2026 version of running npm install without reading the package.
Think of a team with different skill sets. You would not ask one person to be the lawyer, the analyst and the data clerk on the same file. A multi-agent system splits the work among specialized agents, usually a lead agent that plans and delegates, and worker agents that each handle one job in their own context window.
For XYZ Bank, a sensible split has four roles. A document agent extracts and validates the ID and proof of address. A screening agent runs sanctions, PEP and adverse media checks. A risk agent scores the case against the bank’s KYC policy. A lead agent orchestrates the three and writes the final file for the compliance officer. Each worker gets a narrow tool set and narrow permissions, which helps security as much as quality.
Anthropic’s write-up on its multi-agent research system is still the most candid public data point. Their orchestrator-worker setup, with Claude Opus 4 as lead and Claude Sonnet 4 subagents, beat a single Opus 4 agent by 90.2% on their internal research eval. The price: a single agent used about 4x the tokens of a chat, and the multi-agent system about 15x. They also note that most coding tasks parallelize less well than research, and that tasks where every agent needs the same shared context are a poor fit.
Coordination becomes the new failure surface. Workers duplicate each other’s searches, misread vague delegation instructions, or send back long summaries that flood the lead agent’s context. Errors pass from one agent to the next without anyone noticing. My rule of thumb: start with one agent and good tools. Split only when you can name the parallel work or the separate permission boundary that justifies it, and only when the task is worth roughly ten times the token bill.
Think of the security checkpoint at an airport. Every passenger goes through the same gate, shows ID, gets screened and is sent to the right terminal. An AI gateway does the same for every model request: one entry point between your applications and every model provider.
A bank does not want 30 teams each holding their own provider API keys. The gateway centralizes:
In 2026 gateways govern more than LLM calls. They also sit in front of MCP traffic and agent-to-agent traffic; Kong, for example, made MCP a first-class traffic type in Gateway 3.12. Options range from open-source gateways you host yourself to managed edge services. In a regulated bank I would rank them on deployment model first (self-hosted often wins), then audit depth, then MCP support.
The gateway becomes a single point of failure and a latency tax, so it needs the same high-availability design as your API gateway. Semantic caching is dangerous in banking, because two questions that look alike (“what is my balance?” from two different customers) must never share an answer. And a gateway only sees what passes through it. An agent that reaches a model through a developer’s personal key is invisible, so enforce egress rules at the network layer as well.
Think of a well-run household budget. It does not buy the cheapest version of everything; it spends where quality matters and saves where it does not. Inference economics applies that discipline to tokens, latency and model choice.
Agents change the cost curve. A chat answer is one call. A KYC onboarding run can be dozens of model calls, each one re-sending a growing context: the policy, the tool definitions, everything said so far. The levers that matter:
Teams optimize the invoice and break the product. A downgraded model quietly lowers screening recall, and nobody notices because there are no evals (concept 6). Cache hit rates collapse the day someone adds a timestamp at the top of the system prompt. And averages hide the real cost: a small share of files with blurry scans and unusual names can consume more tokens than all the routine ones combined. Track the distribution per task, not just the mean.
Think of the quality checks before a product launch. A car maker does not ship a new model because an engineer drove it around the block and it felt fine. Evals are the repeatable test suite that tells you whether your agent still works after you change a prompt, a tool or the model underneath.
Anthropic’s January 2026 guide, Demystifying evals for AI agents, gives a useful vocabulary: a task, several trials (agents are non-deterministic, so one run proves little), graders, the transcript of everything the agent did, and the outcome, meaning the final state of the environment. For the KYC agent that translates into:
Two metrics deserve a place on your dashboard. pass@k asks whether the agent succeeds at least once in k attempts, which is fine for a coding assistant you can rerun. pass^k asks whether it succeeds in all k attempts, and that is the bar for a process that touches customers and regulators. Wire the suite into CI so a model upgrade or a prompt change runs the evals before it merges. In the teams I work with, the ones that have an eval suite are the ones that can adopt a new model quickly.
The usual failures: a test set of 20 happy-path cases, an LLM judge nobody calibrated, and graders that check the path (“did it call tool A, then tool B?”) and punish valid alternative routes. The subtler failure is staleness. Production traffic drifts, with new ID card formats or a new sanctions regime, while the eval set stays frozen. Feed real failures from observability (concept 8) back into the suite every week.
Think of the safety barriers on a highway. They do not drive the car; they keep a mistake from turning into a disaster. Guardrails are the checks around the model that stop data leakage, prompt injection, unsafe outputs and unauthorized actions.
Guardrails work in layers, and the layers that protect you most are not prompts:
The OWASP Top 10 for Agentic Applications, released in December 2025, is the best shared map. Its first three entries are agent goal hijack, tool misuse and exploitation, and identity and privilege abuse. Use it as the threat model in your design review.
Prompt-only guardrails (“never reveal customer data”) are requests to the model, and a determined injection overrides requests. Filters that are too aggressive block legitimate work and push people toward shadow tools. And guardrails without logging are invisible: if you do not know how often they fire and on what, you cannot tell whether they protect you or only slow your users down.
Think of the flight recorder on a plane. After an incident, investigators do not guess; they read the recorder. When your agent approves the wrong file at 3 a.m., you need the same thing: every step, every tool call, every model response, with timings and costs.
Agent observability means traces as well as logs. One KYC run is one trace. Inside it sit spans for each model call, each tool call, each guardrail check and each handoff between agents, tagged with the model name, tokens in and out, cost, latency and errors. That structure answers the questions people actually ask: which step is slow, which tool fails most, what the agent saw right before a decision, and what onboarding customer 48213 cost.
Standardize on OpenTelemetry. Its generative AI semantic conventions define spans and attributes for model calls and agent operations, and most agent frameworks and gateways can emit them. They are still marked as Development, so pin the version you emit and expect changes. Send the traces to the backend your SRE team already runs, so AI incidents follow the same on-call process as everything else.
Three additions go beyond classic APM:
Logging everything creates a second copy of your customer data with weaker controls. Logging nothing leaves you blind. The workable middle: mask at capture, keep full transcripts for a short window and for sampled or flagged runs, and keep aggregated metrics for longer. The other failure is the dashboard nobody opens. Tie alerts to signals that matter, such as a jump in cost per task, a spike in guardrail hits, or a drift in the escalation rate.
Think of the operating system behind a laptop. The processor alone runs nothing; the operating system schedules work, manages memory, controls permissions and talks to devices. The model is the processor. The harness is everything around it: the loop, the tools, memory and state, context management, permissions, the sandbox, and the controls that decide when to stop or call a human. The popular shorthand is agent = model + harness.
The harness is where the previous eight concepts physically live. The loop (1) runs inside it. It loads MCP servers (2), spawns subagents (3), sends model calls through the gateway (4), manages the context that drives cost (5), exposes hooks for evals (6), enforces guardrails and permissions (7) and emits traces (8).
OpenAI’s February 2026 post on harness engineering shows what this looks like at scale. Three engineers drove Codex to build a product of roughly a million lines of code and about 1,500 merged pull requests, with every line written by the agent. Early progress was slower than expected, and the team traced it to an underspecified environment: the agent lacked the tools, structure and feedback loops it needed. The fixes were harness work. They made the app bootable per git worktree, exposed logs and metrics to the agent, treated plans as first-class artifacts, and replaced a giant instruction file with a short map pointing to deeper docs.
For XYZ Bank, the harness is the KYC agent’s runtime: the state machine of the onboarding file, checkpoints between steps, memory of the customer’s earlier interactions, the permission matrix per tool, the sandbox where documents get parsed, and the escalation hooks into the compliance queue. It is ordinary software, owned by an engineering team, versioned and tested like any other service.
Harnesses rot. Tools get added and never removed, instructions pile up, memory fills with stale facts, and each quick fix makes the agent a little worse. Treat the harness as a product with an owner and a changelog. The second trap is coupling: a harness built around one model’s quirks breaks on the next model. Keep model-specific tuning thin and behind your evals, so you can swap models when a better one ships, which in 2026 happens every few months.
The nine concepts make a good checklist, but they read as nine separate boxes, and in production they behave as one system. A cheaper model (5) is only safe if evals (6) catch the regression. A guardrail (7) only helps if observability (8) shows when it fires. The harness (9) is the container that makes them work together, which is why I would read the list from the bottom up.
Three things I would add, based on what I see in banking and developer teams:
The list is not a ranking either. If you have budget for three of them this quarter, pick evals, observability and action-level guardrails. They are what let you change everything else safely. MCP servers, gateways and multi-agent designs are easier to add later than trust is to retrofit.
Before your next agent goes to production, ask these nine questions:
If you answer no to more than three, the model is not your bottleneck.
