Overview
Pulse AI turns a business goal into campaigns, content, conversations and follow-up, across many companies on one platform. Agents draft and recommend; a policy engine, human approvals and an audit log control every action that leaves the system.
Problem
Small teams run marketing across disconnected tools, and a generative model on its own cannot be trusted to spend money, message customers or touch shared records.
What it is
The product is built around one circuit that has to work before anything else is added: capture a lead, answer, record, nurture, convert, measure. The north-star metric is verifiable business outcomes per active workspace, not the amount of text generated.
It covers a brand knowledge base, a CRM with pipeline, an inbox with a WhatsApp adapter, campaigns and content with versions, email, an automation builder and analytics from GA4 and Search Console.
What the model is not allowed to decide
Autonomy is graded from L0 (advise) to L5 (optimize). The shipped system runs L0–L2: reads and internal drafts execute; changes to shared records and every external action need a person. Agents never send a message on their own.
Every external action passes the same pipeline: intent, context validation, permission check, policy evaluation, dry run, preview, approval when required, idempotency lock, execution, verification and an audit event.
Agent runtime
Six agents — orchestrator, brand and research, content, CRM and lifecycle, compliance and QA, conversations — run on the AI SDK tool loop. A deterministic orchestrator classifies intent and risk, loads only the context the caller may see, and limits time, cost and tool calls.
- Tools are the intersection of the agent allowlist, the workspace policy and the user's permission.
- Results come back through a
submit_resulttool and are validated against one schema, because the free models in the fallback chain support tool calling but not structured output. - A watchdog timer fails a run when a provider stalls; one free-model run was observed at 558 seconds before it was added.
- Cost is computed from catalog prices and the model that actually answered, which may be a fallback.
Multi-tenancy and data
Every business table carries an organization id and has row-level security with one policy per operation. CRM relations use composite foreign keys that include the workspace, so cross-tenant references are structurally impossible rather than merely filtered.
The service role is used only where there is no user session — the cron dispatcher and signed machine-to-machine webhooks — and each write is scoped to the workspace resolved from the owning connection.
Security
- Content Security Policy with a per-request nonce and
strict-dynamic; HSTS, frame, referrer and permissions policies. - Provider tokens encrypted in the application with AES-256-GCM, in a table with no grants.
- WhatsApp, Meta and email webhooks verified by HMAC signature over the raw body, with size limits and replay deduplication.
- Outbound webhooks restricted to HTTPS with SSRF protection, including DNS rebinding.
- External content is labeled untrusted and never executed as instructions; prompt-injection cases are part of the evals.
- Kill switches at global, workspace, agent and tool level.
Tests, CI and deployment
CI runs four jobs: format, lint, typecheck, unit tests, build and end-to-end tests in demo mode; database migrations with Supabase security advisors and RLS tests; a secret scan; and a dependency audit.
The app deploys to Vercel. Without Supabase credentials it starts in a demo mode restricted to a sample workspace, and integrations without credentials report setup_required instead of failing.
Architecture
Technical decisions
- Own approvals instead of the SDK's
- The AI SDK's pause and resume lives in chat messages. Approvals here are stored records tied to tenant, actor, tool, normalized arguments, target and policy version; the server re-verifies and executes, not the model.
- Free model by default, with a fallback chain and redaction
- Free models are best effort and give no retention guarantee, so emails, phone numbers, ids and contact names are redacted before sending and restored only in what the user sees.
- Persist “queued” before calling WhatsApp
- The API has no idempotency key. If the process dies after sending, the message stays visible as queued instead of being resent blindly.
- Rules first for intent and opt-out
- Inbound intent and sentiment are classified by rules at zero cost per message; opt-out uses explicit keywords so it is auditable. AI analysis is on demand and never overwrites an agent's classification.
- Immutable versions for content and brand knowledge
- The database assigns version numbers by trigger. Only the approved version can be scheduled, so what is published is exactly what was approved.
Evidence
12 of 12
Planned milestones completed
Source: docs/IMPLEMENTATION_PLAN.md
92
Cross-tenant and role tests on row-level security
Source: docs/SECURITY.md
30
Database migrations
Source: supabase/migrations (file count)
4
CI jobs on every push
Source: .github/workflows/ci.yml
Limitations
- No MFA or SSO yet.
- Rate limits are per IP and endpoint; there is no per-user or per-tenant limit on server actions.
- No external error tracking; errors stay in platform logs with a request id.
- Production and preview deployments share one database.
- Model evals need gateway credentials, so they run locally or in a manual job, not in CI.
- Autonomy levels L3–L5 are disabled.
- The open demo runs without a backend: it shows the interface and its empty states, not populated data.
