40% off everything — use code SAVE40 at checkout · ends in …
Skip to content
phpguru.store
Ages 18+ Intermediate

Build and Sell AI Agents to Local Businesses (in PHP)

Build an AI reply agent for a local business, take it live on WhatsApp, and sell it as a service you can stand behind.

Sixteen lessons from finding the first client to monthly care: a complete reply agent in plain PHP and MySQL on shared hosting, the WhatsApp Cloud API, costs in rupees, customers' data, pricing and the proposal.

  • 16 lessons
  • Intermediate
  • Plain PHP + MySQL
  • Tested on free stand-ins
  • One-time payment

Last updated 10/2026 English Read online + Word file Created by phpguru.store

What you'll learn

  • Choose a niche, find a first client honestly, and write a scope that says what the agent answers, collects, hands over and never does
  • Build a complete reply agent in plain PHP and MySQL: signed webhook, Claude call with structured output and prompt caching, and replies sent exactly once
  • Keep the model in check with code: a price guard, masking of OTP, card and Aadhaar numbers, off-topic and prompt-injection handling, and emergencies
  • Hand chats to a person and back, and work within WhatsApp's 24-hour customer-service window
  • Make it reliable on shared hosting with leases, unique keys, a cron sweeper and a monthly spending cap
  • Practise and test everything against free stand-ins for the Claude and WhatsApp APIs, then rehearse real answers with the business owner
  • Connect a client's number to the WhatsApp Cloud API, estimate the running costs in rupees, and look after customers' data
  • Price your work, write the proposal and agreement, hand the agent over, and run monthly care
₹999$29

One-time payment · 16 lessons · Read online + Word file

Read lesson 1 free

Secured by Razorpay · we never see your card/UPI details

A guest house, a clinic, a coaching class, a salon or a shop gets the same twenty questions on WhatsApp every day, many of them after closing time. A reply agent answers the ones it can from the business's own information, collects the details for the ones it can't, and hands those to a person. This course teaches you to build that agent properly and to sell it as a service you can stand behind.

It has four parts. Find the job: choose a niche, find a first client without spamming anyone, and write an honest scope. Build it: a complete reply agent in plain PHP and MySQL, with no Composer, that runs on ordinary shared hosting, covering the webhook, the Claude call with structured output and prompt caching, guardrails such as the price guard and masking of OTP and Aadhaar numbers, hand-over to a person, WhatsApp's 24-hour window, and the database tricks that stop duplicates and double replies. Every line of its code is printed in the lessons. Go live: connect a client's number to the WhatsApp Cloud API, work out the running costs in rupees, and handle customers' data properly under India's DPDP Act. Sell and support it: price your work, write the proposal and agreement, hand it over, and look after it every month.

How the code was tested: every code example was tested against simulated versions of the Claude API and the WhatsApp Cloud API that run on your own computer, not against the live services. Lesson 5 prints both stand-ins, so you can practise with no API key and no cost. Real answers from Claude will be worded differently, which is why lesson 10 shows you how to rehearse with your own key, and get the business owner's sign-off, before any customer sees the agent.

This course does not promise clients or income; what you earn depends on the businesses you find and the work you do. The first lesson is free, the course reads online with your progress saved, you keep it as a Word document, and a certificate of completion is included (a certificate of completion from phpguru.store, not an accredited qualification). Prefer to start from a finished, installable version? The AI Reply Agent is sold separately and in a package with this course.

Is this you?

  • Local businesses miss WhatsApp enquiries at night, and you could fix that, but you have never built or sold an AI agent.
  • Agent courses are in Python and stop at a demo: no hosting, no WhatsApp, no client.
  • You're worried an AI could quote a wrong price or promise a booking to a real customer.
  • You don't know what to charge, what it costs to run, or what to put in writing.

This course is written to take you from exactly that point to a result you can see.

What you'll build

A reply agent you can put live for a real business

  • A signed WhatsApp webhook that stores each message once
  • Claude replies with structured output and prompt caching
  • A price guard and masking of OTP, card and Aadhaar numbers
  • Hand-over to a person and the 24-hour window
  • Leases and unique keys: never two replies
  • Free stand-ins for the Claude and WhatsApp APIs
  • A rehearsal script the owner signs off
  • Cost estimates in rupees and a monthly cap

Before and after this course

Before

  • “I have never built an AI agent for a client.”
  • “I don't know how to keep one from saying something wrong.”
  • “I don't know what to charge or what to promise.”

After

  • “I can scope, build and connect a reply agent.”
  • “Mine checks prices, hands over and never double-replies.”
  • “I can price the work and write the proposal.”

Why learn it this way

  1. Read
  2. Code
  3. Test
  4. Build
  5. Deploy

Every code example was tested against simulated versions of the Claude and WhatsApp APIs that run on your own computer, and the lessons print both. They are not tested against the live services: real answers from Claude will be worded differently, which is why lesson 10 teaches rehearsing with your own key before a customer sees the agent.

Judge it yourself before you pay

  • Lesson 1 is free, in full. Read it and try the code — that is exactly the quality of every other lesson. Read it now →
  • The full curriculum is on this page. All 16 lessons, with what each covers — you know what you're buying.
  • Written by the team that builds the PHP systems sold on this site — the same PHP 8, PDO and security practices our own management systems ship with.
  • Secure checkout by Razorpay, instant access, and email support if a lesson doesn't make sense.

Before you start

  • PHP 8.1 or newer and MySQL on your computer; you can read PHP and write a SQL query
  • No API key is needed to follow the lessons: every example runs against free stand-ins on your own computer. To go live you need an Anthropic API key with a little credit, a Meta developer account and hosting with HTTPS
  • Every code example was tested against simulated versions of the Claude and WhatsApp APIs, not the live services; real answers from Claude will differ, and lesson 10 shows how to rehearse them before a client sees the agent
  • The Agentic AI Course is a useful companion but not required

Curriculum

Lesson 1 is free to read, no account needed. The rest unlock the moment you buy.

  1. 1 What a local business will pay an AI agent to do Preview free The one job a reply agent does for a guest house, clinic, coaching class, salon or shop; why that job sells when "an AI chatbot" doesn't; what Meta allows on WhatsApp since January 2026; and what you will build, test and sell in this course. 5 min
  2. 2 Choosing a niche and finding your first client Why one niche beats five, the signs of a good first client, how to find one without spamming anybody, the ten questions to ask in the first conversation, and the one fact about WhatsApp numbers every owner must hear early. 4 min
  3. 3 Scoping honestly — what the agent will and won't do Write a one-page scope before writing any code. Decide what the agent answers, what it collects, when it hands over, what it never does, and how it tells customers it is an AI. Then learn to say no to the jobs that don't fit. 4 min
  4. 4 Anatomy of a reply agent The whole path of one customer message, from Meta's webhook to the reply on their phone. The files of the agent you will build, the settings kept outside the web root, the webhook, and the order of decisions in run_batch(), the heart of the agent. 7 min
  5. 5 Practise for free with a stand-in API Two small PHP files that pretend to be the Claude API and the WhatsApp Cloud API on your own computer, so you can build and test the whole agent with no key and no cost. Also the Claude client itself, every way a call can fail, and how to switch to a real key safely. 10 min
  6. 6 The client's knowledge as a cached system prompt Turn the business's facts into a system prompt that is identical on every call, so the API can cache it. Write the knowledge so the model can't misread it, ask for a structured answer your code can act on, and keep the changing details out of the cached part. 6 min
  7. 7 Guardrails — what the prompt asks, what the code makes sure of Two layers of safety. The prompt asks the model to behave; your PHP makes sure the worst mistakes can't reach a customer. Covers the price guard, masking OTPs and Aadhaar numbers, off-topic requests and prompt injection, clinics and emergencies, and what guardrails can't do. 7 min
  8. 8 Hand-over and the 24-hour window How a chat passes from the agent to a person and back, what the customer is told, how the owner hears about it, and WhatsApp's 24-hour customer-service window, which decides when anyone, person or agent, may reply freely. 5 min
  9. 9 Reliability on shared hosting The six things that go wrong when real messages arrive — duplicates, bursts, slow AI, crashes, outages and a full budget — and the database tricks that handle each one on plain shared hosting, with no queue server and no background workers. 7 min
  10. 10 Rehearsal before the client sees it A rehearsal file of real questions, a script that runs them through the agent's own prompt, model and guards, and the routine that turns "it seems to work" into an answer sheet the owner has read and signed. First against the stand-in, then with your own key. 5 min
  11. 11 Connecting a client's number to the WhatsApp Cloud API The steps to take an agent live on the WhatsApp Cloud API, in plain words. Start on Meta's free test number, then the client's own Business portfolio and app, the webhook and its verification, a permanent token, registering the real number, and the checks that tell you it works. Plus the code that checks every webhook is really from Meta. 7 min
  12. 12 What it costs to run, in rupees The three running costs of a reply agent, WhatsApp, AI and hosting, worked out for a small business with the prices dated. Includes the cost calculator, why caching changes the bill, why thinking tokens count, and how to swap the estimate for real numbers after a week. 5 min
  13. 13 Privacy — your client's customers' data What personal data the agent handles, where it goes, and the habits that keep a small business on the right side of India's Digital Personal Data Protection Act: a clear purpose, collecting the minimum, deleting on schedule, erasing on request, and a privacy notice customers can read. Not legal advice. 5 min
  14. 14 Pricing your service Price your time, not the AI. List the work, time yourself, set a one-time setup fee and a monthly care fee from your own hourly rate, keep the running costs on the client's own accounts, and explain the price in the owner's terms. No income promises here, just a method. 5 min
  15. 15 Proposal, agreement and handover Turn the scope and the price sheet into a one-page proposal, agree the terms that prevent the usual disputes (who owns the accounts, what care includes, how it ends), hand the agent over so the owner can run it day to day, and pick the right licence if you build on the AI Reply Agent. 4 min
  16. 16 Monthly care, and the capstone The routine that keeps an agent right after go-live: what to read every week, what to check every month, the outside changes to watch for (prices, models, Meta's API), when to end an engagement, and a capstone that takes one business from first conversation to signed-off rehearsal. 4 min

Save with a package

This course is part of a learning package — bought together for one payment, with every course read online and its Word file included. The saving is computed from the members' current prices.

How it works

  1. 1 · Buy once

    One payment in your own currency, no subscription. Your account is created from the email you pay with.

  2. 2 · Log in and read

    Every lesson opens in your account on any device. Mark each one done and pick up where you left off.

  3. 3 · Keep the Word file

    The whole course as a .docx — annotate it, print it, read it offline. Re-download it any time from your orders.

Where this course fits

  1. AI for PHP Developers
  2. Build and Sell AI Agents · you are here
  3. Agentic AI Course

Questions about this course

Has the code been run against the real APIs?

No. Every example was tested against simulated versions of the Claude API and the WhatsApp Cloud API on your own computer (both are printed in lesson 5). Real answers from Claude will differ, so lesson 10 shows how to rehearse with your own key and get the owner's sign-off before go-live.

Do I need an API key to follow the lessons?

No. The exercises run on the free stand-ins. To take an agent live you need an Anthropic API key with a little credit, a Meta developer account and hosting with HTTPS.

Will this get me clients or income?

The course makes no such promise. It teaches the method, gives you tested code and real cost figures, and shows how to price and scope honestly; finding clients and doing the work is up to you.

How is it different from the AI Reply Agent?

The course teaches you to build, sell and support a reply agent yourself, with every line of a smaller agent printed in the lessons. The AI Reply Agent is the finished product, with a setup wizard, inbox, leads and team accounts. They are sold separately and together as a package.

Is there a certificate?

Yes, a certificate of completion when you finish every lesson. It is a completion certificate from phpguru.store, not an accredited qualification.

Is this a video course?

No — it's written to be read. Every lesson is built around code you type and run yourself, with exercises at the end, and takes about 6 minutes to read. Code is text; reading it lets you copy, search and re-read the exact line you're stuck on.

What exactly do I get?

Two things: the lessons online in your account (with your progress saved), and the same content as one Word document (.docx) you download and keep. Both are delivered instantly after payment.

Do I need an account?

It's made for you at checkout from the email you pay with — you log in with a one-time code sent to that email (or Google), no password to remember.

Which PHP version is this written for?

PHP 8, using PDO prepared statements, password hashing and the practices our own management systems ship with — not the decade-old mysql_* code most free tutorials still carry.

Can I get a refund?

Like our software, courses are delivered instantly and are non-refundable — which is why lesson 1 is free to read and the full curriculum is listed above before you buy. See the refund policy.

₹599$17.40
₹999$29
40% off

Code SAVE40 applied at checkout · ends in …

One-time payment · Read online + Word file · No subscription · Billed in USD, international cards accepted

Read lesson 1 free

Secured by Razorpay. We never see your card/UPI details.

  • 16 lessons, about 90 minutes of reading
  • Read online in your account, on any device
  • Progress saved lesson by lesson
  • The whole course as a Word (.docx) file
  • Printable certificate of completion when you finish
  • Access doesn't expire — no subscription
  • Email support if a lesson doesn't make sense

What happens after you pay

  1. 1. The Word file link appears on-screen and is emailed to you
  2. 2. Log in with the same email (one-time code, no password) and every lesson is open
  3. 3. Read at your own pace — mark lessons done as you go

Courses are delivered instantly and are non-refundable — which is why the first lesson is free to read before you decide.