LetspingLETSPING

LangChain×Supabase

Add Human-in-the-Loop to LangChain for Supabase security.

Stop your autonomous agents from making highly destructive, hallucinated API calls to Supabase. Wrap your execution logic in LetsPing to enforce a hard pause until a human reviews the payload.

How it works

1. Intercept Supabase Logic

Instead of hitting the Supabase API directly from your LangChain agent, you yield the payload to LetsPing. The agent's execution thread halts completely.

2. Human Review & Patching

You get a push notification on your phone. You review the exact Supabase JSON payload the agent wanted to send. You can approve it, reject it, or patch the values directly.

3. Resume Execution

Once approved, the LangChain execution thread resumes, and the actual Supabase mutation is allowed to proceed using the (potentially patched) payload.

LangChain Example Implementation
import { createLetsPingTool } from "@letsping/adapters/langchain";
import { z } from "zod";

const supabaseTool = createLetsPingTool({
  name: "execute_supabase_action",
  description: "Executes a destructive action on Supabase. Requires human approval.",
  priority: "high",
  schema: z.object({
    // Define the exact Supabase payload your agent wants to send
    id: z.string(),
    action: z.string(),
  })
});