Skip to main content

Entity label workflow

Use:

  • entity.id as the stable key
  • conduitClient.primitives.entities.update(entityId, { label }) for a human-readable label
  • your own database for stage, status, segmentation, and workflow metadata
import { Conduit } from "@mappa-ai/conduit"

const conduitClient = new Conduit({ apiKey: process.env.CONDUIT_API_KEY! })

const firstReceipt = await conduitClient.reports.create({
source: { url: "https://example.com/phone-screen.mp3" },
output: { template: "general_report" },
target: { strategy: "magic_hint", hint: "the job candidate" },
})

const first = await firstReceipt.handle?.wait()
const entityId = first?.entity?.id
if (!entityId) throw new Error("Candidate entity not found")

await conduitClient.primitives.entities.update(entityId, {
label: "candidate:john-doe",
})

await db.candidates.create({
id: "cand_123",
conduitEntityId: entityId,
stage: "phone-screen",
})