diff --git a/skills/ads-optimizer/SKILL.md b/skills/ads-optimizer/SKILL.md new file mode 100644 index 000000000..1015859ae --- /dev/null +++ b/skills/ads-optimizer/SKILL.md @@ -0,0 +1,225 @@ +--- +name: ads-optimizer +description: AI-powered ad campaign management with performance audits, optimization analysis, A/B testing, and anomaly detection. +author: MCF Agentic +version: 1.0.0 +tags: [advertising, campaigns, optimization, analytics, ab-testing, anomaly-detection, google-ads, meta-ads] +pricing: x402 (USDC on Base) +gateway: https://gateway.mcfagentic.com +--- + +# Ads Optimizer + +Manage and optimize advertising campaigns with AI-driven analysis. Run performance audits, get optimization recommendations, manage A/B tests, and detect spending anomalies before they burn budget. Built for AI agents that manage paid media on behalf of clients. + +## Authentication + +All endpoints require x402 payment (USDC on Base L2). Send a request without payment to receive pricing info in the 402 response. + +## Endpoints + +### Manage Campaigns +- **Method:** POST +- **Path:** /api/ads/campaigns +- **Price:** $0.05 per call +- **Description:** Create or update an ad campaign configuration. Tracks platform, budget, targeting, and creative details. + +**Request:** +```json +{ + "name": "HVAC Dallas - Search", + "platform": "google-ads", + "type": "search", + "daily_budget": 50.00, + "targeting": { + "location": "Dallas, TX", + "radius_miles": 25, + "keywords": ["hvac repair near me", "ac installation dallas", "heating repair"], + "negative_keywords": ["diy", "how to"] + }, + "bid_strategy": "maximize-conversions", + "landing_page": "https://comfortzonehvac.com/schedule" +} +``` + +**Response:** +```json +{ + "id": "camp_3x8rp4", + "name": "HVAC Dallas - Search", + "platform": "google-ads", + "status": "active", + "daily_budget": 50.00, + "created_at": "2026-04-01T15:00:00Z" +} +``` + +### Run Audit +- **Method:** POST +- **Path:** /api/ads/audits +- **Price:** $0.50 per call +- **Description:** Run a full AI audit on a campaign. Analyzes spend efficiency, keyword performance, audience targeting, creative fatigue, and competitor positioning. + +**Request:** +```json +{ + "campaign_id": "camp_3x8rp4", + "date_range": { + "start": "2026-03-01", + "end": "2026-03-31" + }, + "include_competitor_analysis": true +} +``` + +**Response:** +```json +{ + "audit_id": "aud_9m2kf7", + "campaign_id": "camp_3x8rp4", + "overall_score": 72, + "spend_total": 1550.00, + "conversions": 31, + "cost_per_conversion": 50.00, + "findings": [ + {"severity": "high", "area": "keywords", "finding": "3 keywords consuming 40% of budget with zero conversions", "action": "pause-keywords"}, + {"severity": "medium", "area": "bidding", "finding": "CPC 23% above industry average for HVAC", "action": "adjust-bids"}, + {"severity": "low", "area": "creative", "finding": "Ad copy unchanged for 45 days, CTR declining", "action": "refresh-creative"} + ], + "estimated_savings_monthly": 320.00 +} +``` + +### Optimization Analysis +- **Method:** POST +- **Path:** /api/ads/optimization/analyze +- **Price:** $0.25 per call +- **Description:** Get specific optimization recommendations for a campaign. Returns actionable changes with projected impact. + +**Request:** +```json +{ + "campaign_id": "camp_3x8rp4", + "optimization_goal": "lower-cpa", + "constraints": { + "min_daily_budget": 30.00, + "max_daily_budget": 75.00 + } +} +``` + +**Response:** +```json +{ + "recommendations": [ + { + "action": "pause-keywords", + "targets": ["hvac repair near me", "heating system cost"], + "reason": "High spend, zero conversions in 30 days", + "projected_savings": "$210/mo" + }, + { + "action": "increase-bid", + "targets": ["ac installation dallas"], + "reason": "Top performer, currently losing impression share", + "projected_impact": "+8 conversions/mo" + }, + { + "action": "add-negative-keywords", + "targets": ["free", "cost of", "average price"], + "reason": "Informational queries burning budget", + "projected_savings": "$85/mo" + } + ], + "projected_new_cpa": 38.50, + "projected_improvement": "23%" +} +``` + +### Manage A/B Tests +- **Method:** POST +- **Path:** /api/ads/tests +- **Price:** $0.10 per call +- **Description:** Create and track A/B tests on ad creative, landing pages, or bidding strategies. + +**Request:** +```json +{ + "campaign_id": "camp_3x8rp4", + "test_type": "ad-copy", + "variant_a": { + "headline": "Top-Rated HVAC Repair in Dallas", + "description": "Same-day service. Licensed technicians. Call now." + }, + "variant_b": { + "headline": "AC Broken? Dallas Experts On Call", + "description": "4.8 stars, 500+ reviews. Book online in 30 seconds." + }, + "traffic_split": 50, + "duration_days": 14, + "success_metric": "conversion-rate" +} +``` + +**Response:** +```json +{ + "id": "test_5k7nw2", + "campaign_id": "camp_3x8rp4", + "status": "running", + "start_date": "2026-04-01", + "end_date": "2026-04-15", + "traffic_split": "50/50" +} +``` + +### Detect Anomalies +- **Method:** GET +- **Path:** /api/ads/anomalies +- **Price:** $0.10 per call +- **Description:** Scan campaigns for spending anomalies, sudden performance drops, or suspicious click patterns. + +**Request:** +``` +GET /api/ads/anomalies?campaign_id=camp_3x8rp4&lookback_days=7 +``` + +**Response:** +```json +{ + "anomalies": [ + { + "type": "spend-spike", + "severity": "high", + "detected_at": "2026-03-29T08:00:00Z", + "details": "Daily spend jumped 340% ($50 to $220) due to broad match keyword expansion", + "recommended_action": "Review and restrict match types" + }, + { + "type": "ctr-drop", + "severity": "medium", + "detected_at": "2026-03-30T12:00:00Z", + "details": "CTR dropped 45% on headline variant A, possible ad fatigue", + "recommended_action": "Rotate creative" + } + ] +} +``` + +## Use Cases + +- A media buying agent audits client campaigns monthly and implements optimizations +- An autonomous budget guardian monitors for anomalies and pauses runaway spend +- A creative agent runs A/B tests on ad copy and reports winning variants +- An analytics agent produces monthly performance reports with actionable insights +- A sales agent includes ad optimization as part of a managed services package + +## Pricing + +| Endpoint | Price | Description | +|----------|-------|-------------| +| /api/ads/campaigns | $0.05 | Create/update campaigns | +| /api/ads/audits | $0.50 | Full AI campaign audit | +| /api/ads/optimization/analyze | $0.25 | Optimization recommendations | +| /api/ads/tests | $0.10 | Manage A/B tests | +| /api/ads/anomalies | $0.10 | Anomaly detection scan | diff --git a/skills/crm-engine/SKILL.md b/skills/crm-engine/SKILL.md new file mode 100644 index 000000000..89be77743 --- /dev/null +++ b/skills/crm-engine/SKILL.md @@ -0,0 +1,207 @@ +--- +name: crm-engine +description: Full CRM with accounts, leads, deals, contacts, pipelines, and work orders — built for AI agents. +author: MCF Agentic +version: 1.0.0 +tags: [crm, sales, leads, deals, contacts, pipeline, work-orders] +pricing: x402 (USDC on Base) +gateway: https://gateway.mcfagentic.com +--- + +# CRM Engine + +A complete CRM system designed for autonomous AI agents. Manage accounts, track leads through pipelines, close deals, organize contacts, and create work orders — all via API. Built to be the persistent memory layer for sales and service agents. + +## Authentication + +All endpoints require x402 payment (USDC on Base L2). Send a request without payment to receive pricing info in the 402 response. + +## Endpoints + +### Create Account +- **Method:** POST +- **Path:** /api/crm/accounts +- **Price:** $0.05 per call +- **Description:** Create a new business account in the CRM. + +**Request:** +```json +{ + "name": "Comfort Zone HVAC", + "industry": "HVAC", + "website": "comfortzonehvac.com", + "phone": "214-555-0142", + "address": "1200 Commerce St, Dallas, TX 75201", + "tags": ["prospect", "hvac", "dallas"] +} +``` + +**Response:** +```json +{ + "id": "acc_8x2kf9", + "name": "Comfort Zone HVAC", + "created_at": "2026-04-01T14:30:00Z", + "status": "active" +} +``` + +### Manage Leads +- **Method:** POST +- **Path:** /api/crm/leads +- **Price:** $0.05 per call +- **Description:** Create or update a lead. Leads track prospective clients through qualification stages. + +**Request:** +```json +{ + "account_id": "acc_8x2kf9", + "contact_name": "Mike Torres", + "email": "mike@comfortzonehvac.com", + "source": "ai-pipeline", + "stage": "qualified", + "score": 85, + "notes": "Needs scheduling automation, no current CRM" +} +``` + +**Response:** +```json +{ + "id": "lead_3m7np2", + "account_id": "acc_8x2kf9", + "stage": "qualified", + "score": 85, + "created_at": "2026-04-01T14:31:00Z" +} +``` + +### Manage Deals +- **Method:** POST +- **Path:** /api/crm/deals +- **Price:** $0.05 per call +- **Description:** Create or update a deal. Track revenue opportunities through your sales pipeline. + +**Request:** +```json +{ + "lead_id": "lead_3m7np2", + "account_id": "acc_8x2kf9", + "title": "AI Scheduling Bundle - Comfort Zone HVAC", + "value": 5964, + "currency": "USD", + "stage": "proposal", + "close_date": "2026-04-15" +} +``` + +**Response:** +```json +{ + "id": "deal_9k4rt1", + "title": "AI Scheduling Bundle - Comfort Zone HVAC", + "value": 5964, + "stage": "proposal", + "pipeline_id": "pipe_default" +} +``` + +### Manage Contacts +- **Method:** POST +- **Path:** /api/crm/contacts +- **Price:** $0.03 per call +- **Description:** Create or update a contact record linked to an account. + +**Request:** +```json +{ + "account_id": "acc_8x2kf9", + "first_name": "Mike", + "last_name": "Torres", + "email": "mike@comfortzonehvac.com", + "phone": "214-555-0142", + "role": "Owner" +} +``` + +**Response:** +```json +{ + "id": "con_5h8jw3", + "account_id": "acc_8x2kf9", + "full_name": "Mike Torres", + "role": "Owner" +} +``` + +### List Pipelines +- **Method:** GET +- **Path:** /api/crm/pipelines +- **Price:** $0.02 per call +- **Description:** List all sales pipelines and their stages. + +**Request:** +``` +GET /api/crm/pipelines +``` + +**Response:** +```json +{ + "pipelines": [ + { + "id": "pipe_default", + "name": "Default Sales Pipeline", + "stages": ["prospect", "qualified", "proposal", "negotiation", "closed-won", "closed-lost"] + } + ] +} +``` + +### Create Work Order +- **Method:** POST +- **Path:** /api/crm/work-orders +- **Price:** $0.05 per call +- **Description:** Create a work order tied to an account or deal. Track deliverables, tasks, and service fulfillment. + +**Request:** +```json +{ + "account_id": "acc_8x2kf9", + "deal_id": "deal_9k4rt1", + "title": "Set up AI scheduling system", + "description": "Deploy scheduling engine, configure availability, train staff", + "priority": "high", + "due_date": "2026-04-20" +} +``` + +**Response:** +```json +{ + "id": "wo_2n6qp8", + "title": "Set up AI scheduling system", + "status": "open", + "priority": "high", + "created_at": "2026-04-01T14:35:00Z" +} +``` + +## Use Cases + +- An AI sales agent closes a deal and needs to create the account, contact, and work order automatically +- A lead-gen pipeline deposits qualified leads directly into the CRM for follow-up +- An autonomous agent tracks deal progression and updates stages based on email replies +- A service agent creates work orders when contracts are signed +- An analytics agent pulls pipeline data to forecast revenue + +## Pricing + +| Endpoint | Price | Description | +|----------|-------|-------------| +| /api/crm/accounts | $0.05 | Create or update accounts | +| /api/crm/leads | $0.05 | Create or update leads | +| /api/crm/deals | $0.05 | Create or update deals | +| /api/crm/contacts | $0.03 | Create or update contacts | +| /api/crm/pipelines | $0.02 | List pipelines and stages | +| /api/crm/work-orders | $0.05 | Create or update work orders | diff --git a/skills/email-engine/SKILL.md b/skills/email-engine/SKILL.md new file mode 100644 index 000000000..ed036833a --- /dev/null +++ b/skills/email-engine/SKILL.md @@ -0,0 +1,186 @@ +--- +name: email-engine +description: Send emails, bulk campaigns, AI-powered classification, auto-reply generation, and template management. +author: MCF Agentic +version: 1.0.0 +tags: [email, outreach, campaigns, ai-classification, auto-reply, templates] +pricing: x402 (USDC on Base) +gateway: https://gateway.mcfagentic.com +--- + +# Email Engine + +Send transactional and outreach emails, run bulk campaigns, classify inbound messages with AI, generate contextual replies, and manage reusable templates. Designed for AI agents that need to communicate with humans over email as part of autonomous workflows. + +## Authentication + +All endpoints require x402 payment (USDC on Base L2). Send a request without payment to receive pricing info in the 402 response. + +## Endpoints + +### Send Email +- **Method:** POST +- **Path:** /api/email/send +- **Price:** $0.02 per call +- **Description:** Send a single email. Supports HTML and plain text, attachments, and reply-to threading. + +**Request:** +```json +{ + "to": "mike@comfortzonehvac.com", + "from": "cameron@mcfagentic.com", + "subject": "Quick question about your scheduling, Mike", + "body_html": "

Hi Mike,

I noticed Comfort Zone HVAC is crushing it on reviews...

", + "body_text": "Hi Mike, I noticed Comfort Zone HVAC is crushing it on reviews...", + "reply_to": "cameron@mcfagentic.com", + "track_opens": true, + "track_clicks": true +} +``` + +**Response:** +```json +{ + "id": "msg_4k9xr2", + "status": "sent", + "to": "mike@comfortzonehvac.com", + "sent_at": "2026-04-01T14:40:00Z" +} +``` + +### Send Bulk +- **Method:** POST +- **Path:** /api/email/send-bulk +- **Price:** $0.01 per recipient +- **Description:** Send a campaign to multiple recipients. Supports personalization variables and staggered delivery. + +**Request:** +```json +{ + "template_id": "tmpl_cold_outreach_v2", + "recipients": [ + {"email": "mike@comfortzonehvac.com", "variables": {"first_name": "Mike", "company": "Comfort Zone HVAC"}}, + {"email": "sarah@northtexasair.com", "variables": {"first_name": "Sarah", "company": "North Texas Air"}} + ], + "from": "cameron@mcfagentic.com", + "stagger_minutes": 5, + "track_opens": true +} +``` + +**Response:** +```json +{ + "campaign_id": "camp_7n3mp1", + "total_recipients": 2, + "status": "queued", + "estimated_completion": "2026-04-01T14:50:00Z" +} +``` + +### AI Classify +- **Method:** POST +- **Path:** /api/email/ai/classify +- **Price:** $0.05 per call +- **Description:** Classify an inbound email using AI. Returns intent, sentiment, urgency, and suggested action. + +**Request:** +```json +{ + "subject": "Re: Quick question about your scheduling", + "body": "Hey Cameron, this sounds interesting. We've been struggling with scheduling for a while. Can you tell me more about pricing?", + "sender": "mike@comfortzonehvac.com" +} +``` + +**Response:** +```json +{ + "classification": { + "intent": "interested", + "sentiment": "positive", + "urgency": "medium", + "category": "sales-reply", + "suggested_action": "send-pricing", + "confidence": 0.94 + } +} +``` + +### AI Reply +- **Method:** POST +- **Path:** /api/email/ai/reply +- **Price:** $0.10 per call +- **Description:** Generate a contextual reply to an email thread using AI. Takes conversation history and CRM context. + +**Request:** +```json +{ + "thread": [ + {"from": "cameron@mcfagentic.com", "body": "Quick question about your scheduling..."}, + {"from": "mike@comfortzonehvac.com", "body": "This sounds interesting. Can you tell me more about pricing?"} + ], + "context": { + "lead_stage": "qualified", + "solution": "ai-scheduling-bundle", + "monthly_price": "$497" + }, + "tone": "casual-professional", + "goal": "book-a-call" +} +``` + +**Response:** +```json +{ + "reply": { + "subject": "Re: Quick question about your scheduling", + "body": "Hey Mike,\n\nGlad it caught your eye. The AI scheduling package runs $497/mo and typically pays for itself within the first month...", + "call_to_action": "calendar-link" + } +} +``` + +### Manage Templates +- **Method:** POST +- **Path:** /api/email/templates +- **Price:** $0.02 per call +- **Description:** Create or update reusable email templates with personalization variables. + +**Request:** +```json +{ + "name": "Cold Outreach v2", + "subject": "Quick question about your {{pain_point}}, {{first_name}}", + "body_html": "

Hi {{first_name}},

I noticed {{company}} is doing great work in {{industry}}...

", + "variables": ["first_name", "company", "industry", "pain_point"] +} +``` + +**Response:** +```json +{ + "id": "tmpl_cold_outreach_v2", + "name": "Cold Outreach v2", + "variables": ["first_name", "company", "industry", "pain_point"], + "created_at": "2026-04-01T14:45:00Z" +} +``` + +## Use Cases + +- An outreach agent sends personalized cold emails to leads from the pipeline +- A support agent classifies inbound emails and routes them to the right workflow +- An autonomous sales agent generates and sends follow-up replies based on prospect responses +- A marketing agent runs drip campaigns across segmented lead lists +- An agent orchestrator monitors email threads and escalates urgent messages + +## Pricing + +| Endpoint | Price | Description | +|----------|-------|-------------| +| /api/email/send | $0.02 | Send a single email | +| /api/email/send-bulk | $0.01/recipient | Bulk campaign send | +| /api/email/ai/classify | $0.05 | AI email classification | +| /api/email/ai/reply | $0.10 | AI reply generation | +| /api/email/templates | $0.02 | Create/update templates | diff --git a/skills/lead-gen-pipeline/SKILL.md b/skills/lead-gen-pipeline/SKILL.md new file mode 100644 index 000000000..981ee468f --- /dev/null +++ b/skills/lead-gen-pipeline/SKILL.md @@ -0,0 +1,178 @@ +--- +name: lead-gen-pipeline +description: Autonomous 6-agent pipeline that researches industries, finds businesses, and generates personalized outreach — one API call. +author: MCF Agentic +version: 1.0.0 +tags: [lead-generation, outreach, sales, ai-research, cold-email, pipeline, autonomous] +pricing: x402 (USDC on Base) +gateway: https://gateway.mcfagentic.com +--- + +# Lead Generation Pipeline + +This is not just an API — it is a full autonomous research and outreach pipeline powered by 6 coordinated AI agents. Send an industry and location, and the pipeline discovers real businesses, researches them deeply, identifies pain points, matches solution packages, and writes personalized cold emails ready to send. One call replaces hours of manual prospecting. + +## Authentication + +All endpoints require x402 payment (USDC on Base L2). Send a request without payment to receive pricing info in the 402 response. + +## Endpoints + +### Generate Leads +- **Method:** POST +- **Path:** /api/pipeline/generate-leads +- **Price:** $1.00 per call +- **Description:** Full pipeline run. Provide an industry and location, receive a list of researched leads with pain-point analysis, matched solutions, and ready-to-send outreach emails. + +**Request:** +```json +{ + "industry": "HVAC contractors", + "location": "Dallas, TX", + "count": 10, + "solution_focus": "ai-automation" +} +``` + +**Response:** +```json +{ + "leads": [ + { + "business_name": "Comfort Zone HVAC", + "contact_name": "Mike Torres", + "email": "mike@comfortzonehvac.com", + "phone": "214-555-0142", + "website": "comfortzonehvac.com", + "pain_points": ["manual scheduling", "missed follow-ups", "no online booking"], + "matched_solution": "ai-scheduling-bundle", + "outreach_email": { + "subject": "Quick question about your scheduling, Mike", + "body": "..." + }, + "research_summary": "15-person operation, 4.2 Google rating, heavy residential focus..." + } + ], + "pipeline_metadata": { + "agents_used": 6, + "businesses_scanned": 47, + "leads_qualified": 10, + "processing_time_seconds": 38 + } +} +``` + +### Research Business +- **Method:** POST +- **Path:** /api/pipeline/research-business +- **Price:** $0.50 per call +- **Description:** Deep AI research on a single business. Returns company profile, tech stack signals, pain points, competitive landscape, and decision-maker contacts. + +**Request:** +```json +{ + "business_name": "Comfort Zone HVAC", + "location": "Dallas, TX", + "website": "comfortzonehvac.com" +} +``` + +**Response:** +```json +{ + "profile": { + "name": "Comfort Zone HVAC", + "industry": "HVAC", + "estimated_revenue": "$2M-5M", + "employee_count": "10-20", + "years_in_business": 12, + "google_rating": 4.2, + "review_count": 187 + }, + "tech_signals": ["no online booking", "basic WordPress site", "no CRM detected"], + "pain_points": ["manual scheduling", "missed follow-ups", "no review automation"], + "competitors": ["ABC Cooling", "North Texas Air"], + "contacts": [ + {"name": "Mike Torres", "role": "Owner", "email": "mike@comfortzonehvac.com"} + ] +} +``` + +### Write Outreach +- **Method:** POST +- **Path:** /api/pipeline/write-outreach +- **Price:** $0.25 per call +- **Description:** Generate a personalized cold email for a specific business based on research data. Returns subject line, body, and follow-up sequence. + +**Request:** +```json +{ + "business_name": "Comfort Zone HVAC", + "contact_name": "Mike Torres", + "pain_points": ["manual scheduling", "missed follow-ups"], + "solution": "ai-scheduling-bundle", + "tone": "casual-professional" +} +``` + +**Response:** +```json +{ + "email": { + "subject": "Quick question about your scheduling, Mike", + "body": "Hi Mike,\n\nI noticed Comfort Zone HVAC is crushing it on Google reviews (4.2 stars, nice). But I also noticed you don't have online booking — which usually means your front desk is fielding a ton of calls...", + "follow_up_1": { "delay_days": 3, "subject": "...", "body": "..." }, + "follow_up_2": { "delay_days": 7, "subject": "...", "body": "..." } + }, + "personalization_score": 0.92 +} +``` + +### Browse Solutions +- **Method:** GET +- **Path:** /api/pipeline/solutions +- **Price:** Free +- **Description:** Browse available solution packages that can be matched to leads. Use this to understand what offerings the pipeline can recommend. + +**Request:** +``` +GET /api/pipeline/solutions +``` + +**Response:** +```json +{ + "solutions": [ + { + "id": "ai-scheduling-bundle", + "name": "AI Scheduling & Booking", + "monthly_price": "$497", + "description": "Automated appointment scheduling with AI phone answering", + "best_for": ["HVAC", "plumbing", "dental", "med-spa"] + }, + { + "id": "review-reputation", + "name": "Review & Reputation Engine", + "monthly_price": "$297", + "description": "Automated review requests, response generation, reputation monitoring" + } + ] +} +``` + +## Use Cases + +- An AI sales agent needs to build a prospect list for a specific vertical and geography +- An autonomous outreach system needs personalized emails that reference real business data +- A consulting agent needs to research a potential client before a call +- A marketing agent wants to identify pain points across an entire industry segment +- An agent orchestrator needs to feed qualified leads into a CRM or email sequence + +## Pricing + +| Endpoint | Price | Description | +|----------|-------|-------------| +| /api/pipeline/generate-leads | $1.00 | Full pipeline: research + qualify + outreach | +| /api/pipeline/research-business | $0.50 | Deep AI research on one business | +| /api/pipeline/write-outreach | $0.25 | Personalized cold email generation | +| /api/pipeline/solutions | Free | Browse available solution packages | diff --git a/skills/scheduling-engine/SKILL.md b/skills/scheduling-engine/SKILL.md new file mode 100644 index 000000000..13f56557f --- /dev/null +++ b/skills/scheduling-engine/SKILL.md @@ -0,0 +1,188 @@ +--- +name: scheduling-engine +description: AI-powered appointment scheduling with staff management, availability windows, and booking automation. +author: MCF Agentic +version: 1.0.0 +tags: [scheduling, appointments, booking, calendar, availability, staff-management] +pricing: x402 (USDC on Base) +gateway: https://gateway.mcfagentic.com +--- + +# Scheduling Engine + +Manage appointments, staff schedules, and availability windows programmatically. Built for AI agents that need to book meetings, manage calendars, and coordinate schedules as part of sales, service, or operations workflows. Handles timezone conversion, conflict detection, and smart slot suggestions. + +## Authentication + +All endpoints require x402 payment (USDC on Base L2). Send a request without payment to receive pricing info in the 402 response. + +## Endpoints + +### Create Appointment +- **Method:** POST +- **Path:** /api/scheduling/appointments +- **Price:** $0.05 per call +- **Description:** Book an appointment. Automatically checks for conflicts and confirms availability. + +**Request:** +```json +{ + "title": "Discovery Call - Comfort Zone HVAC", + "start_time": "2026-04-03T10:00:00-05:00", + "duration_minutes": 30, + "staff_id": "staff_cameron", + "attendees": [ + {"name": "Mike Torres", "email": "mike@comfortzonehvac.com"} + ], + "type": "discovery-call", + "notes": "Interested in AI scheduling bundle, $497/mo", + "send_confirmation": true +} +``` + +**Response:** +```json +{ + "id": "apt_6r2nw8", + "title": "Discovery Call - Comfort Zone HVAC", + "start_time": "2026-04-03T10:00:00-05:00", + "end_time": "2026-04-03T10:30:00-05:00", + "staff_id": "staff_cameron", + "status": "confirmed", + "confirmation_sent": true, + "meeting_link": "https://meet.mcfagentic.com/apt_6r2nw8" +} +``` + +### List Appointments +- **Method:** GET +- **Path:** /api/scheduling/appointments +- **Price:** $0.02 per call +- **Description:** List appointments with optional filters for date range, staff, and status. + +**Request:** +``` +GET /api/scheduling/appointments?staff_id=staff_cameron&start_date=2026-04-01&end_date=2026-04-07 +``` + +**Response:** +```json +{ + "appointments": [ + { + "id": "apt_6r2nw8", + "title": "Discovery Call - Comfort Zone HVAC", + "start_time": "2026-04-03T10:00:00-05:00", + "duration_minutes": 30, + "status": "confirmed" + } + ], + "total": 1 +} +``` + +### Manage Staff +- **Method:** POST +- **Path:** /api/scheduling/staff +- **Price:** $0.03 per call +- **Description:** Create or update staff profiles. Define who can be booked and their default settings. + +**Request:** +```json +{ + "name": "Cameron Fagan", + "email": "cameron@mcfagentic.com", + "timezone": "America/Chicago", + "default_meeting_duration": 30, + "booking_buffer_minutes": 15, + "max_daily_meetings": 8 +} +``` + +**Response:** +```json +{ + "id": "staff_cameron", + "name": "Cameron Fagan", + "timezone": "America/Chicago", + "status": "active" +} +``` + +### Check Availability +- **Method:** GET +- **Path:** /api/scheduling/availability-windows +- **Price:** $0.02 per call +- **Description:** Get available time slots for a staff member within a date range. Returns bookable windows accounting for existing appointments and buffer times. + +**Request:** +``` +GET /api/scheduling/availability-windows?staff_id=staff_cameron&date=2026-04-03&duration=30 +``` + +**Response:** +```json +{ + "staff_id": "staff_cameron", + "date": "2026-04-03", + "timezone": "America/Chicago", + "available_slots": [ + {"start": "09:00", "end": "09:30"}, + {"start": "10:30", "end": "11:00"}, + {"start": "11:00", "end": "11:30"}, + {"start": "13:00", "end": "13:30"}, + {"start": "14:00", "end": "14:30"}, + {"start": "15:00", "end": "15:30"} + ] +} +``` + +### Set Availability Windows +- **Method:** POST +- **Path:** /api/scheduling/availability-windows +- **Price:** $0.03 per call +- **Description:** Define recurring availability windows for a staff member. Set working hours, blocked times, and day-off overrides. + +**Request:** +```json +{ + "staff_id": "staff_cameron", + "recurring": [ + {"day": "monday", "start": "09:00", "end": "17:00"}, + {"day": "tuesday", "start": "09:00", "end": "17:00"}, + {"day": "wednesday", "start": "09:00", "end": "17:00"}, + {"day": "thursday", "start": "09:00", "end": "17:00"}, + {"day": "friday", "start": "09:00", "end": "12:00"} + ], + "blocked": [ + {"date": "2026-04-04", "reason": "Company holiday"} + ] +} +``` + +**Response:** +```json +{ + "staff_id": "staff_cameron", + "availability_updated": true, + "next_available": "2026-04-03T09:00:00-05:00" +} +``` + +## Use Cases + +- A sales agent books a discovery call after a lead expresses interest via email +- An AI receptionist checks availability and schedules appointments from inbound requests +- A service agent coordinates technician schedules for work order fulfillment +- An orchestrator agent manages a consultant's calendar across multiple client engagements +- A follow-up agent reschedules missed appointments automatically + +## Pricing + +| Endpoint | Price | Description | +|----------|-------|-------------| +| /api/scheduling/appointments (POST) | $0.05 | Create an appointment | +| /api/scheduling/appointments (GET) | $0.02 | List appointments | +| /api/scheduling/staff | $0.03 | Create/update staff profiles | +| /api/scheduling/availability-windows (GET) | $0.02 | Check available slots | +| /api/scheduling/availability-windows (POST) | $0.03 | Set availability rules |