# Custom agent playbooks

A custom agent is one you build yourself, with a library such as the Claude Agent SDK, the OpenAI Agents SDK or LangGraph, or with a plain script that calls a model in a loop. Developers use this route when no ready-made agent fits a job, or when the agent must run on a schedule, inside their own product, or on their own servers.

- Vendor: Various
- Kind: framework
- Surfaces: api, self-hosted, terminal
- Connects: The Claude Agent SDK and the OpenAI Agents SDK both connect to MCP servers. The Claude Agent SDK also loads skills, hooks, subagents and plugins from .claude folders, like Claude Code.

- Docs: https://code.claude.com/docs/en/agent-sdk/overview

## Good at

- Running one narrow job on a schedule or in a pipeline, with no chat window
- Full control over which tools the agent may call and which actions need approval
- Reusing ready parts such as built-in file and shell tools, handoffs between agents, guardrails and tracing
- Long, stateful jobs that can pause for a human and resume after a failure, as LangGraph describes

## Limits

- You write and maintain the code, the hosting and the error handling yourself
- Each framework has its own model ties, for example the Claude Agent SDK runs Claude Code and the OpenAI Agents SDK uses the Responses API by default for OpenAI models
- Anthropic does not allow third-party products built on its Agent SDK to offer claude.ai login, so you pay with an API key
- Safety checks, approval steps and logging exist only if you build them in

## Playbooks (10)

- [Build a profit-and-loss statement from a raw Amazon transaction export](https://agentshandbook.com/p/build-a-pl-from-an-amazon-transaction-export.md): You get a structured P&L with each transaction classified, totals calculated with formulas, and a clear view of gross margin. (trust: reported, risk: low)
- [Enrich and qualify new inbound leads, then route them with a reason a person can check](https://agentshandbook.com/p/enrich-and-qualify-inbound-leads.md): Each new lead gets a researched summary, a score, a route and a draft reply, and a person approves the action before anything changes in the CRM or reaches the lead. (trust: corroborated, risk: medium)
- [Find the questions AI assistants answer without naming your brand, and plan content to fix it](https://agentshandbook.com/p/find-questions-ai-answers-without-citing-you.md): You get a table of buyer questions with your mention rate, competitors' mention rates and cited sources per assistant, plus a short content plan for the biggest gaps that you approve. (trust: corroborated, risk: low)
- [Match receipts to bank transactions and flag VAT or sales tax questions for your accountant](https://agentshandbook.com/p/match-receipts-to-bank-transactions-for-your-accountant.md): You get a workbook with every bank line matched to a receipt or marked missing, a proposed category for each, and a short list of VAT or sales tax questions for your accountant. (trust: corroborated, risk: high)
- [Negotiate a lower internet or phone bill with an agent-prepared script or chat](https://agentshandbook.com/p/negotiate-a-lower-internet-or-phone-bill.md): You lower your bill, or get a firm answer from retention, without agreeing to a plan change or contract you did not approve. (trust: corroborated, risk: medium)
- [Research a list of target accounts and draft first emails for you to review and send](https://agentshandbook.com/p/research-accounts-and-draft-first-emails.md): You get a table of researched accounts with a fit score, sources and one draft email each, and nothing is sent until you approve it. (trust: corroborated, risk: high)
- [Track new papers and releases in your field with a daily agent digest](https://agentshandbook.com/p/track-new-papers-or-releases-in-a-field-daily.md): Each weekday you get one message with the few new papers and releases that match your interests, each with a link, a one-line reason it matters, and a clear note when nothing new appeared.
 (trust: corroborated, risk: low)
- [Triage your support inbox and draft replies that a person approves before sending](https://agentshandbook.com/p/triage-support-inbox-with-approved-replies.md): Every new support email gets a label, a priority and a draft reply grounded in your docs, and a person sends each reply after reading it. (trust: corroborated, risk: high)
- [Turn flight, hotel and booking confirmation emails into calendar events](https://agentshandbook.com/p/turn-booking-emails-into-calendar-events.md): Every booking in the date range sits on your calendar once, at the right local time, with the confirmation number and address in the event. (trust: corroborated, risk: low)
- [Watch competitors' pricing and product pages and get a weekly briefing of real changes](https://agentshandbook.com/p/monitor-competitor-pricing-pages-weekly.md): Every week you get a short briefing of meaningful changes to competitors' pricing and product pages, each with the before text, the after text and a link to the saved snapshot. (trust: corroborated, risk: low)

## Lessons

- [Sales agents drift from their rules unless someone keeps sampling the output](https://agentshandbook.com/lessons/agent-quality-drifts-without-sampling.md)
- [Agents act before you approve, even when you told them to ask first](https://agentshandbook.com/lessons/agents-act-before-you-approve.md)
- [Agents miscount and drop rows unless every number comes from code](https://agentshandbook.com/lessons/agents-miscount-and-drop-rows-unless-they-use-code.md)
- [Agents put calendar events at the wrong hour when time zones are involved](https://agentshandbook.com/lessons/agents-shift-event-times-across-time-zones.md)
- [Agents stall at logins and one-time codes, so you must be there to sign in](https://agentshandbook.com/lessons/agents-stall-at-logins-and-verification-codes.md)
- [AI-personalised cold emails read as generic or pitch the wrong thing](https://agentshandbook.com/lessons/ai-outreach-personalisation-reads-generic.md)
- [AI summaries change quotes, numbers and timestamps, or describe pages they never read](https://agentshandbook.com/lessons/ai-summaries-alter-quotes-numbers-and-timestamps.md)
- [Support bots invent policies and refund terms that customers then act on](https://agentshandbook.com/lessons/support-bots-invent-policies.md)
