The guide · checked October 22, 2026

Build an AI agent that answers every door

Calls, WhatsApp, texts and email, plus payments it can never overspend. One core with swappable niche packs for real estate, education, gyms, trading and more.

23 short chapters. Every fact dated and sourced. Educational only, not legal or financial advice.

Three things to know before you build

Phone numbers need a carrier

Calls to ordinary phone numbers always pass through a licensed carrier. Keep it to a bare SIP trunk and run everything else yourself. How

WhatsApp calls, with a US catch

Customers can call your agent on WhatsApp. Business-initiated calls aren't allowed from US or Canadian numbers. Details

Outbound needs consent

US law treats AI voices as artificial voices, so the agent needs consent before it calls. EU law says to tell people it's an AI. The rules

01 · Whole system

The shape of a plug-in agent

One brain, many doors. Every channel feeds the same agent core, and every action passes through the same rules before it touches the world.

  • architecture
  • start here
  • channels
  • guardrails

An agent you can hand to a real estate office, a school or a gym has the same five layers every time. Only the niche pack on top changes.

  • Doors (channels): phone calls, WhatsApp, text messages, email and a web chat. Each door turns what came in into plain text plus who it came from.
  • Gateway: one small server that receives every door's events, checks who is allowed to talk to the agent, and keeps one conversation thread per person across all doors.
  • Brain: the language model (Claude here). It reads the thread, the niche pack and the tools it may use, then proposes a reply or an action.
  • Rules (guardrails): code, not prompts, that decides whether a proposed action may happen: spending caps, approval thresholds, allowed contacts, quiet hours and the off switch.
  • Records: a log of every message, decision and payment, so the owner can see what happened, why, and undo or stop it.

Build them in this order: rules first, then data and tools, then the channel plumbing, and the voice last. A polished voice sells the demo, but an agent that can't book, can't check a calendar or can't say "I can't do that" fails in week one. The test for any agent: show it handling a call that goes wrong, not one that goes right.

Accessibility comes free if the web chat is built properly. Screen readers and refreshable Braille displays read text channels, so a chat with labeled controls and a live region for new messages already works for blind and deaf-blind users. Every door that ends in text can be read in Braille.

Layer
Whole system
Build order
Rules, data and tools, channels, voice
Third party you can't avoid
The model provider (Anthropic) and whatever each door requires
Cost tier
Free to sketch; costs arrive with each door you open
Legal check
Depends on doors and niche; see the outreach rules entry
Plan this part in the engineBack to top
02 · Whole system

Where agents stand in October 2026

The big platforms now sell always-on personal agents. A plug-in agent wins by doing what theirs can't: your data, your rules, your customers' doors.

  • market
  • start here
  • forecasts
  • agentic commerce
  • competition

Agents stopped being a demo this year. The big platforms now sell personal agents that keep working when you close the app:

  • Meta Muse: Meta's personal agent, launched in early September 2026 and free to start.
  • OpenAI dots: always-on agents that each get their own cloud computer, rolling out from September 29, 2026 to ChatGPT Pro and Business Premium users. They connect to thousands of apps through plugins and take voice calls; texting is listed as coming soon. With no task assigned, a dot can only research with read-only tools.
  • Grok Bot: AI "teammates" from SpaceXAI, out since August 2026.

What that means for a plug-in agent: a general assistant on a phone is now cheap or free, so "an AI that answers questions" is no longer a business. A niche agent earns its keep by knowing one business deeply, holding that business's records and rules, answering that business's own phone, WhatsApp, texts and email, and handing off to a person at the right moment.

The forecasts, with their sources:

  • Gartner (2024): by 2028, 15% of day-to-day work decisions made autonomously by agents, and 33% of enterprise software including agentic AI, up from under 1% in 2024.
  • Gartner (June 2025): over 40% of agentic AI projects will be canceled by the end of 2027 because of cost, unclear value or weak risk controls. Gartner also warns about "agent washing," old chatbots relabeled as agents.
  • McKinsey (October 2025): agents could orchestrate $3 trillion to $5 trillion of global retail goods spending by 2030, about $900 billion to $1 trillion of it in US retail. That is goods only, not services.

Agent-to-agent buying is why the payments and wallet chapters matter: when a customer's agent shops for them, your agent needs clear prices, a payment link or request it can hand over, and caps it cannot break.

Forecasts are estimates, not facts. Build for the customers in front of you today.

Layer
Whole system
Consumer agents now
Meta Muse, OpenAI dots, Grok Bot
Gartner 2028
15% of daily work decisions by agents
Gartner warning
Over 40% of agent projects canceled by end of 2027
Agentic commerce
$3T to $5T global goods by 2030 (McKinsey estimate)
Your edge
Niche data, your own doors, human handoff
Plan this part in the engineBack to top
03 · Whole system

One owner, many agents: the department model

Split the business into departments, give each one an agent with its own narrow permissions, and keep yourself on the work you do best.

  • departments
  • operations
  • marketing
  • sales
  • support
  • start here

A pattern that keeps coming up in founder interviews: instead of one agent that does everything, run a small team of agents, one per department, each with its own tools and limits.

  • Marketing: finds attention. Drafts posts, finds podcasts and newsletters to pitch, cuts clips.
  • Sales: closes. Answers questions, books calls, sends the payment link.
  • Customer support: keeps customers. Answers tickets, tracks orders, prevents chargebacks.
  • Operations: keeps the lights on. Watches the website, email sequences and technical problems.
  • Fulfillment: delivers the product, physical or digital.
  • Legal and HR: drafts only. A person signs everything.

Start with yourself: pick the departments you are good at and enjoy, keep those, and hand the rest to agents first.

Two real-world examples from a founder interview (October 2026), and how to make them safe:

  • Operations: antivirus tools were flagging a founder's site. An agent scanned blocklist networks the team hadn't checked, found two listings, filled in the removal forms and drafted the email. The founder read it before it went out, and the site was delisted in about three days. That is the draft-then-approve level from the guardrails chapter working as designed.
  • Marketing: an agent was told to find podcasts in the industry, write pitches in the founder's voice and send 10 to 20 every morning at 9. Daily automated cold email is exactly where domains get burned. Make it a draft queue the owner approves, send from a separate subdomain, follow CAN-SPAM (honest subject, real identity, postal address, working opt-out) and stop at the first no.

A research prompt worth running before you build anything: "Do a competitive analysis of [industry]. Find the biggest customer complaints on forums and review sites. Tell me what a better product would do, and score the idea from 1 to 10 for profitability." Build around the complaint, not your favorite solution.

Give each department agent its own login or mailbox, never your main one, so one mistake or one hijacked agent can't reach everything.

The founder's own numbers (about 50 agents, 70,000 platform users, a student's seven-figure acquisition) are self-reported in a promotional interview and were not independently verified.

Layer
Whole system
Departments
Marketing, sales, support, operations, fulfillment, legal and HR
Keep for yourself
What you're best at and enjoy
Safe default
Each agent drafts; you approve anything outbound
Accounts
One login or mailbox per agent, never your main one
Legal check
CAN-SPAM for any outbound email
Plan this part in the engineBack to top
04 · Knowledge and rules

Niche packs: how to niche down without rebuilding

Keep the agent core identical and swap a niche pack: a knowledge file, a tool list, a rulebook, a persona and a handoff plan.

  • niche
  • real estate
  • education
  • gym
  • meme coin

Niching down is not a new agent. It is a folder of five things the same core loads at startup.

  • Knowledge file: the facts the agent may use, written as short entries with a title, summary and body. This site's own data file is an example of the format.
  • Tool list: which actions exist for this niche. A realtor's agent can search listings and book showings. A gym's agent can book trials and pause memberships. A school's agent can answer enrollment questions and book tours.
  • Rulebook: what the agent may never do alone. Refunds, legal questions, anything involving a minor, price negotiations and money above a set amount go to a person.
  • Persona: name, tone, languages, and the opening line that says it is an AI assistant for that business.
  • Handoff plan: who gets the conversation when the agent is unsure, through which door, and with what summary attached.

Pick a niche by asking where calls and messages already pile up after hours. Real estate, home services, clinics, gyms and schools all lose leads to slow replies. Pick one, write its pack, run it in shadow mode, then sell the same core with a new pack to the next niche.

Layer
Knowledge and rules
What changes per niche
Knowledge, tools, rules, persona, handoff
What never changes
Gateway, brain, guardrails, records
Cost tier
Free: it's writing, not code
Build effort
One to three days per niche
Plan this part in the engineBack to top
05 · Brain

The brain: Claude through the API

The gateway calls Claude from the server with a key the browser never sees, gives it the niche pack and tools, and lets code decide what actually happens.

  • claude
  • api
  • model
  • tools
  • architecture

The agent talks to Claude through Anthropic's Messages API from your server. The key lives in a server environment variable, never in a web page, an app or a WhatsApp bot's client code.

Model choice as of October 2026: Anthropic lists claude-opus-5-5 as the recommended model for most uses, claude-sonnet-5-5 as the balance of speed and intelligence, and claude-haiku-5-5 for fast, high-volume jobs such as classification and routing. A sensible split is Haiku for "which door, which niche, is this urgent" and Opus for the actual conversation.

Two settings matter. max_tokens is a hard cap on everything the model writes, including its hidden thinking, so a small value cuts replies off mid-sentence; this project uses 16000. output_config.effort sets how hard the model works; medium suits live chat.

Tool use is how the brain acts. You describe tools such as check_calendar, send_whatsapp or request_payment, Claude asks to call them, and your code decides whether to run them. That is where every guardrail lives.

A newer pattern splits the brain in two: a large model reasons and plans, and a small decision model answers bounded questions such as yes, no or pick one of five. AWS released one such model, Strands Decider 2B, on October 1, 2026 under Apache-2.0. Its speed figures are vendor-reported, and an independent review found it far less accurate than large models, so treat it as an experiment for routing, not a judge of money or safety.

Layer
Brain
Default model
claude-opus-5-5 (Anthropic's recommendation, Oct 2026)
Fast router
claude-haiku-5-5
Key settings
max_tokens 16000; output_config.effort medium
Third party you can't avoid
Anthropic
Cost tier
Pay per token; set a monthly spend limit in the Claude Console
Plan this part in the engineBack to top
06 · Brain

Running the brain on your own machine

Open-weight models now trail the best paid ones by about four months, and Apple and Nvidia now sell computers built to run them. Local fits private data and routing; the full frontier still needs serious hardware.

  • local
  • open weights
  • hardware
  • privacy
  • brain
  • self-hosted

If you want an agent that doesn't depend on any one company, the brain itself can now run on hardware you own. October 2026 brought the clearest signs yet:

  • Meta Muse Spark Open (October 15, 2026): open weights, 816 billion parameters with 42 billion active per token, and a one-million-token context. Meta calls it the most capable US open-weight model to date; that is Meta's own claim. The license has limited commercial terms, so read it before you sell anything built on it.
  • Apple and Meta worked together to run it on Macs with Apple's MLX software. The weights alone take about 493 GB, so it needs two 512 GB Mac Studios linked over Thunderbolt 5. Apple measured about 25 tokens a second on two machines and about 37 on four.
  • Mac mini (August 2026): from $899, shipping since September 22. Apple pitches it as "always-on, deskside agentic computing."
  • Nvidia RTX Spark laptops (on sale October 16, 2026): from $2,599, with up to 128 GB of memory shared between processor and graphics, from ASUS, Dell, HP, Lenovo, Microsoft and MSI.
  • Epoch AI (May 2026): open-weight models have trailed the best closed models by about four months on average this year.

Why memory matters: on most PCs the graphics card has its own small pool of memory. Apple's chips and Nvidia's new laptops share one large pool, so bigger models fit.

How to use this in a plug-in agent:

  • Keep private data local: client notes, tax files or health details can be summarized or classified by a model on your desk, so nothing leaves the room.
  • Route locally: a small local model can answer "which door, which niche, is this urgent" at no per-message cost.
  • Keep the conversation on the best model you can afford: for most small businesses that is still a hosted model such as Claude, until local models clear your own quality test.

The trade: a hosted model costs per message; a local one costs the machine up front plus electricity, and you become the one who patches and secures it.

Layer
Brain
Biggest open model
Meta Muse Spark Open, 816B parameters (Oct 15, 2026)
Hardware for it
Two 512 GB Mac Studios (about 493 GB of weights)
Entry desktop
Mac mini from $899 (Aug 2026)
Entry laptop
Nvidia RTX Spark from $2,599, up to 128 GB
Open vs closed gap
About 4 months (Epoch AI, May 2026)
Cost tier
Middle to upper: hardware up front, no per-message fee
Third party you can't avoid
None once installed; check the model license
Plan this part in the engineBack to top
07 · Door

WhatsApp: messages and calls the official way

Meta's Cloud API lets your agent send and receive WhatsApp messages and take WhatsApp calls, with no reseller in the middle. Business-initiated calls are not allowed from US or Canadian business numbers.

  • whatsapp
  • calls
  • messages
  • meta
  • channels

WhatsApp belongs to Meta, so Meta is the one third party here you cannot remove. You do not need a reseller: a business can use the Cloud API directly with a Meta developer app, a business portfolio and a phone number registered to WhatsApp Business.

Messages: customers message you, a webhook delivers the text to your gateway, and your agent replies through the API. Outside a 24-hour window after the customer's last message, you can only send approved templates.

Calls, per Meta's Cloud API Calling documentation:

  • Customer calls you: available everywhere the Cloud API runs and, per a July 2026 industry guide, free to the business. This is the easy win: put a call button on your profile and messages.
  • You call the customer: allowed only after the customer grants permission, billed per minute, and not available when the business number is from the United States, Canada, Egypt, Vietnam or Nigeria.
  • Calling requires a daily messaging limit of at least 2,000 unique recipients, except on test numbers. New business portfolios start at 250. To reach 2,000, do any one of these: verify your business with Meta, have the partner who onboarded you verify it, or send 2,000 delivered template messages to unique numbers within 30 days with high quality ratings. Meta then reviews message quality. Above 2,000, limits rise one level automatically, within about 6 hours, when quality stays high and you used at least half your limit in the last 7 days. Limits are shared by every number in the portfolio.
  • Audio arrives over WebRTC or SIP. Meta publishes an Asterisk guide, so the call can land on your own open-source phone server and from there into your own voice agent.
  • WhatsApp calls stay inside WhatsApp. They don't connect to ordinary phone numbers.

What to avoid: tools that link to a personal WhatsApp account by scanning a QR code. The open-source agent OpenClaw, formerly Clawdbot, connects this way through an unofficial library. That's fine for a personal assistant on your own phone. For a business it breaks WhatsApp's terms, and the number can be banned without warning.

Layer
Door
Third party you can't avoid
Meta
Inbound calls
Allowed everywhere the Cloud API runs
Outbound calls
Permission first; not from US, Canada, Egypt, Vietnam or Nigeria numbers
Self-hosted part
Asterisk or another SIP server receiving the call audio
Cost tier
Middle: per-message and per-minute fees from Meta
Legal check
Opt-in for templates; AI disclosure at the start
Messaging limit
Starts at 250; verify the business to reach the 2,000 that calling needs
Plan this part in the engineBack to top
08 · Door

Phone calls without Twilio or VAPI

To reach ordinary phone numbers you need a licensed carrier, and nothing else. Rent a bare SIP trunk and a number, then run the phone system, the voice agent and the speech models yourself.

  • calls
  • phone
  • sip
  • self-hosted
  • channels

The phone network only connects through licensed carriers, so no software, open-source or not, can call a phone number without one. The way to stay independent is to make the carrier as thin as possible: a SIP trunk is just a pipe that carries audio to and from a phone number. You pick any carrier that sells plain SIP trunks and numbers, and you can switch carriers without touching your agent.

Everything after the pipe can be yours:

  • Phone server: Asterisk or FreeSWITCH, the long-standing open-source phone systems, or Jambonz (MIT license), which is built for voice apps. They answer the call, record if allowed, and pass audio to the agent.
  • Voice agent runtime: Pipecat (BSD 2-Clause) or LiveKit Agents (Apache 2.0). Both take audio from a SIP call, run speech-to-text, send text to Claude, and speak the reply. They handle interruptions and turn-taking, the parts that make a call feel human.
  • Speech models: covered in the voice stack entry.

Doors that need no carrier at all: WhatsApp calls (customer-initiated), a call button on your website using the browser's own audio (WebRTC), and app-to-app calls. For many small businesses, "call us on WhatsApp" plus a website call button covers most callers.

For outbound calls to US numbers, carriers check caller ID through STIR/SHAKEN, and unsigned or flagged calls show up as "Spam Likely." Consent rules for AI voices are strict; read the outreach rules entry before the agent dials anyone.

Layer
Door
Third party you can't avoid
A carrier for the SIP trunk and phone number
Self-hosted parts
Asterisk or FreeSWITCH or Jambonz; Pipecat or LiveKit Agents; speech models
No-carrier options
WhatsApp calls, website WebRTC calls
Cost tier
Middle: number rental plus per-minute trunk fees; server costs
Legal check
TCPA consent for AI voice; recording: Arizona one-party, announce it for out-of-state callers
Plan this part in the engineBack to top
09 · Voice

Your own speech: free, middle and upper tiers

Hearing and speaking can run on your own code with open models. Start free and robotic, upgrade to natural-sounding voices on one GPU, and add a custom voice later with consent.

  • voice
  • speech
  • tts
  • stt
  • self-hosted
  • tiers

Speech has two halves: speech-to-text, so the agent hears, and text-to-speech, so it talks. Both can run on your own server with open-source models. No ElevenLabs, no Deepgram.

Hearing (speech-to-text):

  • Whisper, OpenAI's open model (MIT license), is the common default. faster-whisper and whisper.cpp run it faster on ordinary hardware.
  • Moonshine, from Useful Sensors, targets low-latency live speech on small devices.

Speaking (text-to-speech):

  • Kokoro: an 82-million-parameter model under Apache-2.0, widely described as the most natural-sounding small open voice. It has 54 built-in voices across 8 languages and accents.
  • Piper: very fast, runs in real time on a CPU or a Raspberry Pi, and covers dozens of languages. It now lives under the Open Home Foundation with a GPL-3.0 license; the older MIT repo is archived. Generating speech commercially is fine, but changes to its source code you distribute must stay open.

The three tiers:

  • Free: the browser's built-in speech recognition in the web chat (processed by Google in Chrome and Apple in Safari), plus Piper on a CPU for phone replies. It sounds robotic, but it works today.
  • Middle: faster-whisper plus Kokoro on one rented GPU, run by Pipecat or LiveKit. Natural enough for real customers, and you own the whole pipeline.
  • Upper: a custom brand voice trained only on recordings from a person who signed consent, with a speech-to-speech model for lower lag. Never clone a real person's voice without written permission.

Voice is the last layer to polish. Callers forgive a plain voice. They don't forgive an agent that can't book the appointment.

Layer
Voice
Hearing
Whisper (MIT), faster-whisper, whisper.cpp, Moonshine
Speaking
Kokoro (Apache-2.0), Piper (GPL-3.0)
Free tier
Browser speech + Piper on CPU
Middle tier
faster-whisper + Kokoro on one GPU
Upper tier
Consented custom voice, speech-to-speech
Third party you can't avoid
None for the models; hosting for the server
Plan this part in the engineBack to top
10 · Door

Text messages: the carrier rules nobody skips

US business texting runs through registered A2P 10DLC numbers, and unregistered traffic gets filtered. An Android phone can serve as your own small gateway for low-volume replies.

  • sms
  • texting
  • 10dlc
  • self-hosted
  • channels

In the United States, business texts sent from ordinary 10-digit numbers must be registered under A2P 10DLC: your brand and each use case are registered, and carriers filter or block unregistered traffic. Every SMS provider makes you do this, and so does every self-hosted route that touches a business number.

The self-hosted route: SMS Gateway for Android (Apache-2.0) turns an Android phone with a SIM into a gateway. Your gateway server sends texts through the phone's API, and incoming texts arrive at your agent by webhook. It can run in local mode with no account and no cloud. It suits low-volume conversations with people who texted you first. Check your carrier's terms first: consumer plans usually forbid commercial or automated bulk sending, and the app's own docs warn about it.

Rules for the agent:

  • Reply-first. Text people who texted you or who opted in, never a bought list.
  • Honor STOP, HELP and quiet hours in code.
  • Introduce itself as an AI assistant for the business in the first message.

If you need a texting door with no carrier at all, a Telegram bot is free and official, and WhatsApp covers most of the world.

Layer
Door
Third party you can't avoid
A mobile carrier (through a provider or your own SIM)
Self-hosted part
SMS Gateway for Android (Apache-2.0)
US requirement
A2P 10DLC brand and campaign registration
Cost tier
Free to low for a phone-based gateway; registration fees with providers
Legal check
TCPA consent, STOP handling, quiet hours
Plan this part in the engineBack to top
11 · Door

Email that lands in the inbox, honestly

There is no trick that gets around spam filters and captchas, and trying gets a domain burned. What works: your own domain, full authentication, consent, low volume and replies a person would write.

  • email
  • gmail
  • deliverability
  • outreach
  • channels

Replying is the safe zone. When someone emails the business, the agent reads the thread through the Gmail API or any IMAP inbox and drafts or sends a reply from the same account. Replies to people who wrote first rarely hit spam.

Reaching out is where agents get flagged, and the fix is authentication and behavior, not evasion. Gmail and Yahoo's sender rules:

  • Every sender needs SPF or DKIM. Bulk senders, about 5,000 or more messages a day to Gmail, need SPF, DKIM and DMARC aligned with the From domain.
  • Marketing mail needs one-click unsubscribe (the RFC 8058 header) and a visible unsubscribe link, with opt-outs honored within two days.
  • Spam complaints must stay under 0.3%; Google recommends under 0.1%.

US law adds CAN-SPAM: honest subject lines, the sender's identity, a physical address and a working opt-out.

How the agent should do outreach: send from a separate subdomain, warm it slowly, write one-to-one notes to people who asked or have a real reason to hear from you, and stop at the first "no." Captchas exist to stop automated sign-ups and scraping; an agent that solves them to get in is breaking the site's terms.

Self-hosting your own mail server is possible, but new servers start with no reputation. A practical hybrid: receive mail on your own server and send through your own authenticated domain at human volume.

Layer
Door
Third party you can't avoid
Your mailbox host (Google, Microsoft or your own server)
Must-haves
SPF, DKIM, DMARC, one-click unsubscribe
Spam complaint ceiling
Under 0.3% (aim under 0.1%)
Cost tier
Free to low
Legal check
CAN-SPAM in the US; consent rules in the EU
Plan this part in the engineBack to top
12 · Rules

Inbound is easy, outbound is regulated

In the US, AI voices count as artificial voices under the TCPA, so AI calls need consent first. From August 2, 2026, EU rules require telling people they are talking to an AI.

  • legal
  • tcpa
  • eu ai act
  • outreach
  • calls
  • consent

When people reach out to the agent, almost anything helpful is fine. When the agent reaches out to people, the rules tighten fast.

United States:

  • In February 2024 the FCC ruled that AI-generated voices count as "artificial or prerecorded voice" under the TCPA, whether the speech is generated live or prerecorded.
  • Informational AI calls need prior express consent. Marketing AI calls need prior express written consent. An existing customer relationship doesn't exempt AI voice calls.
  • Scrub against the National Do Not Call Registry and keep your own do-not-call list.
  • A 2024 FCC proposal would require AI disclosure at the start of calls; check its status before launch.
  • Recording calls: Arizona is a one-party-consent state (A.R.S. § 13-3005), so a business that is a party to the call may record it. Some other states require consent from everyone on the call. When callers may be in other states, follow the strictest state's rule or simply announce "this call may be recorded" at the start.

European Union: Article 50 of the AI Act applies from August 2, 2026. People must be told they are dealing with an AI at or before the first interaction, clearly and accessibly, not in fine print.

The simple house rule that satisfies both: the agent always opens with who it is, for example, "Hi, this is Ava, the AI assistant for Coastal Realty." People trust an agent that is honest about being an AI more than one they catch pretending.

This is general information, not legal advice. Have a lawyer review any outbound calling or texting before launch.

Layer
Rules
US AI voice calls
Consent first; written consent for marketing
EU
AI Act Article 50: disclose AI from Aug 2, 2026
House rule
Open every conversation by naming itself as an AI assistant
Legal check
Have a lawyer review outbound campaigns
Recording
Arizona: one-party consent; multi-state calls: announce recording
Plan this part in the engineBack to top
13 · Tool

Taking payment

The agent sends a payment link or a payment request and confirms when it settles. It never asks for card numbers in a chat or on a call.

  • payments
  • checkout
  • crypto
  • x402
  • usdc

Taking money is mostly about keeping card details away from the agent. Card numbers typed into a chat or read aloud on a call end up in transcripts, which drags the whole system into card-security rules. The agent should hand the customer a hosted checkout link from your payment provider, or a crypto payment request, then wait for the confirmation webhook before it books or ships anything.

Three common options:

  • Card or bank checkout link: the customer pays on the provider's page, your gateway gets a webhook, and the agent confirms.
  • Stablecoin request: the agent shows an address and amount in USDC. USDC is issued by Circle, aims to stay at $1, and is not a bank deposit or FDIC-insured; it briefly fell to about 87 cents during the March 2023 Silicon Valley Bank failure.
  • Machine payments with x402: Coinbase's open protocol, introduced in May 2025, revives the web's "402 Payment Required" code so one program can charge another per request, usually in USDC. It fits charging other agents for data or tools, not charging people for a house showing.

Refunds, discounts and anything disputed go to a person.

Layer
Tool
Agent may
Send a link or request; confirm settlement
Agent may never
Collect card numbers; issue refunds alone
Machine payments
x402 (Coinbase, May 2025)
Cost tier
Provider fees per payment
Legal check
Card-security rules if card data ever touches your system
Plan this part in the engineBack to top
14 · Tool and rules

Giving the agent a wallet it can't overspend

Give the agent its own wallet, funded with only what you'd accept losing, and enforce the cap in the wallet or server. A cap written into the prompt can be talked around.

  • wallet
  • crypto
  • spending cap
  • guardrails
  • x402
  • ap2

Treat the agent like an employee with a company card: it can spend, within limits, and every purchase leaves a record.

The rules that make a cap real:

  • Separate wallet. Fund it with only what you'd accept losing. Never connect the agent to your main savings or exchange account.
  • Limits enforced outside the model. A per-transaction limit, a daily or per-task cap, an approved-seller list, and a threshold above which a person must approve. If these exist only in instructions, a hidden line on a web page can talk the agent out of them. That's prompt injection, which OWASP ranks as the top risk for language-model apps.
  • Records and an off switch. The owner sees every charge and can freeze the wallet instantly.

Two ways to build it:

  • Hosted: Coinbase's Agentic Wallets, launched February 11, 2026, let the operator set session caps, per-transaction limits and allowlists. A policy engine checks every request before signing, and keys are split and signed inside a secure enclave, so a compromised agent still can't break the rules. They also answer x402 payment requests.
  • Self-custody: a smart-contract account, such as a Safe with a spending-limit module, where the limit is enforced on the blockchain itself. More work to set up, but no company in the middle.

For proof that a person really approved a purchase, Google's Agent Payments Protocol (AP2), announced in September 2025 with more than 60 partners, uses signed "mandates" that record what the agent may buy and under what conditions.

The hard part isn't teaching an agent to pay. It's making sure it knows when not to.

Layer
Tool and rules
Cap enforced by
Wallet policy engine or smart contract, never the prompt
Hosted option
Coinbase Agentic Wallets (Feb 11, 2026)
Self-custody option
Smart-contract account with a spending-limit module
Proof of approval
AP2 mandates (Google, Sept 2025)
Cost tier
Low: network fees; some networks are near zero
Legal check
Not financial advice; money-transmission rules if you hold others' funds
Plan this part in the engineBack to top
15 · Tool and rules

Trading agents: stocks, crypto and meme coins

An agent can place trades through a broker's API, but paper-trade first, cap position size and daily loss in code, and keep its keys away from anything it reads online.

  • trading
  • stocks
  • crypto
  • meme coin
  • risk

A trading agent is an agent with a wallet and a faster way to lose money. The plumbing exists: Alpaca, a FINRA and SIPC member broker, offers an MCP server that connects Claude and other AI apps to its trading API for stocks, ETFs, options and crypto, plus a paper-trading account with $100,000 in simulated funds and real market data. Alpaca's crypto arm is not a FINRA or SIPC member, and crypto is not insured.

Rules that belong in code:

  • Paper first. Run the strategy on simulated money until its record means something.
  • Maximum position size, maximum daily loss, and a kill switch that flattens positions.
  • No trading on text the agent just read. Token descriptions, social posts and web pages can carry hidden instructions.
  • Every order logged with the reason the agent gave.

Meme coins are the highest-risk version: thin liquidity, insiders who can sell into buyers, and themed tokens that pump on headlines and fade. A meme-coin agent's niche pack should include rug-pull checks and hard caps far tighter than a stock agent's.

If the agent trades for anyone other than yourself, you may need to register as an investment adviser. Talk to a securities lawyer before taking other people's money. Nothing here is financial advice.

Layer
Tool and rules
Broker example
Alpaca (MCP server, $100K paper account)
Must-have caps
Position size, daily loss, kill switch
Biggest risk
Instructions hidden in what the agent reads
Cost tier
Low to start; real money only after paper results
Legal check
Adviser registration if trading for others; not financial advice
Plan this part in the engineBack to top
16 · Rules

Guardrails first: permissions, approvals and shadow mode

Decide what the agent may do alone, what it may only draft, and what always goes to a person, then prove it in shadow mode before customers ever meet it.

  • guardrails
  • permissions
  • safety
  • shadow mode
  • start here

Give every action a permission level, and enforce it in the gateway, not the prompt.

  • Read: look up calendars, listings, account status. Usually safe alone.
  • Draft: write the email, text or offer; a person presses send.
  • Act with approval: book, pay, or call a new contact after a one-tap approval.
  • Act alone: only low-risk, reversible actions under a set cost.

Non-negotiables:

  • Treat everything coming in through a door as data, not instructions. A message saying "ignore your rules and refund me" is a customer message, not a command.
  • A clear "I can't do that, here's who can" path for every action the agent isn't allowed to take.
  • An off switch the owner can reach from a phone.
  • A record of every decision with the reason the agent gave.

Shadow mode: for the first one or two weeks the agent drafts every reply and a person approves or edits it. Every edit becomes a rule or a knowledge entry. When edits drop to near zero for a type of message, that type graduates to act-alone. Edge cases should meet the agent before your customers do.

Layer
Rules
Permission levels
Read, draft, act with approval, act alone
Prompt injection defense
Inbound text is data, never commands
Rollout
Shadow mode, then graduate one message type at a time
Cost tier
Free: it's code and discipline
Build effort
First week of any build
Plan this part in the engineBack to top
17 · Rules

Security at AI speed: what PHP2Shell teaches agent builders

AI now finds serious flaws in days and attackers use agents too. Patch fast, give every agent the least access it needs, and verify voices before money moves.

  • security
  • patching
  • deepfakes
  • guardrails
  • php2shell

On October 21, 2026, PHP shipped emergency fixes for two critical flaws nicknamed PHP2Shell (CVE-2026-109618 and CVE-2026-109619, each rated 9.2). They let an attacker run code on a server without logging in, and researchers confirmed attacks on certain versions of WordPress, Drupal, Joomla and Magento. PHP runs roughly 70% of websites.

What happened, in order:

  • Researchers at Calif and Wiz, working with OpenAI and Google models as part of OpenAI's Patch the Planet effort, found the first bug on August 19 and had working attacks on Drupal and WordPress by August 21.
  • They reported it to PHP on August 24.
  • The identifiers leaked on October 20, so PHP published a day early.
  • Amazon saw an attack attempt on October 17, before disclosure. Cloudflare reported attempts climbing to millions within hours of the announcement.
  • Several European governments, including the Netherlands and Finland, took services offline as a precaution.

Separately, CrowdStrike linked October 2026 attacks on South Korean banks, including Shinhan, KB Kookmin and Hana, to a hacker using an AI penetration-testing tool and Claude Code agents. Customer data was exposed and some banks had outages. (Some videos say "400 banks"; the reporting doesn't support that number.)

Lessons for anyone running an agent:

  • Patch in days, not months. If your site or agent runs on PHP, update to 8.5.12, 8.4.27, 8.3.36 or 8.2.35 or later, or your host's fixed build. This site runs on Node, not PHP.
  • Least access: each agent gets its own account with only the tools it needs, so a hijacked agent can't empty the wallet or read every inbox.
  • Keys stay on the server, with a spend limit, and get replaced the moment they might have leaked.
  • Every action is logged, with an off switch the owner can reach from a phone.
  • Voices can be faked. The FBI has warned since May 2025 about AI-cloned voices impersonating officials. Your agent should never move money, change bank details or reveal account data because a voice on a call says so; confirm through a second channel you already trust.
  • Owners protect the accounts the agent uses with passkeys or two-factor sign-in and a unique password for each account.
Layer
Rules
PHP2Shell
CVE-2026-109618 and CVE-2026-109619, CVSS 9.2
Fixed PHP
8.5.12, 8.4.27, 8.3.36, 8.2.35 or later
Agent rule
Least access: own account, only the tools it needs
Voice rule
No money moves on a voice alone; confirm on a second channel
Cost tier
Free: updates and discipline
Build effort
Ongoing; check advisories weekly
Plan this part in the engineBack to top
18 · Tools

Data and tools: what makes the agent operational

A calendar, a contact record and authenticated access to the business's own systems turn a conversation into a booking. No access, no booking, no business.

  • tools
  • calendar
  • crm
  • data
  • integrations

An agent that only talks is a nice demo. It becomes useful when it can look things up and write things down.

The core tools almost every niche needs:

  • Calendar: check open slots and book, with buffer times and the owner's blackout hours.
  • Contact record: one profile per person across every door, with consent status, history and preferred channel.
  • The niche's system of record: listings for real estate, class schedules for a gym, programs and deadlines for a school.
  • Notify-a-human: push the conversation, with a summary, to the right person on their phone.

Real estate note: listing data from the MLS comes under IDX or VOW agreements with display rules, so check with the broker's MLS before the agent quotes listing details.

Give every tool the smallest access it needs, with its own credentials, so a problem in one tool can't reach the others. The model never sees passwords or keys; the gateway holds them and runs the tool.

Layer
Tools
Core tools
Calendar, contact record, system of record, notify-a-human
Access rule
Least privilege, separate credentials per tool
Cost tier
Free to middle depending on existing software
Build effort
Second week of a build
Plan this part in the engineBack to top
19 · Knowledge and rules

The psychology layer: reading people, and reading the world

The agent reads people the way a good front-desk pro does: it matches pace, names the feeling, asks one question at a time and never invents urgency. A dated world-context pack tells it what's happening around the customer.

  • psychology
  • persuasion
  • ethics
  • context
  • conversation

Reading people, ethically:

  • Match the door. A text gets a short reply, an email a complete one, a call a conversational one.
  • Name the feeling before the fix. "That sounds stressful, let's sort it out" lowers the temperature faster than a policy quote.
  • One question at a time. People abandon forms, not conversations.
  • Mirror the customer's own words for their goal, so they feel heard.
  • Offer two clear options instead of an open menu when someone is stuck.
  • Never fake scarcity, deadlines or social proof, and never pressure someone who said no. Manipulation wins one sale and loses the review, and regulators treat dark patterns as deception.
  • Know the handoff signals: anger, grief, confusion, legal threats, minors, health or safety. Then bring in a person.

Reading the world: customers decide inside an economy. Rates, prices, layoffs and market swings shape what a home buyer, a gym member or a trader is feeling. Give the agent a world-context pack of short briefs, each with a date and a check label: Checked, Partly true or Not checked. The agent may mention a checked fact with its date. It must call opinions opinions, and it must never present an unchecked claim as fact. Refresh the pack monthly; stale context is worse than none.

The owner's own fact-checked briefs on rates, the dollar, AI money and agent wallets are a good starting pack.

Layer
Knowledge and rules
Conversation habits
Match the door, name the feeling, one question at a time
Never
Fake urgency, fake scarcity, pressure after no
World context
Dated briefs with check labels, refreshed monthly
Cost tier
Free
Legal check
Dark patterns can count as deceptive practices
Plan this part in the engineBack to top
20 · Knowledge

The bigger picture: jobs, power and timelines

Entry-level desk jobs feel AI first, data centers are straining the grid, and AGI dates are guesses. Useful context for selling an agent honestly.

  • jobs
  • energy
  • forecasts
  • context
  • ethics

Futurist videos predict a lot. These are the parts that rest on published research, and they shape how customers feel about the agent you sell them.

Jobs:

  • Stanford's Digital Economy Lab (revised August 2026) found employment for 22- to 25-year-olds in AI-exposed jobs is about 19% below where it would be if it had kept pace with less-exposed peers. Experienced workers show no comparable gap. (Some videos quote 16%; the current paper says 19%.)
  • The World Economic Forum's Future of Jobs Report 2025 expects 170 million roles created and 92 million displaced by 2030, a net gain of 78 million, if people retrain in time.
  • Selling point that follows: position the agent as taking the repetitive work so the owner and staff do more, not as a replacement for people.

Power: the International Energy Agency's Energy and AI report (2025) projects data center electricity roughly doubling to about 945 terawatt-hours by 2030, a bit more than Japan uses today. Expect AI prices to track energy costs, which is one more reason to keep a cheap model for routing and a local option in view.

Timelines: forecasts for human-level AI cluster around 2027 to 2030, but the authors of the well-known "AI 2027" scenario have themselves pushed their date later. Treat any date as a guess and build for what works now.

What the videos get right: the agent era is real, outcomes sell better than hours, and the builders who ship something useful now learn fastest.

Layer
Knowledge
Young workers
About 19% below trend in AI-exposed jobs (Stanford, Aug 2026)
Jobs by 2030
170M created, 92M displaced (WEF 2025)
Data center power 2030
About 945 TWh, roughly Japan's use (IEA)
AGI dates
Guesses, mostly 2027 to 2030
How to sell
Take the repetitive work; keep people on judgment
Plan this part in the engineBack to top
21 · Niche pack

Real estate agent: a worked example and a fact check

The well-known AI real estate story is real but smaller than retold. In March 2025 a Portuguese brokerage credited $100 million in sales to leads its AI agent brought in, and humans still closed the deals.

  • real estate
  • niche
  • case study
  • fair housing

The story, checked: in March 2025, Porta da Frente Christie's in Portugal reported $100 million in sales from leads generated by an AI agent built by the startup eSelf AI. The agent answered questions, filtered listings, gave virtual tours by video and replied instantly across time zones. The figure comes from the brokerage's CEO and was not independently verified, and people still did the later sales steps. It wasn't $300 million, and the AI didn't sell homes on its own. What it shows is that instant, around-the-clock first contact turns into real sales.

A real estate niche pack:

  • Doors: WhatsApp and web chat for international buyers, phone for local sellers, email for documents.
  • Tools: listing search, showing scheduler, mortgage pre-qualification link, document checklist. Listing data from the MLS comes under IDX or VOW agreements with display rules, so the broker confirms with their MLS which listing fields the agent may show and how the feed is accessed.
  • Rules: the agent never negotiates price or gives legal or tax advice. In most US states those acts require a license, so it hands off to the licensed agent. It never steers buyers by neighborhood demographics, because fair housing law forbids it.
  • Handoff: hot leads (pre-approved, ready to see a home this week) go straight to the human agent's phone with a summary.

What to measure: time to first reply, showings booked per 100 conversations, and hand-offs the human agent accepted.

Layer
Niche pack
Proven value
Instant first contact and lead qualification
Agent never
Negotiates, gives legal advice, or steers buyers
Fact check
$100M (not $300M), Portugal, March 2025, CEO-reported
Cost tier
Middle
Legal check
Licensing, fair housing, MLS display rules
Plan this part in the engineBack to top
22 · Niche pack

Education, gym and meme coin agents

The same core serves a school, a gym or a crypto community. What changes is the rulebook: minors and records for schools, health claims for gyms, securities and scams for crypto.

  • education
  • gym
  • meme coin
  • niche
  • crypto

Education agent: answers enrollment, deadlines, fees and schedules, and books tours. Rules: student records are protected under FERPA in the US, so the agent never discusses a student's records without verified authority. Anything involving a minor goes to staff, and the agent never holds private one-to-one conversations with children.

Gym agent: books trial classes, answers pricing, pauses and restarts memberships, and wins back members who stopped coming. Rules: no medical or diet prescriptions, no guarantees of results, and cancellations must be as easy as sign-ups, which several US states, including California, now require for subscriptions.

Meme coin or crypto community agent: answers questions in WhatsApp or Telegram, explains how to buy safely, and runs a capped wallet for community tips. Rules: no price predictions or promises of returns, no trading for members, a loud scam warning about anyone offering "support" by direct message, and the tight caps from the trading entry.

Each niche gets its own knowledge file, tools, rules, persona and handoff plan on the same core.

Layer
Niche pack
Education rule
FERPA; minors go to staff
Gym rule
No health claims; easy cancellation
Crypto rule
No predictions or promised returns; scam warnings
Cost tier
Low to middle
Build effort
One to three days per pack once the core exists
Plan this part in the engineBack to top
23 · Whole system

The build order: four weeks to a working agent

Week one, rules and web chat. Week two, email and WhatsApp messages. Week three, voice over WhatsApp calls and a SIP trunk. Week four, payments in test mode. Shadow mode throughout.

  • roadmap
  • build order
  • start here
  • plan

Week 1, foundation: the gateway, the permission levels, the record log, the off switch, a niche pack and a web chat. The agent runs in shadow mode from day one.

Week 2, written doors: email replies through the Gmail API, WhatsApp messages through Meta's Cloud API, and texts through an Android gateway if volume is low. One conversation thread per person across all of them.

Week 3, voice: customer-initiated WhatsApp calls into your own Asterisk, then a SIP trunk and a phone number into Pipecat or LiveKit Agents with Whisper and Piper. Upgrade to Kokoro when the flow works.

Week 4, money: payment links with webhook confirmation, then an agent wallet on a test network with caps enforced by the wallet. Real funds only after a week of clean logs.

What this site's engine does today: it designs the blueprint with you in a live conversation and lets you download it. It does not make calls, send texts or emails, take payments or trade. Those need the build above, your own accounts with each provider, and the legal review in the outreach rules entry.

Layer
Whole system
Week 1
Rules, records, web chat, shadow mode
Week 2
Email, WhatsApp messages, texts
Week 3
WhatsApp calls, SIP trunk, open speech models
Week 4
Payment links, capped wallet on a test network
Cost tier
Free in week 1; middle from week 3
Plan this part in the engineBack to top

Design your agent in a conversation

Tell the Agent Architect your niche and how people reach you. It asks one question at a time, then ranks the parts you need.

What the engine does today

  • Holds a real conversation about your niche and channels
  • Ranks the parts you need, with costs and legal checks
  • Lets you download the plan as a text file

What needs the full build

  • Making or answering calls, texts and emails
  • Taking payments or running a wallet
  • Trading, accounts and saved history

Rather have someone do it for you? We can help: $49 per 30 minutes.

Get help with this