AgeBridge Guided Project · AdvancedAbout 12 hoursPro

An agent with tools for a real ops task

An agent that looks up contacts in the CRM, reads tomorrow's calendar and writes an email draft, with a ceiling on how many tools it may call, a list of what it may do at all, and a person who says yes before anything is kept.

What you'll have at the end

A repository holding three tools with JSON schemas, an agent loop that calls them, an allow-list and a six-call ceiling, a draft that is only saved after you type y, a run log with tokens and cost, and ten scripted tasks that check all of it.

What it proves

tool useguardrailscost control

Accounts to create

What it costs: Free tiers on HubSpot, Google Calendar and GitHub, plus a few cents of model usage: a full run of the ten scripted tasks costs less than a coffee.

Have this ready

  • A terminal with Node 20.6 or newer, git, and Claude Code installed
  • A HubSpot account where you may create a private app
  • A Google Calendar you own and may share as a private address
  • Three made-up contacts and three made-up meetings; the copy blocks hold a set you can use, so swap them for your own if you prefer
  • Today's Claude prices from the Anthropic pricing page, because the run log works them out itself

How it fits together

scripts/run.tsone task, written in plain wordsClaudedecides which tool to call nextsearch_contactHubSpot, read onlylist_meetings_tomorrowthe calendar's private addressdraft_emailsaved only after a person types yruns.csvtool calls, tokens and cost per run
  1. scripts/run.ts: one task, written in plain words
  2. Claude: decides which tool to call next
  3. search_contact: HubSpot, read only
  4. list_meetings_tomorrow: the calendar's private address
  5. draft_email: saved only after a person types y
  6. runs.csv: tool calls, tokens and cost per run

The steps

  1. 1. The accounts, the made-up data and the repository

    Everything the agent will read, in place before any code runs. Three contacts in the CRM, three meetings tomorrow, and a repository with a file holding the keys.

  2. 2. Three tools, described so a model can use them

    The tools themselves. A tool is two things: a description precise enough for the model to pick it, and code that does exactly what the description says and nothing more.

  3. 3. The loop that lets the model use them

    The agent itself: a loop that sends the task, runs whatever tool the model asks for, sends the result back, and stops. The ceiling on tool calls is in this loop from the first line, not added later.

  4. 4. The guardrails

    The three rules that make this safe to show a client: a list of what may run at all, a person between the agent and anything kept, and a refusal that names the rule rather than apologising.

  5. 5. What every run costs

    The number a client asks for second, right after "does it work". Every run writes one line with its tool calls, its tokens and its cost, and a run that would go over the budget stops itself.

  6. 6. Ten scripted tasks

    The thing that turns a demo into a deliverable. Ten tasks, four of which must be refused, run in one command, so a change to the prompt cannot quietly remove a guardrail.