Front as the Ledger, Agents as the Support Brain

repoaisupportagentshitlinngestfrontslackstripevector-searchobservabilityskill-recordingsjoelclaw

Maps Skill Recordings support triage to joelclaw-style Inngest workflows, CLI tools, HITL approvals, and auditable agent actions.

This is a GitHub Gist for an agent-first support platform: Front stays the source of truth for conversations, while a Mastra agent proposes or executes support actions through explicit tools. The stack is boring in the best way: Inngest for workflows, Slack for approval, Stripe Connect for refunds, Upstash Vector for retrieval, Axiom and Langfuse for traceability.

The clever bit is the authority ladder. Magic links, password resets, email updates, and in-policy refunds can happen automatically. Riskier actions become approval requests. Angry customers, legal language, repeated failures, or uncertainty escalate to a human. That’s a support agent with brakes, not a chatbot cosplaying as operations.

It also treats context like infrastructure instead of shoving the whole damn inbox into the prompt. Recent messages and minimal app state stay live; purchases, entitlements, approvals, and trust stats come from tools; historical conversations and responses sit behind hybrid retrieval. That lines up with Malte Ubl’s small-context guidance and the joelclaw bias toward evented, inspectable systems.

The most useful pattern for Skill Recordings is the loop: webhook in, context gathered, agent reasoning traced, action either executed or routed to human-in-the-loop approval, draft created in Front, and every decision logged. It’s a support desk shaped like an agent runtime.

Key Ideas

  • Front remains the conversation ledger while the agent acts as the decision layer.
  • Inngest wraps support work as durable steps: gather context, run agent reasoning, request approval, execute action, create draft.
  • Mastra tools define concrete support actions like lookup_user, process_refund, generate_magic_link, transfer_purchase, draft_response, and escalate_to_human.
  • Authority levels split work into auto-approved actions, approval-required actions, and always-escalate cases.
  • Slack approval messages give humans fast approve/reject control without forcing them into a dashboard.
  • Upstash Vector holds redacted conversations, knowledge, and trusted response examples behind filtered hybrid search.
  • Langfuse traces model reasoning and Axiom traces system execution, so support automation has receipts.
  • The CLI-first skill interface makes support operations usable by Claude Code, OpenCode, and humans at the terminal.
  • Trust scores, draft diffing, and audit logs create a feedback loop for deciding when the agent can safely auto-send.