InboxMate Ecosystem Reference
Use this skill to understand the InboxMate product, its architecture, outreach pipeline, and how to query data across systems.
Architecture
InboxMate is a module (chatwidget) within the AgentHub platform — a full-stack Nuxt 3 + Supabase + Socket.IO SaaS.
Repos & Key Files
| Repo |
Purpose |
Key Files |
| agenthub |
Full-stack app (InboxMate + AgentHub) |
server/api/mcp.post.ts (demo MCP), app/pages/demo.vue (demo page), server/utils/scraping.ts (Tavily/Firecrawl), server/utils/subscriptionUtils.ts (tiers), app/components/InboxMatePricingModal.vue |
| notification-service |
Email drafts, templates, funnel analytics |
src/routes/drafts.ts (draft CRUD), src/routes/stats.ts + frontend/pages/funnel.vue (funnel) |
| psquared-websites |
Marketing sites |
apps/inboxmate/ (inboxmate.psquared.dev), apps/psquared/ (psquared.dev) |
| psquared-skills |
Pipeline skills |
skills/ directory |
URLs
| Service |
URL |
| InboxMate app |
app.psquared.dev (chatwidget module) |
| Demo pages |
demo.inboxmate.psquared.dev/?id=<demoId> |
| Marketing site |
inboxmate.psquared.dev |
| Company site |
psquared.dev |
| Notification admin |
notifications.psquared.dev/drafts |
| CRM |
crm.psquared.dev |
| Analytics |
ackee.psquared.dev |
Demo Pipeline
/find-leads [N] → CRM companies + people (German B2B, UWG-compliant)
↓
/inboxmate-batch-demo → Demos created, opportunities at SCREENING/PENDING_REVIEW
↓
/review-demos → demoStatus: OK_TO_SEND or NEEDS_FIX
↓
/fix-demos → Fixes applied, reset to PENDING_REVIEW
↓
/plan-campaign → CRM campaign created, opportunities linked with shared deadline
↓
/setup-email-drafts → Email drafts at notifications.psquared.dev/drafts
↓
Human review + send → demoStatus: SENT, outreachSentAt timestamped
↓
/check-outreach-status → Follow-up drafts created (5+ days after send)
↓
/check-demo-analytics → Pipeline health report (Ackee + CRM)
↓
/refurbish-demos → Upgrade knowledge for campaign demos (clear + re-scrape via MCP)
CRM State Machine (Twenty CRM)
Opportunity.demoStatus
| Status |
Meaning |
PENDING_REVIEW |
Demo built, awaiting QA |
OK_TO_SEND |
QA passed, ready for outreach |
NEEDS_FIX |
QA failed, needs corrections |
SENT |
Initial outreach email sent |
FOLLOW_UP_SENT |
Follow-up email sent |
SKIP_FAULTY_WEBSITE |
Website unreachable/broken |
SKIP_IRRELEVANT |
Company not a fit |
SKIPPED |
Generic skip |
DISQUALIFIED |
Permanently excluded |
Opportunity.demoType
| Value |
Meaning |
CHATBOT (or null = legacy) |
Personalized chatbot demo (/inboxmate-demo) |
INBOX |
Demo-Postfach: seeded pre-triaged inbox (/inboxmate-inbox-demo), email-product outreach. CRM view "InboxMate Email Outreach" filters on this. |
Opportunity.stage
| Stage |
Meaning |
NEW |
Fresh lead, no outreach |
SCREENING |
Outreach phase |
MEETING |
Responded / call scheduled |
PROPOSAL |
Quoted or decision-maker demo |
CUSTOMER |
Paying customer |
Campaign Structure
Campaigns group opportunities into sendable batches with shared offerExpiresAt and offerText. Created by /plan-campaign, consumed by /setup-email-drafts.
How to Query Each System
CRM (Twenty) — GraphQL
- Endpoint:
https://crm.psquared.dev/graphql
- Auth:
Authorization: Bearer $PSQUARED_CRM_TOKEN
- Key objects:
companies, people, opportunities, campaigns, tasks, notes
Example — list opportunities in a campaign:
query {
opportunities(filter: { campaignId: { eq: "CAMPAIGN_ID" } }) {
edges { node { id name stage demoStatus demoUrl } }
}
}
Supabase (AgentHub DB)
- Project:
fevtfywriufbqnvbgyrm
- Tool:
mcp__plugin_supabase_supabase__execute_sql
- Key tables:
demo_pages, agents, knowledge, knowledge_bucket_items, knowledge_bucket_chunks, chats, messages, accounts
Example — find chats on demo agents:
SELECT dp.company_name, c.id as chat_id, c.created_at,
(SELECT count(*) FROM messages m WHERE m.chat_id = c.id) as msg_count
FROM demo_pages dp
JOIN chats c ON c.agent_id = dp.agent_id
ORDER BY c.created_at DESC
Ackee Analytics — GraphQL
- Endpoint:
https://ackee.psquared.dev/api
- Auth:
Authorization: Bearer $ACKEE_TOKEN
- Demo domain ID:
4bdddc8c-11d9-4d7e-ab94-aeb7866f0bb2
- CTA event ID:
0f037f1c-c2c0-4205-b90d-3cb9bf66f9c2
Example — get demo page views:
query {
domain(id: "4bdddc8c-11d9-4d7e-ab94-aeb7866f0bb2") {
statistics { views(interval: MONTHLY, type: UNIQUE) { count } }
facts { viewsMonth viewsToday activeVisitors }
}
}
Notification Service — REST
- Base URL:
https://notifications.psquared.dev
- Auth (admin):
Authorization: Bearer $BEARER_TOKEN
- Auth (drafts only):
Authorization: Bearer $EMAIL_DRAFT_ONLY_BEARER
Key endpoints:
GET /drafts?status=SENT&pageSize=50 — list sent emails
GET /drafts/:id — read full email (html_body, variables, subject)
POST /drafts/create — create draft from template
POST /drafts/send — send drafts { draftIds: [...] }
GET /stats/funnel — full conversion funnel data
GET /drafts/campaigns — list CRM campaigns with draft counts
InboxMate MCP — JSON-RPC
- Endpoint:
https://app.psquared.dev/api/mcp
- Auth:
Authorization: Bearer $NUXT_MCP_DEMO_TOKEN
- Protocol: JSON-RPC 2.0
Key tools:
clear_bucket — remove all items from a knowledge bucket
scrape_and_build_knowledge — scrape URLs via Tavily, create knowledge items with real sourceUrls
create_agent, update_prompt, update_widget_style, publish_agent
create_knowledge_bucket, add_to_bucket, set_knowledge
create_demo_page, update_demo_page, list_demos, get_demo
create_inbox_demo, update_inbox_demo — Demo-Postfach (type='inbox': seeded pre-triaged inbox, no agent)
list_bucket_items, list_knowledge, get_knowledge
Key Metrics
| Metric |
Source |
How to check |
| Demo page views |
Ackee |
Query demo domain statistics |
| CTA clicks |
Ackee |
Query CTA event |
| Emails sent |
Notification service |
GET /drafts?status=SENT |
| Chat interactions |
Supabase |
chats JOIN demo_pages on agent_id |
| Pipeline funnel |
Notification service |
GET /stats/funnel |
| Hot leads |
CRM |
Opportunities with stage > SCREENING |
| Campaign status |
CRM + Notification service |
Campaigns + draft counts per campaign |
Environment Variables
All in /Users/martinpammesberger/Documents/psquared/claude-overlord-folder/.env:
| Variable |
Service |
PSQUARED_CRM_TOKEN |
Twenty CRM GraphQL |
NUXT_MCP_DEMO_TOKEN |
InboxMate MCP endpoint |
NUXT_TAVILY_SEARCH_API_KEY |
Tavily web scraping |
EMAIL_DRAFT_ONLY_BEARER |
Notification service (draft creation) |
NOTIFICATIONS_SERVICE_BEARER_TOKEN |
Notification service (admin) |
ACKEE_TOKEN |
Ackee analytics |
Pricing Tiers (credits model, since 2026-06)
Note: If prices change, this table must be updated. The /price-change skill handles pricing updates across all touchpoints — make sure this file is included in the update list.
Model: pay per Postfach (mailbox) + AI credits (chat reply 1, email draft 2, tool call/scrape/PDF 1; setup & rule-based sorting free). Manual invoicing — no Stripe checkout.
| Tier |
Price |
Postfächer |
Credits/mo |
Notes |
| Free |
€0 |
0 (chatbot only) |
50 |
widget funnel |
| Starter |
€49/mo (monthly only) |
1 (extra €19) |
500 |
full email automation from here |
| Pro |
€129/mo · €107 yearly |
3 (extra €15) |
2,500 |
API+MCP, marketplace; demo discount → €86 first year |
| Business |
ab €349/mo, custom |
15+ |
10,000+ |
custom integrations (first incl.), white-label, SLA; demo offer €199 first year |
Top-ups: €9/€8 per 1,000 (Starter/Pro), instant grant, invoiced afterwards. All paid plans 14-day free trial, no credit card.
Knowledge System
Agents use RAG (vector search) over knowledge buckets:
- Each bucket contains knowledge items (text entries with
sourceUrl)
- Items are chunked and embedded for vector similarity search
- When the agent's
searchKnowledge tool is called, it returns matching chunks WITH their sourceUrl
- The widget UI shows sources as clickable links in citations
To upgrade knowledge quality: clear_bucket → scrape_and_build_knowledge with real page URLs → publish_agent
1---2name: analyse-inboxmate3description: Reference guide for understanding the InboxMate ecosystem - architecture, repos, pipeline, CRM states, metrics, and how to query each system. Use when starting any InboxMate-related work.4---56# InboxMate Ecosystem Reference78Use this skill to understand the InboxMate product, its architecture, outreach pipeline, and how to query data across systems.910## Architecture1112InboxMate is a module (`chatwidget`) within the **AgentHub** platform — a full-stack Nuxt 3 + Supabase + Socket.IO SaaS.1314### Repos & Key Files1516| Repo | Purpose | Key Files |17|---|---|---|18| **agenthub** | Full-stack app (InboxMate + AgentHub) | `server/api/mcp.post.ts` (demo MCP), `app/pages/demo.vue` (demo page), `server/utils/scraping.ts` (Tavily/Firecrawl), `server/utils/subscriptionUtils.ts` (tiers), `app/components/InboxMatePricingModal.vue` |19| **notification-service** | Email drafts, templates, funnel analytics | `src/routes/drafts.ts` (draft CRUD), `src/routes/stats.ts` + `frontend/pages/funnel.vue` (funnel) |20| **psquared-websites** | Marketing sites | `apps/inboxmate/` (inboxmate.psquared.dev), `apps/psquared/` (psquared.dev) |21| **psquared-skills** | Pipeline skills | `skills/` directory |2223### URLs2425| Service | URL |26|---|---|27| InboxMate app | `app.psquared.dev` (chatwidget module) |28| Demo pages | `demo.inboxmate.psquared.dev/?id=<demoId>` |29| Marketing site | `inboxmate.psquared.dev` |30| Company site | `psquared.dev` |31| Notification admin | `notifications.psquared.dev/drafts` |32| CRM | `crm.psquared.dev` |33| Analytics | `ackee.psquared.dev` |3435## Demo Pipeline3637```38/find-leads [N] → CRM companies + people (German B2B, UWG-compliant)39 ↓40/inboxmate-batch-demo → Demos created, opportunities at SCREENING/PENDING_REVIEW41 ↓42/review-demos → demoStatus: OK_TO_SEND or NEEDS_FIX43 ↓44/fix-demos → Fixes applied, reset to PENDING_REVIEW45 ↓46/plan-campaign → CRM campaign created, opportunities linked with shared deadline47 ↓48/setup-email-drafts → Email drafts at notifications.psquared.dev/drafts49 ↓50Human review + send → demoStatus: SENT, outreachSentAt timestamped51 ↓52/check-outreach-status → Follow-up drafts created (5+ days after send)53 ↓54/check-demo-analytics → Pipeline health report (Ackee + CRM)55 ↓56/refurbish-demos → Upgrade knowledge for campaign demos (clear + re-scrape via MCP)57```5859## CRM State Machine (Twenty CRM)6061### Opportunity.demoStatus62| Status | Meaning |63|---|---|64| `PENDING_REVIEW` | Demo built, awaiting QA |65| `OK_TO_SEND` | QA passed, ready for outreach |66| `NEEDS_FIX` | QA failed, needs corrections |67| `SENT` | Initial outreach email sent |68| `FOLLOW_UP_SENT` | Follow-up email sent |69| `SKIP_FAULTY_WEBSITE` | Website unreachable/broken |70| `SKIP_IRRELEVANT` | Company not a fit |71| `SKIPPED` | Generic skip |72| `DISQUALIFIED` | Permanently excluded |7374### Opportunity.demoType75| Value | Meaning |76|---|---|77| `CHATBOT` (or null = legacy) | Personalized chatbot demo (`/inboxmate-demo`) |78| `INBOX` | Demo-Postfach: seeded pre-triaged inbox (`/inboxmate-inbox-demo`), email-product outreach. CRM view "InboxMate Email Outreach" filters on this. |7980### Opportunity.stage81| Stage | Meaning |82|---|---|83| `NEW` | Fresh lead, no outreach |84| `SCREENING` | Outreach phase |85| `MEETING` | Responded / call scheduled |86| `PROPOSAL` | Quoted or decision-maker demo |87| `CUSTOMER` | Paying customer |8889### Campaign Structure90Campaigns group opportunities into sendable batches with shared `offerExpiresAt` and `offerText`. Created by `/plan-campaign`, consumed by `/setup-email-drafts`.9192## How to Query Each System9394### CRM (Twenty) — GraphQL95- **Endpoint**: `https://crm.psquared.dev/graphql`96- **Auth**: `Authorization: Bearer $PSQUARED_CRM_TOKEN`97- **Key objects**: `companies`, `people`, `opportunities`, `campaigns`, `tasks`, `notes`9899Example — list opportunities in a campaign:100```graphql101query {102 opportunities(filter: { campaignId: { eq: "CAMPAIGN_ID" } }) {103 edges { node { id name stage demoStatus demoUrl } }104 }105}106```107108### Supabase (AgentHub DB)109- **Project**: `fevtfywriufbqnvbgyrm`110- **Tool**: `mcp__plugin_supabase_supabase__execute_sql`111- **Key tables**: `demo_pages`, `agents`, `knowledge`, `knowledge_bucket_items`, `knowledge_bucket_chunks`, `chats`, `messages`, `accounts`112113Example — find chats on demo agents:114```sql115SELECT dp.company_name, c.id as chat_id, c.created_at,116 (SELECT count(*) FROM messages m WHERE m.chat_id = c.id) as msg_count117FROM demo_pages dp118JOIN chats c ON c.agent_id = dp.agent_id119ORDER BY c.created_at DESC120```121122### Ackee Analytics — GraphQL123- **Endpoint**: `https://ackee.psquared.dev/api`124- **Auth**: `Authorization: Bearer $ACKEE_TOKEN`125- **Demo domain ID**: `4bdddc8c-11d9-4d7e-ab94-aeb7866f0bb2`126- **CTA event ID**: `0f037f1c-c2c0-4205-b90d-3cb9bf66f9c2`127128Example — get demo page views:129```graphql130query {131 domain(id: "4bdddc8c-11d9-4d7e-ab94-aeb7866f0bb2") {132 statistics { views(interval: MONTHLY, type: UNIQUE) { count } }133 facts { viewsMonth viewsToday activeVisitors }134 }135}136```137138### Notification Service — REST139- **Base URL**: `https://notifications.psquared.dev`140- **Auth (admin)**: `Authorization: Bearer $BEARER_TOKEN`141- **Auth (drafts only)**: `Authorization: Bearer $EMAIL_DRAFT_ONLY_BEARER`142143Key endpoints:144- `GET /drafts?status=SENT&pageSize=50` — list sent emails145- `GET /drafts/:id` — read full email (html_body, variables, subject)146- `POST /drafts/create` — create draft from template147- `POST /drafts/send` — send drafts `{ draftIds: [...] }`148- `GET /stats/funnel` — full conversion funnel data149- `GET /drafts/campaigns` — list CRM campaigns with draft counts150151### InboxMate MCP — JSON-RPC152- **Endpoint**: `https://app.psquared.dev/api/mcp`153- **Auth**: `Authorization: Bearer $NUXT_MCP_DEMO_TOKEN`154- **Protocol**: JSON-RPC 2.0155156Key tools:157- `clear_bucket` — remove all items from a knowledge bucket158- `scrape_and_build_knowledge` — scrape URLs via Tavily, create knowledge items with real sourceUrls159- `create_agent`, `update_prompt`, `update_widget_style`, `publish_agent`160- `create_knowledge_bucket`, `add_to_bucket`, `set_knowledge`161- `create_demo_page`, `update_demo_page`, `list_demos`, `get_demo`162- `create_inbox_demo`, `update_inbox_demo` — Demo-Postfach (type='inbox': seeded pre-triaged inbox, no agent)163- `list_bucket_items`, `list_knowledge`, `get_knowledge`164165## Key Metrics166167| Metric | Source | How to check |168|---|---|---|169| Demo page views | Ackee | Query demo domain statistics |170| CTA clicks | Ackee | Query CTA event |171| Emails sent | Notification service | `GET /drafts?status=SENT` |172| Chat interactions | Supabase | `chats` JOIN `demo_pages` on `agent_id` |173| Pipeline funnel | Notification service | `GET /stats/funnel` |174| Hot leads | CRM | Opportunities with stage > SCREENING |175| Campaign status | CRM + Notification service | Campaigns + draft counts per campaign |176177## Environment Variables178179All in `/Users/martinpammesberger/Documents/psquared/claude-overlord-folder/.env`:180181| Variable | Service |182|---|---|183| `PSQUARED_CRM_TOKEN` | Twenty CRM GraphQL |184| `NUXT_MCP_DEMO_TOKEN` | InboxMate MCP endpoint |185| `NUXT_TAVILY_SEARCH_API_KEY` | Tavily web scraping |186| `EMAIL_DRAFT_ONLY_BEARER` | Notification service (draft creation) |187| `NOTIFICATIONS_SERVICE_BEARER_TOKEN` | Notification service (admin) |188| `ACKEE_TOKEN` | Ackee analytics |189190## Pricing Tiers (credits model, since 2026-06)191192**Note:** If prices change, this table must be updated. The `/price-change` skill handles pricing updates across all touchpoints — make sure this file is included in the update list.193194Model: **pay per Postfach (mailbox) + AI credits** (chat reply 1, email draft 2, tool call/scrape/PDF 1; setup & rule-based sorting free). Manual invoicing — no Stripe checkout.195196| Tier | Price | Postfächer | Credits/mo | Notes |197|---|---|---|---|---|198| Free | €0 | 0 (chatbot only) | 50 | widget funnel |199| Starter | €49/mo (monthly only) | 1 (extra €19) | 500 | full email automation from here |200| Pro | €129/mo · €107 yearly | 3 (extra €15) | 2,500 | API+MCP, marketplace; demo discount → €86 first year |201| Business | ab €349/mo, custom | 15+ | 10,000+ | custom integrations (first incl.), white-label, SLA; demo offer €199 first year |202203Top-ups: €9/€8 per 1,000 (Starter/Pro), instant grant, invoiced afterwards. All paid plans 14-day free trial, no credit card.204205## Knowledge System206207Agents use RAG (vector search) over knowledge buckets:208- Each bucket contains knowledge items (text entries with `sourceUrl`)209- Items are chunked and embedded for vector similarity search210- When the agent's `searchKnowledge` tool is called, it returns matching chunks WITH their `sourceUrl`211- The widget UI shows sources as clickable links in citations212213To upgrade knowledge quality: `clear_bucket` → `scrape_and_build_knowledge` with real page URLs → `publish_agent`