Notes

API Integration (Agent)

An agent is only as capable as the systems it can reach, and most real systems are reached over an HTTP API. API integration is the work of turning an external service — a CRM, a payment provider, an internal microservice — into something an agent can call correctly and safely.

What the integration involves
Exposing an endpoint to a model is considerably more than handing over a URL. Each integration carries:

  • A tool schema — the operation's parameters, types and required fields, written so a model can fill them in from natural language.
  • A description saying when to use the call and when not to. Selection errors trace back to vague descriptions far more often than to weak models.
  • Credentials held outside the model: the runtime attaches the API key, and the agent never sees it.
  • Response shaping — trimming a 300-field payload down to the fields that matter, because whatever comes back becomes context the agent must carry.
  • Error handling: rate limits, timeouts and validation failures returned as readable messages the model can act on.

Why it is the fragile seam
This is where agents most often fail in production, and rarely dramatically. A correctly formed call lands on the wrong record. A paginated endpoint returns its first page and the agent treats it as the complete set. A retry after a timeout double-posts an order that had actually succeeded. Idempotency keys, narrow permissions and a hard call budget matter more here than prompt wording. The Model Context Protocol exists partly so that every team stops rebuilding this layer for the same handful of services.

API integration is the work of exposing an external service to an agent as a callable tool — wrapping endpoints with a schema, handling authentication, mapping responses into text the model can use, and turning errors into signals it can recover from. It is the most common way an agent gains real capability. The quality of the wrapper decides the outcome: a poorly described or noisy API is one the agent misuses.

An assistant with no phone and no logins cannot do much for you. They can offer advice, but they cannot book, pay, or look anything up.

API integration is giving software that works on its own the equivalent of those logins. Each outside service — a calendar, a shop, a company database — gets connected up and described in terms the AI can follow: what this service does, what details it needs, what it hands back.

Done carefully, it is what turns talk into action. Done carelessly, it is how the software ends up confidently updating the wrong customer's record.