Skip to main content
>_ supraj.dev
TOPIC AI
External Integrations connecting AI agents to real-world APIs and SaaS platforms
IN 10 SECONDS

External integrations are the bridges between your AI system and the outside world — Slack for notifications, Jira for ticket creation, GitHub for code changes, Stripe for billing, or any REST/GraphQL API. The agent doesn't just generate text; it calls real services to take action. Each integration needs authentication (OAuth, API keys), error handling, and rate limit awareness.

GOTCHA LLMs can hallucinate API parameters that don't exist. Always validate tool call arguments against the actual API schema before executing. And never let an agent hold long-lived credentials — use short-lived tokens with minimal scopes.
HOW AN AGENT CALLS AN EXTERNAL SERVICE
01 Agent decides the LLM determines it needs to create a Jira ticket based on the user's request.
02 Tool definition the integration's schema describes the endpoint, required fields, and auth method.
03 Executor makes the authenticated API call: POST /rest/api/3/issue with the JSON payload the agent generated.
04 Response handling the API response (ticket ID, error, rate limit) is fed back to the agent for its next decision.
POKE IT YOURSELF
curl -X POST -H 'Authorization: Bearer $SLACK_TOKEN' -d '{"channel":"C01234","text":"Agent alert"}' https://slack.com/api/chat.postMessage — post a message to Slack via API