How to Build Your First AI Agent in 30 Minutes


Small businesses do not win by having the most features. They win by answering faster, reducing manual work, and staying consistent when everyone else is tired. An AI agent gives you all three. The point is not to replace people. The point is to automate the first pass, protect your time, and hand off cleanly when a human is needed.


This guide shows you how to ship a simple, useful agent in half an hour. You will define a narrow scope, write a strong system prompt with GPT-5, assemble and test the agent in Replit Agent 3, then deploy and monitor it.


We will build one concrete example you can copy: a Lead Qualifier and Reply Agent that reads inbound web form submissions or emails, scores the lead, drafts a reply, and books a meeting if the lead meets your rules.





What you will have at the end



  • A scoped agent problem statement, tools list, inputs, outputs, audience, and success metrics
  • A production-ready system prompt, including error handling, edge cases, and examples
  • A tested plan and working build in Replit Agent 3
  • Logging, a short user guide, and a basic monitoring checklist



Time target: 30 minutes of focused build time, then light tuning as you observe real use.





Step 1: Define your agent scope



Scope keeps you fast and honest. Use the checklist as written. Fill it out in plain English.


1. What specific problem does it solve


Example: “Triage new leads from the website and reply within 2 minutes. If budget and timeline match, send my Calendly link. If not, send a polite decline with resources.”


2. What tools and APIs does it need access to


  • Email or CRM intake: Gmail or Outlook API, or a CRM webhook
  • Calendar: Google Calendar or Calendly link
  • Knowledge: a simple FAQ file or a Notion page
  • Storage: Google Sheet or small database table for logs
  • Optional: Slack or Teams for human handover alerts



Keep the list short. Fewer tools means fewer failures.


3. Expected input and desired output


  • Input: JSON payload from your contact form, or the body of an inbound email
  • Output A: A human-sounding reply that answers the question and includes a next step
  • Output B: A lead score and reason summary
  • Output C: A log line with timestamp, decision, and confidence score



4. Who will use it and how often


  • Internal user: you or your assistant
  • Frequency: 10 to 100 messages per day
  • Where: runs on each new form submission or email thread



5. What does success look like, measurably


Pick numbers that matter.


  • Median first response time under 2 minutes
  • Meeting conversion rate from qualified leads above 25 percent
  • Manual interventions under 10 percent after week two
  • Zero off-brand replies logged



Save this scope in a single page. You will paste parts of it into your prompt later.





Step 2: Use GPT-5 to write your system prompt



A strong prompt is a contract. It defines behavior, guardrails, and style.



2.1 Describe the workflow step by step



Copy this template into GPT-5 and customize the bracketed parts.

ROLE: You are Lead Qualifier and Reply Agent for [Company]. 

OBJECTIVE: Reply to new inquiries within 2 minutes, qualify using the rules, and book meetings when warranted. 


WORKFLOW:

1) Parse input: source, sender, message, contact fields, and context.

2) Determine intent: sales lead, support, spam, or other.

3) If support: reply with support resources and route to [support@].

4) If spam or empty: label as spam, log, and stop.

5) If sales lead: apply qualification rules.

   - Budget: at least [£X] or unknown.

   - Timeline: project start within [Y weeks].

   - Fit: services requested match [service list].

6) Decision:

   - If qualified: draft friendly reply, answer their question, propose two time slots from calendar, include [Calendly URL].

   - If unclear: ask up to 3 clarifying questions in one message.

   - If unqualified: decline politely and link to [resources or referral].

7) Style: warm, concise, professional. Avoid hype. Use plain English.

8) Output: 

   - `reply_text` ready to send, 

   - `classification` in {qualified, unclear, unqualified, support, spam}, 

   - `lead_score` 0 to 100 with reasons,

   - `next_action` in {send_reply, route_support, stop}, 

   - `log` object with timestamp and key fields.


2.2 Include error handling and edge cases



Add this block:

ERROR HANDLING AND EDGE CASES:

- Missing email address: do not send. Ask for a valid contact path.

- Attachments only, no text: acknowledge receipt, ask a specific question.

- Non-English: reply in the sender's language when possible, else state language limits.

- Multiple questions: answer all in a numbered list.

- Sensitive topics or custom quotes: escalate to human and do not commit pricing.

- Tool failure (calendar or CRM): send reply without links, ask them to suggest two times.


2.3 Define success criteria and failure modes


SUCCESS CRITERIA:

- Reply keeps brand voice and solves the user’s immediate next step.

- Decision is consistent with qualification rules.

- Log fields are complete and machine-readable JSON.


FAILURE MODES:

- Sends calendar link to spam. 

- Confirms custom price without approval.

- Tone is off-brand or too long.

- Drops required log fields.


2.4 Specify personality and communication style



Keep it simple and durable.

PERSONALITY AND STYLE:

- Friendly, precise, and calm.

- Vary sentence length. Avoid jargon. No emojis.

- Use “we” for the company voice. 


2.5 Add examples of good versus bad outputs



Provide at least one pair for each decision path.


Good, qualified


Thanks for reaching out about a Shopify redesign. Based on your timeline in September and a starting budget of £6,000, we look like a fit.

Here are two options for a quick call this week: Tuesday 10:30, Thursday 14:00. If either works, use this link to book directly: [Calendly].

If you would like us to review your current store first, reply with your URL and top three goals.


Bad, qualified


Great news we can definitely help and we are the best in the market. Here is my link just book.


Why it is bad: vague promise, no specifics, off-brand tone, no next steps beyond a link.


Good, unclear


Thanks for your note. To confirm fit, could you share your approximate budget range, ideal start date, and a sentence on your main goal. I will reply with a yes or a referral within the hour.


Good, unqualified


Thank you for considering us. For projects under £1,500 we recommend [Resource A] and [Resource B]. If your scope changes, reply here and we can revisit.


Paste these examples directly into the “Examples” section of your system prompt.





Step 3: Use Replit Agent 3 to build and test



You now have a specification and a prompt. Time to assemble and run it.



3.1 Paste your prompt and requirements



  • Create a new Replit Agent 3 project
  • Paste the system prompt and the scope notes
  • Provide API keys as project secrets: email, calendar, and your simple storage




3.2 Let the agent plan the architecture and identify dependencies



Expect a plan with:


  • Input handler for email or webhook payloads
  • Classifier function for intent and lead scoring
  • Reply composer that calls GPT-5 with your system prompt
  • Calendar helper for available slots
  • Logger that writes JSON rows to your sheet or table
  • Optional Slack notifier for handovers



Review the plan. Check the assumptions against your scope.



3.3 Review the planned approach before building



Ask for a dependency list and a minimal diagram. Confirm:


  • How retries are handled
  • What happens if the calendar API is down
  • Where logs are stored
  • How to toggle from test to live




3.4 Build



Have Agent 3 generate the code for handlers, helper functions, and a simple test harness. Keep the footprint small. You can add features later.



3.5 Test in real browser conditions with actual data



Use three real messages: one qualified, one unclear, one spammy.

Record for each: decision, reply text, log output, and time to respond.



3.6 Iterate based on test results



If tone is long, add a word limit.

If it books calls too easily, raise the budget threshold.

If logs are missing fields, upgrade the output schema in the prompt.





Step 4: Deploy and monitor




4.1 Set up logging and error tracking



Minimum viable logging: a Google Sheet with columns for timestamp, sender, decision, score, reply length, next action, and error message if any.

Add daily rollups: counts per class, median response time, and conversion rate from qualified to booked.



4.2 Create user documentation



One page is enough:


  • What the agent does
  • What it never does
  • How to hand off to a human
  • How to pause it
  • Where the logs live
  • Who owns the keys




4.3 Plan for maintenance and updates



  • Weekly review for the first month
  • Then monthly rule updates
  • Quarterly style refresh to keep voice aligned with your brand




4.4 Monitor performance and user feedback



  • Add a one-line survey to your meeting confirmation email: “Was our reply clear”
  • Track intervention rate. If more than 10 percent need manual fixes for a week, pause and adjust.






A complete worked example you can copy



Agent name: Lead Qualifier and Reply Agent

Problem: Qualify and reply to web leads within 2 minutes

Tools: Gmail API, Google Calendar or Calendly, GPT-5, Google Sheet, optional Slack

Inputs: name, email, message, company, budget, timeline

Outputs: reply_text, classification, lead_score, next_action, log JSON

Users: owner and assistant

Success: under 2-minute median reply, above 25 percent booking from qualified leads, below 10 percent manual interventions


Qualification rules


  • Budget at least £3,000 or unknown
  • Timeline within 8 weeks
  • Services match one of: Shopify design, funnel build, content retainer



Prompt excerpt


  • See the Step 2 template. Paste in your brand details and rules.



Test cases


  1. “We want a Shopify rebuild in September. Budget 5k to 8k.”
    Expected: qualified, reply with two time slots and link, score above 80.
  2. “Need a logo for £200. Can you do it this weekend”
    Expected: unqualified, reply with friendly referral list.
  3. “Hi”
    Expected: unclear, ask three clarifying questions in one message.



Monitoring


  • Update a small Looker Studio or Data Studio dashboard for counts and rates
  • Daily check for errors or off-brand replies






Common pitfalls and how to avoid them



Scope creep

If you add five features, you will triple your edge cases. Lock the rules for two weeks. Improve the prompt before you add a new tool.


Unclear brand voice

Provide three short example replies in your prompt. Your agent will mirror what you show.


No guardrails around price

Tell the agent to propose ranges only when allowed, and never confirm a bespoke price.


Silent failures

Always log decisions and output length. Short replies and missing logs are early warnings.


Over-automation

Keep a human handover path in every branch. Make it easy to say, “I am moving this to our team.”





Variations for other small business needs



  • Support Deflection Agent: reads incoming support emails, identifies the product area, returns a numbered fix list, and attaches one help article.
  • Abandoned Cart Concierge: pulls the last viewed items, sends a gentle reminder, includes a simple tip, and one incentive that meets your policy.
  • Invoice Clarifier: detects common questions about line items or VAT, explains the charge, and routes to finance if the customer replies twice.
  • Post-Meeting Follow-up Writer: reads your meeting transcript, drafts a three-point summary with action items, and files it in your CRM.



All four follow the same build path. Only the inputs, outputs, and rules change.





Your 30-minute plan, minute by minute



  • 00 to 05: Write the one-page scope with rules and metrics
  • 05 to 15: Generate the system prompt with GPT-5 and paste your examples
  • 15 to 25: In Replit Agent 3, paste the prompt, review the plan, and build the minimal functions
  • 25 to 30: Test three messages, adjust tone and thresholds, turn on logging



Ship it. Then improve it weekly, not daily.





Simple templates you can copy



Qualification rubric

Score = 0..100

+40 budget meets threshold or unknown with enterprise domain

+25 timeline within window

+25 services match

+10 message clarity

-20 spam indicators

Decision: qualified if score >=70; unclear if 40..69; unqualified if <40

Log row

{

  "ts": "ISO8601",

  "sender": "name <email>",

  "class": "qualified|unclear|unqualified|support|spam",

  "score": 0..100,

  "reply_len": integer,

  "next_action": "send_reply|route_support|stop",

  "notes": "short reason"

}

Brand style block

Voice: friendly, precise, calm.

Length: 120 to 180 words per first reply.

Structure: greet, one-sentence summary of their request, one helpful fact, one next step.

Banned phrases: “supercharge,” “game-changer,” “disrupt.”

Paste these blocks into your prompt and code.





Alternatives you might consider



  • If you prefer no code: Use Make or Zapier for intake and routing, and keep GPT-5 calls within the automation.
  • If you want a data lake later: Log to a Postgres table from the start.
  • If you want human-in-the-loop: Route all first replies to Slack for one-tap approve during week one, then switch to automatic send.
  • If your work is compliance heavy: Keep the agent write-only to a draft mailbox. A human sends the final version.






Action plan you can apply today



  1. Choose one problem with a clear yes or no decision.
  2. Fill the Step 1 scope in five minutes.
  3. Generate your Step 2 prompt with GPT-5, including examples.
  4. Build the minimal pipeline in Replit Agent 3.
  5. Test three real messages, fix tone and thresholds, then go live.
  6. Review logs daily for a week, then weekly. Tighten rules as needed.



If you follow the steps without skipping, you will have a small, quiet machine that does a boring job well. That is the kind of win that compounds.





How this draft was produced



Method


  • Took your four-step outline as the backbone
  • Chose a narrow example agent for small business owners
  • Expanded each step into checklists, templates, and copy-paste blocks
  • Added test cases, logging schema, guardrails, and metrics



Other valid approaches


  • Start with a support agent rather than sales, since risk is lower
  • Build a human-in-the-loop stage for week one before auto-sending
  • Use no-code automation for transport, keep the agent focused on the reasoning



Quick next steps


  • Paste the templates into GPT-5 and Replit Agent 3
  • Ship a minimal version in 30 minutes
  • Review logs tomorrow morning and tighten the rules by 10 percent


Comments

Popular posts from this blog

Running Your Business: A Simple Guide to Operations and Getting Things Done

How to Start Your Own Business: A Step-by-Step Guide for First-Time Entrepreneurs

YouTube’s Algorithm Revolution: 22 Changes Transforming Content Creation in 2025