Skip to main content

Interaction

interactions is a marketing/sales event log, not an agent runtime event. This name has tripped people up before — read this page once before assuming anything from it.

Schema (interactions)

ColumnTypeNotes
idUUIDPK
typeenumuser_signup | demo_request | notify_request | subscription_created
userIdUUID, nullableSet when authenticated
userEmailtextCaptured at event time (may not match current user.email)
agentIdUUID, nullableSet for agent-scoped events
agentNametext, nullableDenormalized for email rendering
metadataJSONBEvent-specific extras
notifiedAttimestamptz, nullableWhen the recipient fan-out completed
notifyErrortext, nullableError if fan-out failed
createdAttimestamptz

What writes here

Event sourceWrites type
New signup (better-auth databaseHooks.user.create.after)user_signup
POST /agents/:id/demo-requestdemo_request
POST /agents/:id/waitlistnotify_request
Stripe checkout.session.completed webhooksubscription_created

What it does

On insert, InteractionsService.record() fans out an email to every row in interaction_recipients. The send is best-effort (no retry queue). Failures update notifyError.

Recipients

interaction_recipients holds the team email addresses that get notified. Managed via:

VerbPathGuard
GET/admin/interactions/recipientsplatform_admin
POST/admin/interactions/recipientsplatform_admin
PATCH/admin/interactions/recipients/:idplatform_admin
DELETE/admin/interactions/recipients/:idplatform_admin

Email column is unique.

Reading the feed

GET /admin/interactions?type=<type>&cursor=...&limit=20 — paginated, newest first. Admin only.

DTO

type InteractionDto = {
id: string;
type: "user_signup" | "demo_request" | "notify_request" | "subscription_created";
userId: string | null;
userEmail: string;
agentId: string | null;
agentName: string | null;
metadata: Record<string, unknown>;
notifiedAt: string | null;
notifyError: string | null;
createdAt: string;
};

What it isn't

  • Not an agent runtime event log. The marketplace does not record per-user agent activity.
  • Not a usage event. Quota consumption lives in usage_ledger (see Metric Definition & Quota).
  • Not a CRM. This is a thin tee into team email so launches and demos don't go silent.

For agent runtime logs, the agent service is responsible (use your own analytics — agent-poc uses PostHog directly from posthog.js).