Lead Triage Agent
An agent sorts each lead and drafts a reply that the owner approves from a phone.
- AI SDK
- Approval
- Drafts
Install
npx skills add webrenew/skills --skill launch-lead-triage-agent1 file · 321 lines · any agent that reads SKILL.md
Use it when
- The owner reads every enquiry by hand
- Replies take long because each one starts from nothing
- You want AI replies without AI mistakes reaching customers
What your agent delivers
- A card for each lead: service, urgency, fit and what is missing
- A draft that states only facts from the business profile
- Code checks that hold back any invented price, time or promise
Source files
Read every line before you install. Copy or download one file.
SKILL.md
321 lines
---
name: launch-lead-triage-agent
description: >
Build an AI agent that reads each new lead for a small business, sorts it (service, urgency,
fit, spam), pulls out the key details, and drafts a personal reply for the owner to approve
from a phone. Use this skill when the user wants AI lead triage, lead scoring, an AI inbox,
auto-drafted replies, "sort my enquiries", or "reply to leads with AI". Built with the
Vercel AI SDK (structured output) and Trigger.dev. Follows launch-agent-guardrails.
---
# Lead Triage Agent: Every Lead Sorted, Every Reply Drafted
**RULE: The agent sorts and drafts. The owner approves before anything reaches the
customer, until the owner's own approval record says a reply type can go out alone.**
The owner gets a short card for each lead instead of a raw form email: who, what, how urgent,
whether it is a fit, what is missing, and a reply that is ready to send with one tap.
Read `launch-agent-guardrails` first. This skill applies those rules to one agent.
## Flow
```
form stores lead (launch-lead-capture)
-> Trigger.dev task "lead-intake" (launch-lead-capture)
-> prepareTriage(lead) (this skill, when LEAD_TRIAGE_ENABLED=true)
-> load business profile (versioned)
-> model call with structured output
-> code checks (grounding, spam)
-> store triage + draft
-> sendOwnerAlert(lead, triage) (launch-lead-capture: one alert, ever)
-> the triage card: Approve / Edit / Reject
-> or, if triage failed, the plain alert
owner approves -> send the personal reply (Resend)
```
The customer's instant "we got your request" email comes from `launch-speed-to-lead`, not
from this agent. The approved draft is a second, personal message that answers their
question. Triage never changes the lead's `status`; only the owner and webhooks do.
## 1. The business profile
The agent knows only what the profile says. Keep it in the database or in a typed config,
with a version number that each triage records. It takes the business identity (name, phone,
hours, service area) from `lib/business.ts` in `launch-local-seo`, so the site, the schema
and the agent never disagree; `lib/business.ts` wins for those fields. The profile adds only
what triage needs: the version, services with prices, the booking link, the tone and the
phrases to avoid. Bump the version whenever either file changes.
```ts
// lib/business-profile.ts
import { business } from "@/lib/business" // launch-local-seo: the one business identity
/** "07:00" -> "7am", "18:30" -> "6:30pm": the form customers and drafts use. */
function clockTime(time: string): string {
const [hour = 0, minute = 0] = time.split(":").map(Number)
const suffix = hour < 12 ? "am" : "pm"
return `${hour % 12 || 12}${minute ? `:${String(minute).padStart(2, "0")}` : ""}${suffix}`
}
Related skills
All skills- 22
Agent Guardrails
Launch packlaunch-agent-guardrails
Rules that make a customer-facing agent safe to turn on and easy to trust.
Rules that make a customer-facing agent safe to turn on and easy to trust.
- 23
Site Health Report
Launch packlaunch-site-health-report
Know the site works without checking it: daily alerts and a weekly report.
Know the site works without checking it: daily alerts and a weekly report.
- 01
Technical SEO
Growth & marketingseo-technical
Make each page clear to search engines. Give them a path to every link.
Make each page clear to search engines. Give them a path to every link.
- 02
Local SEO
Launch packGrowth & marketinglaunch-local-seo
Get found by customers nearby, in local search and on Google Maps.
Get found by customers nearby, in local search and on Google Maps.