IamBishal

AI Engineering · Tutorial Series

Build a bounded agent

Ship an agent that does real support work through MCP tools without running away: hard budgets, circuit breakers, guardrails against untrusted ticket text, a human gate on escalation, and measured cost per task.

By Bishal Saha · Updated

  • 3 Modules

    5 lessons live

  • Beginner

    Level

  • 3+ hours

    Learning Content

Start Learning

About This Tutorial Series

Ship an agent that does real support work through MCP tools without running away: hard budgets, circuit breakers, guardrails against untrusted ticket text, a human gate on escalation, and measured cost per task.

What we build: A Helpline triage agent: given a new support ticket, it searches similar tickets and the knowledge base, drafts a reply for a person to review, and asks a human before escalating. It talks to the Helpline MCP server (from the previous tutorial) only through MCP.

What You'll Learn

  • Explain the agent loop and its stop conditions, name the five failure modes a tool-using agent hits in practice, and define the Helpline triage task with the budget/guardrail checklist the series will
  • Build a working triage agent that discovers Helpline's tools over MCP, converts them to Claude tool definitions and runs the manual tool-use loop with correct stop_reason and is_error handling. The ag
  • Bound every run with step, token, cost and wall-clock budgets that end in a clean budget-exhausted outcome. Add a per-tool circuit breaker, retries with backoff only for read/idempotent tools, and det
  • Treat ticket text as delimited untrusted data, restrict each task to an allowlist of tools, check drafts before they leave the agent, and require a human approval with a recorded decision before escal
  • Turn the failure modes into a scripted scenario suite that gates CI on the FakeModel. Add structured trace logging, capture one labelled real run with a cost-per-task report, and state what a green bu

Prerequisites

  • Before you start

    Python and HTTP APIs. The 'Build a production MCP server' tutorial is recommended: its Helpline server is reused here, not rebuilt.

Course Curriculum

  1. Why agents run away, and a minimal agent loop that calls the Helpline MCP server's tools.

Reviews (0)

No reviews yet

Finish a lesson and be the first to share what you thought.

View All Tutorials

Bishal SahaLet's build together

Have a system to design, or an AI feature to get right?

Tell me about the problem. You'll get a clear, honest view of the best way forward.

  • Reply within 24 hoursOn business days, with my honest view and a next step.
  • Accepting select engagementsArchitecture, AI features and full builds.
  • Remote, worldwideWorking with startups, SMEs and enterprises.