Build & submit taskBetaadvanced

Build a Working Agent with the Claude Agent SDK: Custom Tools, a Turn Budget, and Output You Can Trust

Complete a stub agent built on the Claude Agent SDK until it produces a multi-currency expense report on its own: two custom tools (@tool functions on an in-process MCP server), a hard max_turns budget, and a JSON report your code validates against a schema before writing it. The kit's local oracle recomputes every total from the raw CSV, so your agent's report is checkable to the cent without any model call.

1.3 hrs

Est. time

3

Outcomes

6

Rubric criteria

65%

Pass score

What you'll learn

Skills you'll have real reps in after shipping this.

The scenario

Your team hands you a quarter of expense receipts: 42 rows across three months, in dollars, euros, and pounds. Finance wants one JSON report with the USD total, per-category totals, the top merchant, and the number of months covered. Summing the amount column as-is gives a number that is wrong by hundreds of dollars, because a third of the rows are in EUR and GBP, and the top merchant changes once you convert.

You complete ledgerbot: an agent built on the Claude Agent SDK, the library that exposes the same agent loop that powers Claude Code. You define two custom tools (load_expenses and convert_to_usd), cap the loop with a hard turn budget, instruct Claude to reply with a single JSON object, and validate that object against a schema before one byte lands in out/report.json. The kit's check.py recomputes the ground truth from the raw data itself, so your agent's report is either right to the cent or it fails in front of you, before you submit.

Your role

You are the engineer shipping your team's first Claude Agent SDK service. Your deliverable is a runnable agent (two custom tools, a turn budget, schema-validated output), the report it produced, machine-generated evidence that the numbers are right, and a short note on what it would take to run it unattended.

Start the task to unlock the full brief

You'll get the step-by-step requirements, setup commands, the 6-criterion grading rubric, tips, and the ability to submit your solution for instant AI grading.

Free to start · submit when you're ready

Learning resources

Ship your first real agent on the Claude Agent SDK, hands-on

The Claude Agent SDK packages the agent loop that powers Claude Code as a Python library, and this task makes you ship a working agent on it end to end. You complete ledgerbot: two custom tools built with the @tool decorator and an in-process MCP server, a hard max_turns budget, and a JSON report that your own code validates against a schema before writing. The kit's self-check recomputes every total from the raw multi-currency ledger, so you know your agent's numbers are right to the cent before you submit. You come away with the skills that separate a demo from a service: tool design, loop budgeting, and treating model output as unverified input until your validation passes it.

Frequently asked questions