[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-inngest-inngest-agent-evals":3,"mdc-aho5db-key":44,"related-repo-inngest-inngest-agent-evals":3795,"related-org-inngest-inngest-agent-evals":3888},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":26,"repoUrl":27,"updatedAt":28,"license":29,"forks":30,"topics":31,"repo":39,"sourceUrl":42,"mdContent":43},"inngest-agent-evals","build and debug Inngest agent evals","Use when building, migrating, or debugging Agent Evals on Inngest: scoring AI agent or workflow outcomes, deferred scorers, sessions, traces, step experiments, experiment variant attribution, Insights queries, or production eval loops for prompts, models, tools, providers, and agent behavior. Covers TypeScript SDK v4 scoring beta APIs, `scoreMiddleware`, `step.score`, `inngest.score`, `createScorer`, `defer`, `group.experiment`, `experimentRef`, `meta.sessions`, and when to use durable workflow primitives for outcome-based evaluation.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"inngest","Inngest","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Finngest.png",[12,16,17,20,23],{"name":13,"slug":14,"type":15},"Observability","observability","tag",{"name":9,"slug":8,"type":15},{"name":18,"slug":19,"type":15},"Evals","evals",{"name":21,"slug":22,"type":15},"Agents","agents",{"name":24,"slug":25,"type":15},"Workflow Automation","workflow-automation",26,"https:\u002F\u002Fgithub.com\u002Finngest\u002Finngest-skills","2026-07-12T07:36:51.711641",null,5,[32,33,34,35,36,37,38],"agent-skill-repository","agent-skills","agentic-skills","ai-agents","claude-code-skills","cursor-skills","openclaw-skills",{"repoUrl":27,"stars":26,"forks":30,"topics":40,"description":41},[32,33,34,35,36,37,38],"Agent Skills for building with Inngest","https:\u002F\u002Fgithub.com\u002Finngest\u002Finngest-skills\u002Ftree\u002FHEAD\u002Fskills\u002Finngest-agent-evals","---\nname: inngest-agent-evals\ndescription: \"Use when building, migrating, or debugging Agent Evals on Inngest: scoring AI agent or workflow outcomes, deferred scorers, sessions, traces, step experiments, experiment variant attribution, Insights queries, or production eval loops for prompts, models, tools, providers, and agent behavior. Covers TypeScript SDK v4 scoring beta APIs, `scoreMiddleware`, `step.score`, `inngest.score`, `createScorer`, `defer`, `group.experiment`, `experimentRef`, `meta.sessions`, and when to use durable workflow primitives for outcome-based evaluation.\"\n---\n\n# Inngest Agent Evals\n\nUse this skill when the user wants to evaluate AI agents or AI workflows in\nproduction, add scoring, compare prompts\u002Fmodels\u002Ftools, group related runs, or\ndebug why an agent outcome was good or bad.\n\nAgent Evals is not a separate package. It is the production evaluation workflow\nbuilt from Inngest functions, durable steps, scores, deferred scorers, sessions,\ntraces, experiments, and Insights.\n\n## Canonical References\n\nCheck the public docs first when exact API details matter:\n\n- Agent Evals overview: https:\u002F\u002Fwww.inngest.com\u002Fdocs\u002Flearn\u002Fagent-evals\n- Scoring guide: https:\u002F\u002Fwww.inngest.com\u002Fdocs\u002Ffeatures\u002Finngest-functions\u002Fsteps-workflows\u002Fscoring\n- Deferred scoring guide: https:\u002F\u002Fwww.inngest.com\u002Fdocs\u002Ffeatures\u002Finngest-functions\u002Fsteps-workflows\u002Fdeferred-scoring\n- Step experiments guide: https:\u002F\u002Fwww.inngest.com\u002Fdocs\u002Ffeatures\u002Finngest-functions\u002Fsteps-workflows\u002Fstep-experiments\n- Sessions: https:\u002F\u002Fwww.inngest.com\u002Fdocs\u002Ffeatures\u002Fevents-triggers\u002Fsessions\n- Traces: https:\u002F\u002Fwww.inngest.com\u002Fdocs\u002Fplatform\u002Fmonitor\u002Ftraces\n- Insights: https:\u002F\u002Fwww.inngest.com\u002Fdocs\u002Fplatform\u002Fmonitor\u002Finsights\n- Scoring reference: https:\u002F\u002Fwww.inngest.com\u002Fdocs\u002Freference\u002Ftypescript\u002Fv4\u002Ffunctions\u002Fscoring\n- `group.experiment()` reference: https:\u002F\u002Fwww.inngest.com\u002Fdocs\u002Freference\u002Ftypescript\u002Fv4\u002Ffunctions\u002Fgroup-experiment\n- Launch context: https:\u002F\u002Fwww.inngest.com\u002Fblog\u002Fintroducing-agent-evals\n\n## Decision Flow\n\nStart from the outcome, not the mechanism:\n\n1. Identify the product or quality signal: helpful click, ticket resolution,\n   conversion, guardrail pass, retrieval quality, model confidence, latency,\n   cost, human review, or LLM-as-judge result.\n2. Decide when the signal appears:\n   - During the run: use direct scoring with `step.score()` or\n     `inngest.score()`.\n   - After the run: use deferred scoring with `createScorer()` and `defer()`,\n     or explicit `inngest.score({ runId })`.\n3. Decide how humans will inspect related work:\n   - Use `meta.sessions` for repeated high-cardinality identifiers such as\n     `conversation_id`, `ticket_id`, `agent_run_id`, or `import_id`.\n   - Use Insights for ad hoc historical analysis, low-cardinality filters, SQL\n     aggregates, and broad investigation.\n4. Decide whether to compare variants:\n   - Use `group.experiment()` for prompt, model, provider, tool, workflow, or\n     rollout comparisons.\n   - Pass `experimentRef` to deferred or later scores when the score should be\n     credited to the selected variant.\n5. Preserve traceability:\n   - Keep model calls, tool calls, waits, database writes, and scoring work in\n     durable steps so traces explain why the score happened.\n\n## Setup Requirements\n\n- Use TypeScript SDK v4 and install the latest SDK: `npm install inngest@latest`.\n- Scoring and deferred scoring are beta APIs; verify current imports against\n  the docs before shipping user-facing examples.\n- `step.score()` requires `scoreMiddleware()` from `inngest\u002Fexperimental` on\n  the Inngest client.\n- `createScorer()` is imported from `inngest\u002Fexperimental` and the scorer must\n  be registered in the serve handler with other functions.\n- Sessions sent through the TypeScript SDK require v4.7.0 or later.\n- Step experiments require v4.8.0 or later for `group.experiment()` and the\n  `experiment` helper from `inngest`.\n\nClient shape:\n\n```typescript\nimport { Inngest } from \"inngest\";\nimport { scoreMiddleware } from \"inngest\u002Fexperimental\";\n\nexport const inngest = new Inngest({\n  id: \"support-agent\",\n  middleware: [scoreMiddleware()],\n});\n```\n\n## Sessions\n\nAdd sessions when events belong to a user flow, conversation, ticket, import,\nor agent task that someone will inspect repeatedly.\n\n```typescript\nawait inngest.send({\n  name: \"support\u002Fticket.created\",\n  data: {\n    ticketId: \"tk_123\",\n    message: \"I can't sign in.\",\n  },\n  meta: {\n    sessions: {\n      ticket_id: \"tk_123\",\n    },\n  },\n});\n```\n\nRules:\n\n- Use stable, non-secret, high-cardinality IDs.\n- Keep the key generic, such as `conversation_id`; put the actual ID in the\n  value.\n- Pass sessions explicitly through `step.invoke()` and `step.sendEvent()` when\n  downstream runs should join the same session.\n- Do not use sessions for labels like `environment: prod`; use Insights for\n  that style of filtering.\n\n## Direct Scoring\n\nUse direct scoring when the score is known during the function run.\n\nGood direct scores:\n\n- guardrail pass\u002Ffail\n- JSON validity\n- retrieval confidence\n- tool success\n- model confidence\n- inline LLM-as-judge result\n\n```typescript\nexport const answerTicket = inngest.createFunction(\n  {\n    id: \"answer-ticket\",\n    triggers: [{ event: \"support\u002Fticket.created\" }],\n  },\n  async ({ event, step }) => {\n    const answer = await step.run(\"generate-answer\", () =>\n      generateAnswer(event.data.ticketId)\n    );\n\n    const passed = await step.run(\"check-answer\", () => validateAnswer(answer));\n\n    await step.score(\"score-answer-quality\", {\n      name: \"answer-quality\",\n      value: passed,\n    });\n\n    return { answer, passed };\n  }\n);\n```\n\nUse stable score names. Changing a score name creates a separate metric.\nScore values must be finite numbers or booleans.\n\n## Deferred Scoring\n\nUse deferred scoring when the useful signal arrives after the parent workflow\nfinishes, such as user feedback, conversion, ticket reopen, retention, or a\nslow LLM-as-judge run.\n\n```typescript\nimport { createScorer } from \"inngest\u002Fexperimental\";\nimport { z } from \"zod\";\n\nexport const feedbackScorer = createScorer(\n  inngest,\n  {\n    id: \"support-feedback-scorer\",\n    schema: z.object({ ticketId: z.string() }),\n  },\n  async ({ event, step }) => {\n    const feedback = await step.waitForEvent(\"wait-for-feedback\", {\n      event: \"support\u002Ffeedback.received\",\n      timeout: \"7d\",\n      if: `async.data.ticketId == '${event.data.ticketId}'`,\n    });\n\n    return {\n      name: \"user-feedback\",\n      value: feedback?.data.helpful ? 1 : 0,\n    };\n  }\n);\n```\n\nTrigger it from the producing function:\n\n```typescript\nasync ({ event, step, defer }) => {\n  const answer = await step.run(\"generate-answer\", () =>\n    generateAnswer(event.data.ticketId)\n  );\n\n  defer(\"score-feedback\", {\n    function: feedbackScorer,\n    data: { ticketId: event.data.ticketId },\n  });\n\n  return { answer };\n}\n```\n\nGuardrails:\n\n- Register scorers with `serve({ functions: [...] })`.\n- `defer()` is fire-and-forget; do not `await` it.\n- The parent run is attributed automatically for deferred scorers.\n- Return a default score or `null` when a signal times out, based on the\n  product semantics.\n\n## Experiments\n\nUse `group.experiment()` when comparing prompts, models, providers, tools,\nworkflow rewrites, or operational settings against real traffic.\n\n```typescript\nimport { experiment } from \"inngest\";\n\nconst { result, variant, experimentRef } = await group.experiment(\n  \"answer-style\",\n  {\n    variants: {\n      concise: () => step.run(\"answer-concise\", () => answerConcise(event.data)),\n      detailed: () =>\n        step.run(\"answer-detailed\", () => answerDetailed(event.data)),\n    },\n    select: experiment.bucket(event.data.accountId, {\n      weights: { concise: 50, detailed: 50 },\n    }),\n  }\n);\n```\n\nSelection strategy:\n\n- `experiment.weighted()` for run-level traffic splits.\n- `experiment.bucket(stableId, { weights })` when a user, account, or tenant\n  should usually keep the same experience.\n- `experiment.custom()` when assignment comes from a database, flag service, or\n  rollout table.\n- `experiment.fixed()` to force one variant during testing or after choosing a\n  winner.\n\nRules:\n\n- Each variant callback must call at least one `step.*` tool.\n- Keep experiment IDs and variant names stable because they appear in traces.\n- The selected variant is memoized for retries and replays.\n- Persist `experimentRef` and the parent run ID if a later, separate process\n  will score the selected variant.\n\nWhen deferred scoring a variant, pass the ref:\n\n```typescript\ndefer(\"score-answer-feedback\", {\n  function: feedbackScorer,\n  data: { ticketId: event.data.ticketId },\n  experiment: experimentRef,\n});\n```\n\nWhen scoring from a later run explicitly:\n\n```typescript\nawait inngest.score.experiment({\n  name: \"clickthrough\",\n  value: 1,\n  experiment: experimentRef,\n  runId: originalRunId,\n});\n```\n\n## Brownfield Migration\n\nWhen adding Agent Evals to an existing app:\n\n1. Search for existing agent\u002Fworkflow outputs and where users act on them.\n2. Find durable identifiers already in the domain: conversation ID, ticket ID,\n   account ID, import ID, run ID, or recommendation ID.\n3. Add `meta.sessions` at event producers before building dashboards around\n   correlation.\n4. Add one direct score where the outcome is already known.\n5. Add a deferred scorer only after the signal event exists or can be emitted\n   cleanly.\n6. Add `group.experiment()` only around one isolated decision at a time.\n7. Keep old prompt\u002Fmodel\u002Ftool behavior stable until scoring proves the new path.\n\nUse `inngest-brownfield-audit` first when the repo has many candidate\nworkflows. Use `inngest-agents` with this skill when the work is an AgentKit or\ndurable agent workflow.\n\n## Anti-Patterns\n\n- Starting with a prompt experiment before naming the outcome metric.\n- Scoring with unstable names, strings, objects, `NaN`, or `Infinity`.\n- Forgetting `scoreMiddleware()` and then assuming `step.score()` is missing.\n- Running scorers in an external queue when the scorer needs durable waits.\n- Keeping experiment assignment only in memory.\n- Scoring an experiment variant from a later run without the original `runId`.\n- Using sessions for low-cardinality labels or sensitive personal data.\n- Leaving model\u002Ftool work outside steps, making traces unable to explain the\n  score.\n\n## Verification\n\n- Typecheck the Inngest client, functions, scorer schemas, and serve handler.\n- Confirm scorers are registered with the serve endpoint.\n- Test the producer emits events with expected `meta.sessions`.\n- Test direct scores use stable names and finite number\u002Fboolean values.\n- Test deferred scorer timeout behavior.\n- For experiments, test that each variant callback contains step work and that\n  later scoring receives `experimentRef` plus the original run ID when needed.\n- If possible, run the Inngest dev server and inspect traces, sessions, scores,\n  and experiment variant selection in the dashboard or through available CLI\u002FAPI\n  tooling.\n",{"data":45,"body":46},{"name":4,"description":6},{"type":47,"children":48},"root",[49,57,63,68,75,80,204,210,215,382,388,482,487,730,736,741,985,990,1043,1049,1054,1059,1092,1669,1674,1680,1685,2297,2302,2623,2628,2678,2684,2695,3172,3177,3224,3228,3266,3271,3416,3421,3566,3572,3577,3628,3648,3654,3732,3738,3789],{"type":50,"tag":51,"props":52,"children":53},"element","h1",{"id":4},[54],{"type":55,"value":56},"text","Inngest Agent Evals",{"type":50,"tag":58,"props":59,"children":60},"p",{},[61],{"type":55,"value":62},"Use this skill when the user wants to evaluate AI agents or AI workflows in\nproduction, add scoring, compare prompts\u002Fmodels\u002Ftools, group related runs, or\ndebug why an agent outcome was good or bad.",{"type":50,"tag":58,"props":64,"children":65},{},[66],{"type":55,"value":67},"Agent Evals is not a separate package. It is the production evaluation workflow\nbuilt from Inngest functions, durable steps, scores, deferred scorers, sessions,\ntraces, experiments, and Insights.",{"type":50,"tag":69,"props":70,"children":72},"h2",{"id":71},"canonical-references",[73],{"type":55,"value":74},"Canonical References",{"type":50,"tag":58,"props":76,"children":77},{},[78],{"type":55,"value":79},"Check the public docs first when exact API details matter:",{"type":50,"tag":81,"props":82,"children":83},"ul",{},[84,98,109,120,131,142,153,164,175,193],{"type":50,"tag":85,"props":86,"children":87},"li",{},[88,90],{"type":55,"value":89},"Agent Evals overview: ",{"type":50,"tag":91,"props":92,"children":96},"a",{"href":93,"rel":94},"https:\u002F\u002Fwww.inngest.com\u002Fdocs\u002Flearn\u002Fagent-evals",[95],"nofollow",[97],{"type":55,"value":93},{"type":50,"tag":85,"props":99,"children":100},{},[101,103],{"type":55,"value":102},"Scoring guide: ",{"type":50,"tag":91,"props":104,"children":107},{"href":105,"rel":106},"https:\u002F\u002Fwww.inngest.com\u002Fdocs\u002Ffeatures\u002Finngest-functions\u002Fsteps-workflows\u002Fscoring",[95],[108],{"type":55,"value":105},{"type":50,"tag":85,"props":110,"children":111},{},[112,114],{"type":55,"value":113},"Deferred scoring guide: ",{"type":50,"tag":91,"props":115,"children":118},{"href":116,"rel":117},"https:\u002F\u002Fwww.inngest.com\u002Fdocs\u002Ffeatures\u002Finngest-functions\u002Fsteps-workflows\u002Fdeferred-scoring",[95],[119],{"type":55,"value":116},{"type":50,"tag":85,"props":121,"children":122},{},[123,125],{"type":55,"value":124},"Step experiments guide: ",{"type":50,"tag":91,"props":126,"children":129},{"href":127,"rel":128},"https:\u002F\u002Fwww.inngest.com\u002Fdocs\u002Ffeatures\u002Finngest-functions\u002Fsteps-workflows\u002Fstep-experiments",[95],[130],{"type":55,"value":127},{"type":50,"tag":85,"props":132,"children":133},{},[134,136],{"type":55,"value":135},"Sessions: ",{"type":50,"tag":91,"props":137,"children":140},{"href":138,"rel":139},"https:\u002F\u002Fwww.inngest.com\u002Fdocs\u002Ffeatures\u002Fevents-triggers\u002Fsessions",[95],[141],{"type":55,"value":138},{"type":50,"tag":85,"props":143,"children":144},{},[145,147],{"type":55,"value":146},"Traces: ",{"type":50,"tag":91,"props":148,"children":151},{"href":149,"rel":150},"https:\u002F\u002Fwww.inngest.com\u002Fdocs\u002Fplatform\u002Fmonitor\u002Ftraces",[95],[152],{"type":55,"value":149},{"type":50,"tag":85,"props":154,"children":155},{},[156,158],{"type":55,"value":157},"Insights: ",{"type":50,"tag":91,"props":159,"children":162},{"href":160,"rel":161},"https:\u002F\u002Fwww.inngest.com\u002Fdocs\u002Fplatform\u002Fmonitor\u002Finsights",[95],[163],{"type":55,"value":160},{"type":50,"tag":85,"props":165,"children":166},{},[167,169],{"type":55,"value":168},"Scoring reference: ",{"type":50,"tag":91,"props":170,"children":173},{"href":171,"rel":172},"https:\u002F\u002Fwww.inngest.com\u002Fdocs\u002Freference\u002Ftypescript\u002Fv4\u002Ffunctions\u002Fscoring",[95],[174],{"type":55,"value":171},{"type":50,"tag":85,"props":176,"children":177},{},[178,185,187],{"type":50,"tag":179,"props":180,"children":182},"code",{"className":181},[],[183],{"type":55,"value":184},"group.experiment()",{"type":55,"value":186}," reference: ",{"type":50,"tag":91,"props":188,"children":191},{"href":189,"rel":190},"https:\u002F\u002Fwww.inngest.com\u002Fdocs\u002Freference\u002Ftypescript\u002Fv4\u002Ffunctions\u002Fgroup-experiment",[95],[192],{"type":55,"value":189},{"type":50,"tag":85,"props":194,"children":195},{},[196,198],{"type":55,"value":197},"Launch context: ",{"type":50,"tag":91,"props":199,"children":202},{"href":200,"rel":201},"https:\u002F\u002Fwww.inngest.com\u002Fblog\u002Fintroducing-agent-evals",[95],[203],{"type":55,"value":200},{"type":50,"tag":69,"props":205,"children":207},{"id":206},"decision-flow",[208],{"type":55,"value":209},"Decision Flow",{"type":50,"tag":58,"props":211,"children":212},{},[213],{"type":55,"value":214},"Start from the outcome, not the mechanism:",{"type":50,"tag":216,"props":217,"children":218},"ol",{},[219,224,281,337,369],{"type":50,"tag":85,"props":220,"children":221},{},[222],{"type":55,"value":223},"Identify the product or quality signal: helpful click, ticket resolution,\nconversion, guardrail pass, retrieval quality, model confidence, latency,\ncost, human review, or LLM-as-judge result.",{"type":50,"tag":85,"props":225,"children":226},{},[227,229],{"type":55,"value":228},"Decide when the signal appears:\n",{"type":50,"tag":81,"props":230,"children":231},{},[232,253],{"type":50,"tag":85,"props":233,"children":234},{},[235,237,243,245,251],{"type":55,"value":236},"During the run: use direct scoring with ",{"type":50,"tag":179,"props":238,"children":240},{"className":239},[],[241],{"type":55,"value":242},"step.score()",{"type":55,"value":244}," or\n",{"type":50,"tag":179,"props":246,"children":248},{"className":247},[],[249],{"type":55,"value":250},"inngest.score()",{"type":55,"value":252},".",{"type":50,"tag":85,"props":254,"children":255},{},[256,258,264,266,272,274,280],{"type":55,"value":257},"After the run: use deferred scoring with ",{"type":50,"tag":179,"props":259,"children":261},{"className":260},[],[262],{"type":55,"value":263},"createScorer()",{"type":55,"value":265}," and ",{"type":50,"tag":179,"props":267,"children":269},{"className":268},[],[270],{"type":55,"value":271},"defer()",{"type":55,"value":273},",\nor explicit ",{"type":50,"tag":179,"props":275,"children":277},{"className":276},[],[278],{"type":55,"value":279},"inngest.score({ runId })",{"type":55,"value":252},{"type":50,"tag":85,"props":282,"children":283},{},[284,286],{"type":55,"value":285},"Decide how humans will inspect related work:\n",{"type":50,"tag":81,"props":287,"children":288},{},[289,332],{"type":50,"tag":85,"props":290,"children":291},{},[292,294,300,302,308,310,316,317,323,325,331],{"type":55,"value":293},"Use ",{"type":50,"tag":179,"props":295,"children":297},{"className":296},[],[298],{"type":55,"value":299},"meta.sessions",{"type":55,"value":301}," for repeated high-cardinality identifiers such as\n",{"type":50,"tag":179,"props":303,"children":305},{"className":304},[],[306],{"type":55,"value":307},"conversation_id",{"type":55,"value":309},", ",{"type":50,"tag":179,"props":311,"children":313},{"className":312},[],[314],{"type":55,"value":315},"ticket_id",{"type":55,"value":309},{"type":50,"tag":179,"props":318,"children":320},{"className":319},[],[321],{"type":55,"value":322},"agent_run_id",{"type":55,"value":324},", or ",{"type":50,"tag":179,"props":326,"children":328},{"className":327},[],[329],{"type":55,"value":330},"import_id",{"type":55,"value":252},{"type":50,"tag":85,"props":333,"children":334},{},[335],{"type":55,"value":336},"Use Insights for ad hoc historical analysis, low-cardinality filters, SQL\naggregates, and broad investigation.",{"type":50,"tag":85,"props":338,"children":339},{},[340,342],{"type":55,"value":341},"Decide whether to compare variants:\n",{"type":50,"tag":81,"props":343,"children":344},{},[345,356],{"type":50,"tag":85,"props":346,"children":347},{},[348,349,354],{"type":55,"value":293},{"type":50,"tag":179,"props":350,"children":352},{"className":351},[],[353],{"type":55,"value":184},{"type":55,"value":355}," for prompt, model, provider, tool, workflow, or\nrollout comparisons.",{"type":50,"tag":85,"props":357,"children":358},{},[359,361,367],{"type":55,"value":360},"Pass ",{"type":50,"tag":179,"props":362,"children":364},{"className":363},[],[365],{"type":55,"value":366},"experimentRef",{"type":55,"value":368}," to deferred or later scores when the score should be\ncredited to the selected variant.",{"type":50,"tag":85,"props":370,"children":371},{},[372,374],{"type":55,"value":373},"Preserve traceability:\n",{"type":50,"tag":81,"props":375,"children":376},{},[377],{"type":50,"tag":85,"props":378,"children":379},{},[380],{"type":55,"value":381},"Keep model calls, tool calls, waits, database writes, and scoring work in\ndurable steps so traces explain why the score happened.",{"type":50,"tag":69,"props":383,"children":385},{"id":384},"setup-requirements",[386],{"type":55,"value":387},"Setup Requirements",{"type":50,"tag":81,"props":389,"children":390},{},[391,403,408,434,451,456],{"type":50,"tag":85,"props":392,"children":393},{},[394,396,402],{"type":55,"value":395},"Use TypeScript SDK v4 and install the latest SDK: ",{"type":50,"tag":179,"props":397,"children":399},{"className":398},[],[400],{"type":55,"value":401},"npm install inngest@latest",{"type":55,"value":252},{"type":50,"tag":85,"props":404,"children":405},{},[406],{"type":55,"value":407},"Scoring and deferred scoring are beta APIs; verify current imports against\nthe docs before shipping user-facing examples.",{"type":50,"tag":85,"props":409,"children":410},{},[411,416,418,424,426,432],{"type":50,"tag":179,"props":412,"children":414},{"className":413},[],[415],{"type":55,"value":242},{"type":55,"value":417}," requires ",{"type":50,"tag":179,"props":419,"children":421},{"className":420},[],[422],{"type":55,"value":423},"scoreMiddleware()",{"type":55,"value":425}," from ",{"type":50,"tag":179,"props":427,"children":429},{"className":428},[],[430],{"type":55,"value":431},"inngest\u002Fexperimental",{"type":55,"value":433}," on\nthe Inngest client.",{"type":50,"tag":85,"props":435,"children":436},{},[437,442,444,449],{"type":50,"tag":179,"props":438,"children":440},{"className":439},[],[441],{"type":55,"value":263},{"type":55,"value":443}," is imported from ",{"type":50,"tag":179,"props":445,"children":447},{"className":446},[],[448],{"type":55,"value":431},{"type":55,"value":450}," and the scorer must\nbe registered in the serve handler with other functions.",{"type":50,"tag":85,"props":452,"children":453},{},[454],{"type":55,"value":455},"Sessions sent through the TypeScript SDK require v4.7.0 or later.",{"type":50,"tag":85,"props":457,"children":458},{},[459,461,466,468,474,476,481],{"type":55,"value":460},"Step experiments require v4.8.0 or later for ",{"type":50,"tag":179,"props":462,"children":464},{"className":463},[],[465],{"type":55,"value":184},{"type":55,"value":467}," and the\n",{"type":50,"tag":179,"props":469,"children":471},{"className":470},[],[472],{"type":55,"value":473},"experiment",{"type":55,"value":475}," helper from ",{"type":50,"tag":179,"props":477,"children":479},{"className":478},[],[480],{"type":55,"value":8},{"type":55,"value":252},{"type":50,"tag":58,"props":483,"children":484},{},[485],{"type":55,"value":486},"Client shape:",{"type":50,"tag":488,"props":489,"children":494},"pre",{"className":490,"code":491,"language":492,"meta":493,"style":493},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { Inngest } from \"inngest\";\nimport { scoreMiddleware } from \"inngest\u002Fexperimental\";\n\nexport const inngest = new Inngest({\n  id: \"support-agent\",\n  middleware: [scoreMiddleware()],\n});\n","typescript","",[495],{"type":50,"tag":179,"props":496,"children":497},{"__ignoreMap":493},[498,552,593,603,648,680,712],{"type":50,"tag":499,"props":500,"children":503},"span",{"class":501,"line":502},"line",1,[504,510,516,522,527,532,537,542,547],{"type":50,"tag":499,"props":505,"children":507},{"style":506},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[508],{"type":55,"value":509},"import",{"type":50,"tag":499,"props":511,"children":513},{"style":512},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[514],{"type":55,"value":515}," {",{"type":50,"tag":499,"props":517,"children":519},{"style":518},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[520],{"type":55,"value":521}," Inngest",{"type":50,"tag":499,"props":523,"children":524},{"style":512},[525],{"type":55,"value":526}," }",{"type":50,"tag":499,"props":528,"children":529},{"style":506},[530],{"type":55,"value":531}," from",{"type":50,"tag":499,"props":533,"children":534},{"style":512},[535],{"type":55,"value":536}," \"",{"type":50,"tag":499,"props":538,"children":540},{"style":539},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[541],{"type":55,"value":8},{"type":50,"tag":499,"props":543,"children":544},{"style":512},[545],{"type":55,"value":546},"\"",{"type":50,"tag":499,"props":548,"children":549},{"style":512},[550],{"type":55,"value":551},";\n",{"type":50,"tag":499,"props":553,"children":555},{"class":501,"line":554},2,[556,560,564,569,573,577,581,585,589],{"type":50,"tag":499,"props":557,"children":558},{"style":506},[559],{"type":55,"value":509},{"type":50,"tag":499,"props":561,"children":562},{"style":512},[563],{"type":55,"value":515},{"type":50,"tag":499,"props":565,"children":566},{"style":518},[567],{"type":55,"value":568}," scoreMiddleware",{"type":50,"tag":499,"props":570,"children":571},{"style":512},[572],{"type":55,"value":526},{"type":50,"tag":499,"props":574,"children":575},{"style":506},[576],{"type":55,"value":531},{"type":50,"tag":499,"props":578,"children":579},{"style":512},[580],{"type":55,"value":536},{"type":50,"tag":499,"props":582,"children":583},{"style":539},[584],{"type":55,"value":431},{"type":50,"tag":499,"props":586,"children":587},{"style":512},[588],{"type":55,"value":546},{"type":50,"tag":499,"props":590,"children":591},{"style":512},[592],{"type":55,"value":551},{"type":50,"tag":499,"props":594,"children":596},{"class":501,"line":595},3,[597],{"type":50,"tag":499,"props":598,"children":600},{"emptyLinePlaceholder":599},true,[601],{"type":55,"value":602},"\n",{"type":50,"tag":499,"props":604,"children":606},{"class":501,"line":605},4,[607,612,618,623,628,633,638,643],{"type":50,"tag":499,"props":608,"children":609},{"style":506},[610],{"type":55,"value":611},"export",{"type":50,"tag":499,"props":613,"children":615},{"style":614},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[616],{"type":55,"value":617}," const",{"type":50,"tag":499,"props":619,"children":620},{"style":518},[621],{"type":55,"value":622}," inngest ",{"type":50,"tag":499,"props":624,"children":625},{"style":512},[626],{"type":55,"value":627},"=",{"type":50,"tag":499,"props":629,"children":630},{"style":512},[631],{"type":55,"value":632}," new",{"type":50,"tag":499,"props":634,"children":636},{"style":635},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[637],{"type":55,"value":521},{"type":50,"tag":499,"props":639,"children":640},{"style":518},[641],{"type":55,"value":642},"(",{"type":50,"tag":499,"props":644,"children":645},{"style":512},[646],{"type":55,"value":647},"{\n",{"type":50,"tag":499,"props":649,"children":650},{"class":501,"line":30},[651,657,662,666,671,675],{"type":50,"tag":499,"props":652,"children":654},{"style":653},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[655],{"type":55,"value":656},"  id",{"type":50,"tag":499,"props":658,"children":659},{"style":512},[660],{"type":55,"value":661},":",{"type":50,"tag":499,"props":663,"children":664},{"style":512},[665],{"type":55,"value":536},{"type":50,"tag":499,"props":667,"children":668},{"style":539},[669],{"type":55,"value":670},"support-agent",{"type":50,"tag":499,"props":672,"children":673},{"style":512},[674],{"type":55,"value":546},{"type":50,"tag":499,"props":676,"children":677},{"style":512},[678],{"type":55,"value":679},",\n",{"type":50,"tag":499,"props":681,"children":683},{"class":501,"line":682},6,[684,689,693,698,703,708],{"type":50,"tag":499,"props":685,"children":686},{"style":653},[687],{"type":55,"value":688},"  middleware",{"type":50,"tag":499,"props":690,"children":691},{"style":512},[692],{"type":55,"value":661},{"type":50,"tag":499,"props":694,"children":695},{"style":518},[696],{"type":55,"value":697}," [",{"type":50,"tag":499,"props":699,"children":700},{"style":635},[701],{"type":55,"value":702},"scoreMiddleware",{"type":50,"tag":499,"props":704,"children":705},{"style":518},[706],{"type":55,"value":707},"()]",{"type":50,"tag":499,"props":709,"children":710},{"style":512},[711],{"type":55,"value":679},{"type":50,"tag":499,"props":713,"children":715},{"class":501,"line":714},7,[716,721,726],{"type":50,"tag":499,"props":717,"children":718},{"style":512},[719],{"type":55,"value":720},"}",{"type":50,"tag":499,"props":722,"children":723},{"style":518},[724],{"type":55,"value":725},")",{"type":50,"tag":499,"props":727,"children":728},{"style":512},[729],{"type":55,"value":551},{"type":50,"tag":69,"props":731,"children":733},{"id":732},"sessions",[734],{"type":55,"value":735},"Sessions",{"type":50,"tag":58,"props":737,"children":738},{},[739],{"type":55,"value":740},"Add sessions when events belong to a user flow, conversation, ticket, import,\nor agent task that someone will inspect repeatedly.",{"type":50,"tag":488,"props":742,"children":744},{"className":490,"code":743,"language":492,"meta":493,"style":493},"await inngest.send({\n  name: \"support\u002Fticket.created\",\n  data: {\n    ticketId: \"tk_123\",\n    message: \"I can't sign in.\",\n  },\n  meta: {\n    sessions: {\n      ticket_id: \"tk_123\",\n    },\n  },\n});\n",[745],{"type":50,"tag":179,"props":746,"children":747},{"__ignoreMap":493},[748,778,807,824,853,882,890,906,923,952,961,969],{"type":50,"tag":499,"props":749,"children":750},{"class":501,"line":502},[751,756,761,765,770,774],{"type":50,"tag":499,"props":752,"children":753},{"style":506},[754],{"type":55,"value":755},"await",{"type":50,"tag":499,"props":757,"children":758},{"style":518},[759],{"type":55,"value":760}," inngest",{"type":50,"tag":499,"props":762,"children":763},{"style":512},[764],{"type":55,"value":252},{"type":50,"tag":499,"props":766,"children":767},{"style":635},[768],{"type":55,"value":769},"send",{"type":50,"tag":499,"props":771,"children":772},{"style":518},[773],{"type":55,"value":642},{"type":50,"tag":499,"props":775,"children":776},{"style":512},[777],{"type":55,"value":647},{"type":50,"tag":499,"props":779,"children":780},{"class":501,"line":554},[781,786,790,794,799,803],{"type":50,"tag":499,"props":782,"children":783},{"style":653},[784],{"type":55,"value":785},"  name",{"type":50,"tag":499,"props":787,"children":788},{"style":512},[789],{"type":55,"value":661},{"type":50,"tag":499,"props":791,"children":792},{"style":512},[793],{"type":55,"value":536},{"type":50,"tag":499,"props":795,"children":796},{"style":539},[797],{"type":55,"value":798},"support\u002Fticket.created",{"type":50,"tag":499,"props":800,"children":801},{"style":512},[802],{"type":55,"value":546},{"type":50,"tag":499,"props":804,"children":805},{"style":512},[806],{"type":55,"value":679},{"type":50,"tag":499,"props":808,"children":809},{"class":501,"line":595},[810,815,819],{"type":50,"tag":499,"props":811,"children":812},{"style":653},[813],{"type":55,"value":814},"  data",{"type":50,"tag":499,"props":816,"children":817},{"style":512},[818],{"type":55,"value":661},{"type":50,"tag":499,"props":820,"children":821},{"style":512},[822],{"type":55,"value":823}," {\n",{"type":50,"tag":499,"props":825,"children":826},{"class":501,"line":605},[827,832,836,840,845,849],{"type":50,"tag":499,"props":828,"children":829},{"style":653},[830],{"type":55,"value":831},"    ticketId",{"type":50,"tag":499,"props":833,"children":834},{"style":512},[835],{"type":55,"value":661},{"type":50,"tag":499,"props":837,"children":838},{"style":512},[839],{"type":55,"value":536},{"type":50,"tag":499,"props":841,"children":842},{"style":539},[843],{"type":55,"value":844},"tk_123",{"type":50,"tag":499,"props":846,"children":847},{"style":512},[848],{"type":55,"value":546},{"type":50,"tag":499,"props":850,"children":851},{"style":512},[852],{"type":55,"value":679},{"type":50,"tag":499,"props":854,"children":855},{"class":501,"line":30},[856,861,865,869,874,878],{"type":50,"tag":499,"props":857,"children":858},{"style":653},[859],{"type":55,"value":860},"    message",{"type":50,"tag":499,"props":862,"children":863},{"style":512},[864],{"type":55,"value":661},{"type":50,"tag":499,"props":866,"children":867},{"style":512},[868],{"type":55,"value":536},{"type":50,"tag":499,"props":870,"children":871},{"style":539},[872],{"type":55,"value":873},"I can't sign in.",{"type":50,"tag":499,"props":875,"children":876},{"style":512},[877],{"type":55,"value":546},{"type":50,"tag":499,"props":879,"children":880},{"style":512},[881],{"type":55,"value":679},{"type":50,"tag":499,"props":883,"children":884},{"class":501,"line":682},[885],{"type":50,"tag":499,"props":886,"children":887},{"style":512},[888],{"type":55,"value":889},"  },\n",{"type":50,"tag":499,"props":891,"children":892},{"class":501,"line":714},[893,898,902],{"type":50,"tag":499,"props":894,"children":895},{"style":653},[896],{"type":55,"value":897},"  meta",{"type":50,"tag":499,"props":899,"children":900},{"style":512},[901],{"type":55,"value":661},{"type":50,"tag":499,"props":903,"children":904},{"style":512},[905],{"type":55,"value":823},{"type":50,"tag":499,"props":907,"children":909},{"class":501,"line":908},8,[910,915,919],{"type":50,"tag":499,"props":911,"children":912},{"style":653},[913],{"type":55,"value":914},"    sessions",{"type":50,"tag":499,"props":916,"children":917},{"style":512},[918],{"type":55,"value":661},{"type":50,"tag":499,"props":920,"children":921},{"style":512},[922],{"type":55,"value":823},{"type":50,"tag":499,"props":924,"children":926},{"class":501,"line":925},9,[927,932,936,940,944,948],{"type":50,"tag":499,"props":928,"children":929},{"style":653},[930],{"type":55,"value":931},"      ticket_id",{"type":50,"tag":499,"props":933,"children":934},{"style":512},[935],{"type":55,"value":661},{"type":50,"tag":499,"props":937,"children":938},{"style":512},[939],{"type":55,"value":536},{"type":50,"tag":499,"props":941,"children":942},{"style":539},[943],{"type":55,"value":844},{"type":50,"tag":499,"props":945,"children":946},{"style":512},[947],{"type":55,"value":546},{"type":50,"tag":499,"props":949,"children":950},{"style":512},[951],{"type":55,"value":679},{"type":50,"tag":499,"props":953,"children":955},{"class":501,"line":954},10,[956],{"type":50,"tag":499,"props":957,"children":958},{"style":512},[959],{"type":55,"value":960},"    },\n",{"type":50,"tag":499,"props":962,"children":964},{"class":501,"line":963},11,[965],{"type":50,"tag":499,"props":966,"children":967},{"style":512},[968],{"type":55,"value":889},{"type":50,"tag":499,"props":970,"children":972},{"class":501,"line":971},12,[973,977,981],{"type":50,"tag":499,"props":974,"children":975},{"style":512},[976],{"type":55,"value":720},{"type":50,"tag":499,"props":978,"children":979},{"style":518},[980],{"type":55,"value":725},{"type":50,"tag":499,"props":982,"children":983},{"style":512},[984],{"type":55,"value":551},{"type":50,"tag":58,"props":986,"children":987},{},[988],{"type":55,"value":989},"Rules:",{"type":50,"tag":81,"props":991,"children":992},{},[993,998,1010,1030],{"type":50,"tag":85,"props":994,"children":995},{},[996],{"type":55,"value":997},"Use stable, non-secret, high-cardinality IDs.",{"type":50,"tag":85,"props":999,"children":1000},{},[1001,1003,1008],{"type":55,"value":1002},"Keep the key generic, such as ",{"type":50,"tag":179,"props":1004,"children":1006},{"className":1005},[],[1007],{"type":55,"value":307},{"type":55,"value":1009},"; put the actual ID in the\nvalue.",{"type":50,"tag":85,"props":1011,"children":1012},{},[1013,1015,1021,1022,1028],{"type":55,"value":1014},"Pass sessions explicitly through ",{"type":50,"tag":179,"props":1016,"children":1018},{"className":1017},[],[1019],{"type":55,"value":1020},"step.invoke()",{"type":55,"value":265},{"type":50,"tag":179,"props":1023,"children":1025},{"className":1024},[],[1026],{"type":55,"value":1027},"step.sendEvent()",{"type":55,"value":1029}," when\ndownstream runs should join the same session.",{"type":50,"tag":85,"props":1031,"children":1032},{},[1033,1035,1041],{"type":55,"value":1034},"Do not use sessions for labels like ",{"type":50,"tag":179,"props":1036,"children":1038},{"className":1037},[],[1039],{"type":55,"value":1040},"environment: prod",{"type":55,"value":1042},"; use Insights for\nthat style of filtering.",{"type":50,"tag":69,"props":1044,"children":1046},{"id":1045},"direct-scoring",[1047],{"type":55,"value":1048},"Direct Scoring",{"type":50,"tag":58,"props":1050,"children":1051},{},[1052],{"type":55,"value":1053},"Use direct scoring when the score is known during the function run.",{"type":50,"tag":58,"props":1055,"children":1056},{},[1057],{"type":55,"value":1058},"Good direct scores:",{"type":50,"tag":81,"props":1060,"children":1061},{},[1062,1067,1072,1077,1082,1087],{"type":50,"tag":85,"props":1063,"children":1064},{},[1065],{"type":55,"value":1066},"guardrail pass\u002Ffail",{"type":50,"tag":85,"props":1068,"children":1069},{},[1070],{"type":55,"value":1071},"JSON validity",{"type":50,"tag":85,"props":1073,"children":1074},{},[1075],{"type":55,"value":1076},"retrieval confidence",{"type":50,"tag":85,"props":1078,"children":1079},{},[1080],{"type":55,"value":1081},"tool success",{"type":50,"tag":85,"props":1083,"children":1084},{},[1085],{"type":55,"value":1086},"model confidence",{"type":50,"tag":85,"props":1088,"children":1089},{},[1090],{"type":55,"value":1091},"inline LLM-as-judge result",{"type":50,"tag":488,"props":1093,"children":1095},{"className":490,"code":1094,"language":492,"meta":493,"style":493},"export const answerTicket = inngest.createFunction(\n  {\n    id: \"answer-ticket\",\n    triggers: [{ event: \"support\u002Fticket.created\" }],\n  },\n  async ({ event, step }) => {\n    const answer = await step.run(\"generate-answer\", () =>\n      generateAnswer(event.data.ticketId)\n    );\n\n    const passed = await step.run(\"check-answer\", () => validateAnswer(answer));\n\n    await step.score(\"score-answer-quality\", {\n      name: \"answer-quality\",\n      value: passed,\n    });\n\n    return { answer, passed };\n  }\n);\n",[1096],{"type":50,"tag":179,"props":1097,"children":1098},{"__ignoreMap":493},[1099,1137,1145,1174,1229,1236,1278,1345,1385,1397,1404,1488,1495,1542,1572,1593,1610,1618,1648,1657],{"type":50,"tag":499,"props":1100,"children":1101},{"class":501,"line":502},[1102,1106,1110,1115,1119,1123,1127,1132],{"type":50,"tag":499,"props":1103,"children":1104},{"style":506},[1105],{"type":55,"value":611},{"type":50,"tag":499,"props":1107,"children":1108},{"style":614},[1109],{"type":55,"value":617},{"type":50,"tag":499,"props":1111,"children":1112},{"style":518},[1113],{"type":55,"value":1114}," answerTicket ",{"type":50,"tag":499,"props":1116,"children":1117},{"style":512},[1118],{"type":55,"value":627},{"type":50,"tag":499,"props":1120,"children":1121},{"style":518},[1122],{"type":55,"value":760},{"type":50,"tag":499,"props":1124,"children":1125},{"style":512},[1126],{"type":55,"value":252},{"type":50,"tag":499,"props":1128,"children":1129},{"style":635},[1130],{"type":55,"value":1131},"createFunction",{"type":50,"tag":499,"props":1133,"children":1134},{"style":518},[1135],{"type":55,"value":1136},"(\n",{"type":50,"tag":499,"props":1138,"children":1139},{"class":501,"line":554},[1140],{"type":50,"tag":499,"props":1141,"children":1142},{"style":512},[1143],{"type":55,"value":1144},"  {\n",{"type":50,"tag":499,"props":1146,"children":1147},{"class":501,"line":595},[1148,1153,1157,1161,1166,1170],{"type":50,"tag":499,"props":1149,"children":1150},{"style":653},[1151],{"type":55,"value":1152},"    id",{"type":50,"tag":499,"props":1154,"children":1155},{"style":512},[1156],{"type":55,"value":661},{"type":50,"tag":499,"props":1158,"children":1159},{"style":512},[1160],{"type":55,"value":536},{"type":50,"tag":499,"props":1162,"children":1163},{"style":539},[1164],{"type":55,"value":1165},"answer-ticket",{"type":50,"tag":499,"props":1167,"children":1168},{"style":512},[1169],{"type":55,"value":546},{"type":50,"tag":499,"props":1171,"children":1172},{"style":512},[1173],{"type":55,"value":679},{"type":50,"tag":499,"props":1175,"children":1176},{"class":501,"line":605},[1177,1182,1186,1190,1195,1200,1204,1208,1212,1216,1220,1225],{"type":50,"tag":499,"props":1178,"children":1179},{"style":653},[1180],{"type":55,"value":1181},"    triggers",{"type":50,"tag":499,"props":1183,"children":1184},{"style":512},[1185],{"type":55,"value":661},{"type":50,"tag":499,"props":1187,"children":1188},{"style":518},[1189],{"type":55,"value":697},{"type":50,"tag":499,"props":1191,"children":1192},{"style":512},[1193],{"type":55,"value":1194},"{",{"type":50,"tag":499,"props":1196,"children":1197},{"style":653},[1198],{"type":55,"value":1199}," event",{"type":50,"tag":499,"props":1201,"children":1202},{"style":512},[1203],{"type":55,"value":661},{"type":50,"tag":499,"props":1205,"children":1206},{"style":512},[1207],{"type":55,"value":536},{"type":50,"tag":499,"props":1209,"children":1210},{"style":539},[1211],{"type":55,"value":798},{"type":50,"tag":499,"props":1213,"children":1214},{"style":512},[1215],{"type":55,"value":546},{"type":50,"tag":499,"props":1217,"children":1218},{"style":512},[1219],{"type":55,"value":526},{"type":50,"tag":499,"props":1221,"children":1222},{"style":518},[1223],{"type":55,"value":1224},"]",{"type":50,"tag":499,"props":1226,"children":1227},{"style":512},[1228],{"type":55,"value":679},{"type":50,"tag":499,"props":1230,"children":1231},{"class":501,"line":30},[1232],{"type":50,"tag":499,"props":1233,"children":1234},{"style":512},[1235],{"type":55,"value":889},{"type":50,"tag":499,"props":1237,"children":1238},{"class":501,"line":682},[1239,1244,1249,1254,1259,1264,1269,1274],{"type":50,"tag":499,"props":1240,"children":1241},{"style":614},[1242],{"type":55,"value":1243},"  async",{"type":50,"tag":499,"props":1245,"children":1246},{"style":512},[1247],{"type":55,"value":1248}," ({",{"type":50,"tag":499,"props":1250,"children":1252},{"style":1251},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[1253],{"type":55,"value":1199},{"type":50,"tag":499,"props":1255,"children":1256},{"style":512},[1257],{"type":55,"value":1258},",",{"type":50,"tag":499,"props":1260,"children":1261},{"style":1251},[1262],{"type":55,"value":1263}," step",{"type":50,"tag":499,"props":1265,"children":1266},{"style":512},[1267],{"type":55,"value":1268}," })",{"type":50,"tag":499,"props":1270,"children":1271},{"style":614},[1272],{"type":55,"value":1273}," =>",{"type":50,"tag":499,"props":1275,"children":1276},{"style":512},[1277],{"type":55,"value":823},{"type":50,"tag":499,"props":1279,"children":1280},{"class":501,"line":714},[1281,1286,1291,1296,1301,1305,1309,1314,1318,1322,1327,1331,1335,1340],{"type":50,"tag":499,"props":1282,"children":1283},{"style":614},[1284],{"type":55,"value":1285},"    const",{"type":50,"tag":499,"props":1287,"children":1288},{"style":518},[1289],{"type":55,"value":1290}," answer",{"type":50,"tag":499,"props":1292,"children":1293},{"style":512},[1294],{"type":55,"value":1295}," =",{"type":50,"tag":499,"props":1297,"children":1298},{"style":506},[1299],{"type":55,"value":1300}," await",{"type":50,"tag":499,"props":1302,"children":1303},{"style":518},[1304],{"type":55,"value":1263},{"type":50,"tag":499,"props":1306,"children":1307},{"style":512},[1308],{"type":55,"value":252},{"type":50,"tag":499,"props":1310,"children":1311},{"style":635},[1312],{"type":55,"value":1313},"run",{"type":50,"tag":499,"props":1315,"children":1316},{"style":653},[1317],{"type":55,"value":642},{"type":50,"tag":499,"props":1319,"children":1320},{"style":512},[1321],{"type":55,"value":546},{"type":50,"tag":499,"props":1323,"children":1324},{"style":539},[1325],{"type":55,"value":1326},"generate-answer",{"type":50,"tag":499,"props":1328,"children":1329},{"style":512},[1330],{"type":55,"value":546},{"type":50,"tag":499,"props":1332,"children":1333},{"style":512},[1334],{"type":55,"value":1258},{"type":50,"tag":499,"props":1336,"children":1337},{"style":512},[1338],{"type":55,"value":1339}," ()",{"type":50,"tag":499,"props":1341,"children":1342},{"style":614},[1343],{"type":55,"value":1344}," =>\n",{"type":50,"tag":499,"props":1346,"children":1347},{"class":501,"line":908},[1348,1353,1357,1362,1366,1371,1375,1380],{"type":50,"tag":499,"props":1349,"children":1350},{"style":635},[1351],{"type":55,"value":1352},"      generateAnswer",{"type":50,"tag":499,"props":1354,"children":1355},{"style":653},[1356],{"type":55,"value":642},{"type":50,"tag":499,"props":1358,"children":1359},{"style":518},[1360],{"type":55,"value":1361},"event",{"type":50,"tag":499,"props":1363,"children":1364},{"style":512},[1365],{"type":55,"value":252},{"type":50,"tag":499,"props":1367,"children":1368},{"style":518},[1369],{"type":55,"value":1370},"data",{"type":50,"tag":499,"props":1372,"children":1373},{"style":512},[1374],{"type":55,"value":252},{"type":50,"tag":499,"props":1376,"children":1377},{"style":518},[1378],{"type":55,"value":1379},"ticketId",{"type":50,"tag":499,"props":1381,"children":1382},{"style":653},[1383],{"type":55,"value":1384},")\n",{"type":50,"tag":499,"props":1386,"children":1387},{"class":501,"line":925},[1388,1393],{"type":50,"tag":499,"props":1389,"children":1390},{"style":653},[1391],{"type":55,"value":1392},"    )",{"type":50,"tag":499,"props":1394,"children":1395},{"style":512},[1396],{"type":55,"value":551},{"type":50,"tag":499,"props":1398,"children":1399},{"class":501,"line":954},[1400],{"type":50,"tag":499,"props":1401,"children":1402},{"emptyLinePlaceholder":599},[1403],{"type":55,"value":602},{"type":50,"tag":499,"props":1405,"children":1406},{"class":501,"line":963},[1407,1411,1416,1420,1424,1428,1432,1436,1440,1444,1449,1453,1457,1461,1465,1470,1474,1479,1484],{"type":50,"tag":499,"props":1408,"children":1409},{"style":614},[1410],{"type":55,"value":1285},{"type":50,"tag":499,"props":1412,"children":1413},{"style":518},[1414],{"type":55,"value":1415}," passed",{"type":50,"tag":499,"props":1417,"children":1418},{"style":512},[1419],{"type":55,"value":1295},{"type":50,"tag":499,"props":1421,"children":1422},{"style":506},[1423],{"type":55,"value":1300},{"type":50,"tag":499,"props":1425,"children":1426},{"style":518},[1427],{"type":55,"value":1263},{"type":50,"tag":499,"props":1429,"children":1430},{"style":512},[1431],{"type":55,"value":252},{"type":50,"tag":499,"props":1433,"children":1434},{"style":635},[1435],{"type":55,"value":1313},{"type":50,"tag":499,"props":1437,"children":1438},{"style":653},[1439],{"type":55,"value":642},{"type":50,"tag":499,"props":1441,"children":1442},{"style":512},[1443],{"type":55,"value":546},{"type":50,"tag":499,"props":1445,"children":1446},{"style":539},[1447],{"type":55,"value":1448},"check-answer",{"type":50,"tag":499,"props":1450,"children":1451},{"style":512},[1452],{"type":55,"value":546},{"type":50,"tag":499,"props":1454,"children":1455},{"style":512},[1456],{"type":55,"value":1258},{"type":50,"tag":499,"props":1458,"children":1459},{"style":512},[1460],{"type":55,"value":1339},{"type":50,"tag":499,"props":1462,"children":1463},{"style":614},[1464],{"type":55,"value":1273},{"type":50,"tag":499,"props":1466,"children":1467},{"style":635},[1468],{"type":55,"value":1469}," validateAnswer",{"type":50,"tag":499,"props":1471,"children":1472},{"style":653},[1473],{"type":55,"value":642},{"type":50,"tag":499,"props":1475,"children":1476},{"style":518},[1477],{"type":55,"value":1478},"answer",{"type":50,"tag":499,"props":1480,"children":1481},{"style":653},[1482],{"type":55,"value":1483},"))",{"type":50,"tag":499,"props":1485,"children":1486},{"style":512},[1487],{"type":55,"value":551},{"type":50,"tag":499,"props":1489,"children":1490},{"class":501,"line":971},[1491],{"type":50,"tag":499,"props":1492,"children":1493},{"emptyLinePlaceholder":599},[1494],{"type":55,"value":602},{"type":50,"tag":499,"props":1496,"children":1498},{"class":501,"line":1497},13,[1499,1504,1508,1512,1517,1521,1525,1530,1534,1538],{"type":50,"tag":499,"props":1500,"children":1501},{"style":506},[1502],{"type":55,"value":1503},"    await",{"type":50,"tag":499,"props":1505,"children":1506},{"style":518},[1507],{"type":55,"value":1263},{"type":50,"tag":499,"props":1509,"children":1510},{"style":512},[1511],{"type":55,"value":252},{"type":50,"tag":499,"props":1513,"children":1514},{"style":635},[1515],{"type":55,"value":1516},"score",{"type":50,"tag":499,"props":1518,"children":1519},{"style":653},[1520],{"type":55,"value":642},{"type":50,"tag":499,"props":1522,"children":1523},{"style":512},[1524],{"type":55,"value":546},{"type":50,"tag":499,"props":1526,"children":1527},{"style":539},[1528],{"type":55,"value":1529},"score-answer-quality",{"type":50,"tag":499,"props":1531,"children":1532},{"style":512},[1533],{"type":55,"value":546},{"type":50,"tag":499,"props":1535,"children":1536},{"style":512},[1537],{"type":55,"value":1258},{"type":50,"tag":499,"props":1539,"children":1540},{"style":512},[1541],{"type":55,"value":823},{"type":50,"tag":499,"props":1543,"children":1545},{"class":501,"line":1544},14,[1546,1551,1555,1559,1564,1568],{"type":50,"tag":499,"props":1547,"children":1548},{"style":653},[1549],{"type":55,"value":1550},"      name",{"type":50,"tag":499,"props":1552,"children":1553},{"style":512},[1554],{"type":55,"value":661},{"type":50,"tag":499,"props":1556,"children":1557},{"style":512},[1558],{"type":55,"value":536},{"type":50,"tag":499,"props":1560,"children":1561},{"style":539},[1562],{"type":55,"value":1563},"answer-quality",{"type":50,"tag":499,"props":1565,"children":1566},{"style":512},[1567],{"type":55,"value":546},{"type":50,"tag":499,"props":1569,"children":1570},{"style":512},[1571],{"type":55,"value":679},{"type":50,"tag":499,"props":1573,"children":1575},{"class":501,"line":1574},15,[1576,1581,1585,1589],{"type":50,"tag":499,"props":1577,"children":1578},{"style":653},[1579],{"type":55,"value":1580},"      value",{"type":50,"tag":499,"props":1582,"children":1583},{"style":512},[1584],{"type":55,"value":661},{"type":50,"tag":499,"props":1586,"children":1587},{"style":518},[1588],{"type":55,"value":1415},{"type":50,"tag":499,"props":1590,"children":1591},{"style":512},[1592],{"type":55,"value":679},{"type":50,"tag":499,"props":1594,"children":1596},{"class":501,"line":1595},16,[1597,1602,1606],{"type":50,"tag":499,"props":1598,"children":1599},{"style":512},[1600],{"type":55,"value":1601},"    }",{"type":50,"tag":499,"props":1603,"children":1604},{"style":653},[1605],{"type":55,"value":725},{"type":50,"tag":499,"props":1607,"children":1608},{"style":512},[1609],{"type":55,"value":551},{"type":50,"tag":499,"props":1611,"children":1613},{"class":501,"line":1612},17,[1614],{"type":50,"tag":499,"props":1615,"children":1616},{"emptyLinePlaceholder":599},[1617],{"type":55,"value":602},{"type":50,"tag":499,"props":1619,"children":1621},{"class":501,"line":1620},18,[1622,1627,1631,1635,1639,1643],{"type":50,"tag":499,"props":1623,"children":1624},{"style":506},[1625],{"type":55,"value":1626},"    return",{"type":50,"tag":499,"props":1628,"children":1629},{"style":512},[1630],{"type":55,"value":515},{"type":50,"tag":499,"props":1632,"children":1633},{"style":518},[1634],{"type":55,"value":1290},{"type":50,"tag":499,"props":1636,"children":1637},{"style":512},[1638],{"type":55,"value":1258},{"type":50,"tag":499,"props":1640,"children":1641},{"style":518},[1642],{"type":55,"value":1415},{"type":50,"tag":499,"props":1644,"children":1645},{"style":512},[1646],{"type":55,"value":1647}," };\n",{"type":50,"tag":499,"props":1649,"children":1651},{"class":501,"line":1650},19,[1652],{"type":50,"tag":499,"props":1653,"children":1654},{"style":512},[1655],{"type":55,"value":1656},"  }\n",{"type":50,"tag":499,"props":1658,"children":1660},{"class":501,"line":1659},20,[1661,1665],{"type":50,"tag":499,"props":1662,"children":1663},{"style":518},[1664],{"type":55,"value":725},{"type":50,"tag":499,"props":1666,"children":1667},{"style":512},[1668],{"type":55,"value":551},{"type":50,"tag":58,"props":1670,"children":1671},{},[1672],{"type":55,"value":1673},"Use stable score names. Changing a score name creates a separate metric.\nScore values must be finite numbers or booleans.",{"type":50,"tag":69,"props":1675,"children":1677},{"id":1676},"deferred-scoring",[1678],{"type":55,"value":1679},"Deferred Scoring",{"type":50,"tag":58,"props":1681,"children":1682},{},[1683],{"type":55,"value":1684},"Use deferred scoring when the useful signal arrives after the parent workflow\nfinishes, such as user feedback, conversion, ticket reopen, retention, or a\nslow LLM-as-judge run.",{"type":50,"tag":488,"props":1686,"children":1688},{"className":490,"code":1687,"language":492,"meta":493,"style":493},"import { createScorer } from \"inngest\u002Fexperimental\";\nimport { z } from \"zod\";\n\nexport const feedbackScorer = createScorer(\n  inngest,\n  {\n    id: \"support-feedback-scorer\",\n    schema: z.object({ ticketId: z.string() }),\n  },\n  async ({ event, step }) => {\n    const feedback = await step.waitForEvent(\"wait-for-feedback\", {\n      event: \"support\u002Ffeedback.received\",\n      timeout: \"7d\",\n      if: `async.data.ticketId == '${event.data.ticketId}'`,\n    });\n\n    return {\n      name: \"user-feedback\",\n      value: feedback?.data.helpful ? 1 : 0,\n    };\n  }\n);\n",[1689],{"type":50,"tag":179,"props":1690,"children":1691},{"__ignoreMap":493},[1692,1732,1773,1780,1808,1820,1827,1855,1927,1934,1969,2027,2056,2085,2150,2165,2172,2183,2211,2269,2277,2285],{"type":50,"tag":499,"props":1693,"children":1694},{"class":501,"line":502},[1695,1699,1703,1708,1712,1716,1720,1724,1728],{"type":50,"tag":499,"props":1696,"children":1697},{"style":506},[1698],{"type":55,"value":509},{"type":50,"tag":499,"props":1700,"children":1701},{"style":512},[1702],{"type":55,"value":515},{"type":50,"tag":499,"props":1704,"children":1705},{"style":518},[1706],{"type":55,"value":1707}," createScorer",{"type":50,"tag":499,"props":1709,"children":1710},{"style":512},[1711],{"type":55,"value":526},{"type":50,"tag":499,"props":1713,"children":1714},{"style":506},[1715],{"type":55,"value":531},{"type":50,"tag":499,"props":1717,"children":1718},{"style":512},[1719],{"type":55,"value":536},{"type":50,"tag":499,"props":1721,"children":1722},{"style":539},[1723],{"type":55,"value":431},{"type":50,"tag":499,"props":1725,"children":1726},{"style":512},[1727],{"type":55,"value":546},{"type":50,"tag":499,"props":1729,"children":1730},{"style":512},[1731],{"type":55,"value":551},{"type":50,"tag":499,"props":1733,"children":1734},{"class":501,"line":554},[1735,1739,1743,1748,1752,1756,1760,1765,1769],{"type":50,"tag":499,"props":1736,"children":1737},{"style":506},[1738],{"type":55,"value":509},{"type":50,"tag":499,"props":1740,"children":1741},{"style":512},[1742],{"type":55,"value":515},{"type":50,"tag":499,"props":1744,"children":1745},{"style":518},[1746],{"type":55,"value":1747}," z",{"type":50,"tag":499,"props":1749,"children":1750},{"style":512},[1751],{"type":55,"value":526},{"type":50,"tag":499,"props":1753,"children":1754},{"style":506},[1755],{"type":55,"value":531},{"type":50,"tag":499,"props":1757,"children":1758},{"style":512},[1759],{"type":55,"value":536},{"type":50,"tag":499,"props":1761,"children":1762},{"style":539},[1763],{"type":55,"value":1764},"zod",{"type":50,"tag":499,"props":1766,"children":1767},{"style":512},[1768],{"type":55,"value":546},{"type":50,"tag":499,"props":1770,"children":1771},{"style":512},[1772],{"type":55,"value":551},{"type":50,"tag":499,"props":1774,"children":1775},{"class":501,"line":595},[1776],{"type":50,"tag":499,"props":1777,"children":1778},{"emptyLinePlaceholder":599},[1779],{"type":55,"value":602},{"type":50,"tag":499,"props":1781,"children":1782},{"class":501,"line":605},[1783,1787,1791,1796,1800,1804],{"type":50,"tag":499,"props":1784,"children":1785},{"style":506},[1786],{"type":55,"value":611},{"type":50,"tag":499,"props":1788,"children":1789},{"style":614},[1790],{"type":55,"value":617},{"type":50,"tag":499,"props":1792,"children":1793},{"style":518},[1794],{"type":55,"value":1795}," feedbackScorer ",{"type":50,"tag":499,"props":1797,"children":1798},{"style":512},[1799],{"type":55,"value":627},{"type":50,"tag":499,"props":1801,"children":1802},{"style":635},[1803],{"type":55,"value":1707},{"type":50,"tag":499,"props":1805,"children":1806},{"style":518},[1807],{"type":55,"value":1136},{"type":50,"tag":499,"props":1809,"children":1810},{"class":501,"line":30},[1811,1816],{"type":50,"tag":499,"props":1812,"children":1813},{"style":518},[1814],{"type":55,"value":1815},"  inngest",{"type":50,"tag":499,"props":1817,"children":1818},{"style":512},[1819],{"type":55,"value":679},{"type":50,"tag":499,"props":1821,"children":1822},{"class":501,"line":682},[1823],{"type":50,"tag":499,"props":1824,"children":1825},{"style":512},[1826],{"type":55,"value":1144},{"type":50,"tag":499,"props":1828,"children":1829},{"class":501,"line":714},[1830,1834,1838,1842,1847,1851],{"type":50,"tag":499,"props":1831,"children":1832},{"style":653},[1833],{"type":55,"value":1152},{"type":50,"tag":499,"props":1835,"children":1836},{"style":512},[1837],{"type":55,"value":661},{"type":50,"tag":499,"props":1839,"children":1840},{"style":512},[1841],{"type":55,"value":536},{"type":50,"tag":499,"props":1843,"children":1844},{"style":539},[1845],{"type":55,"value":1846},"support-feedback-scorer",{"type":50,"tag":499,"props":1848,"children":1849},{"style":512},[1850],{"type":55,"value":546},{"type":50,"tag":499,"props":1852,"children":1853},{"style":512},[1854],{"type":55,"value":679},{"type":50,"tag":499,"props":1856,"children":1857},{"class":501,"line":908},[1858,1863,1867,1871,1875,1880,1884,1888,1893,1897,1901,1905,1910,1915,1919,1923],{"type":50,"tag":499,"props":1859,"children":1860},{"style":653},[1861],{"type":55,"value":1862},"    schema",{"type":50,"tag":499,"props":1864,"children":1865},{"style":512},[1866],{"type":55,"value":661},{"type":50,"tag":499,"props":1868,"children":1869},{"style":518},[1870],{"type":55,"value":1747},{"type":50,"tag":499,"props":1872,"children":1873},{"style":512},[1874],{"type":55,"value":252},{"type":50,"tag":499,"props":1876,"children":1877},{"style":635},[1878],{"type":55,"value":1879},"object",{"type":50,"tag":499,"props":1881,"children":1882},{"style":518},[1883],{"type":55,"value":642},{"type":50,"tag":499,"props":1885,"children":1886},{"style":512},[1887],{"type":55,"value":1194},{"type":50,"tag":499,"props":1889,"children":1890},{"style":653},[1891],{"type":55,"value":1892}," ticketId",{"type":50,"tag":499,"props":1894,"children":1895},{"style":512},[1896],{"type":55,"value":661},{"type":50,"tag":499,"props":1898,"children":1899},{"style":518},[1900],{"type":55,"value":1747},{"type":50,"tag":499,"props":1902,"children":1903},{"style":512},[1904],{"type":55,"value":252},{"type":50,"tag":499,"props":1906,"children":1907},{"style":635},[1908],{"type":55,"value":1909},"string",{"type":50,"tag":499,"props":1911,"children":1912},{"style":518},[1913],{"type":55,"value":1914},"() ",{"type":50,"tag":499,"props":1916,"children":1917},{"style":512},[1918],{"type":55,"value":720},{"type":50,"tag":499,"props":1920,"children":1921},{"style":518},[1922],{"type":55,"value":725},{"type":50,"tag":499,"props":1924,"children":1925},{"style":512},[1926],{"type":55,"value":679},{"type":50,"tag":499,"props":1928,"children":1929},{"class":501,"line":925},[1930],{"type":50,"tag":499,"props":1931,"children":1932},{"style":512},[1933],{"type":55,"value":889},{"type":50,"tag":499,"props":1935,"children":1936},{"class":501,"line":954},[1937,1941,1945,1949,1953,1957,1961,1965],{"type":50,"tag":499,"props":1938,"children":1939},{"style":614},[1940],{"type":55,"value":1243},{"type":50,"tag":499,"props":1942,"children":1943},{"style":512},[1944],{"type":55,"value":1248},{"type":50,"tag":499,"props":1946,"children":1947},{"style":1251},[1948],{"type":55,"value":1199},{"type":50,"tag":499,"props":1950,"children":1951},{"style":512},[1952],{"type":55,"value":1258},{"type":50,"tag":499,"props":1954,"children":1955},{"style":1251},[1956],{"type":55,"value":1263},{"type":50,"tag":499,"props":1958,"children":1959},{"style":512},[1960],{"type":55,"value":1268},{"type":50,"tag":499,"props":1962,"children":1963},{"style":614},[1964],{"type":55,"value":1273},{"type":50,"tag":499,"props":1966,"children":1967},{"style":512},[1968],{"type":55,"value":823},{"type":50,"tag":499,"props":1970,"children":1971},{"class":501,"line":963},[1972,1976,1981,1985,1989,1993,1997,2002,2006,2010,2015,2019,2023],{"type":50,"tag":499,"props":1973,"children":1974},{"style":614},[1975],{"type":55,"value":1285},{"type":50,"tag":499,"props":1977,"children":1978},{"style":518},[1979],{"type":55,"value":1980}," feedback",{"type":50,"tag":499,"props":1982,"children":1983},{"style":512},[1984],{"type":55,"value":1295},{"type":50,"tag":499,"props":1986,"children":1987},{"style":506},[1988],{"type":55,"value":1300},{"type":50,"tag":499,"props":1990,"children":1991},{"style":518},[1992],{"type":55,"value":1263},{"type":50,"tag":499,"props":1994,"children":1995},{"style":512},[1996],{"type":55,"value":252},{"type":50,"tag":499,"props":1998,"children":1999},{"style":635},[2000],{"type":55,"value":2001},"waitForEvent",{"type":50,"tag":499,"props":2003,"children":2004},{"style":653},[2005],{"type":55,"value":642},{"type":50,"tag":499,"props":2007,"children":2008},{"style":512},[2009],{"type":55,"value":546},{"type":50,"tag":499,"props":2011,"children":2012},{"style":539},[2013],{"type":55,"value":2014},"wait-for-feedback",{"type":50,"tag":499,"props":2016,"children":2017},{"style":512},[2018],{"type":55,"value":546},{"type":50,"tag":499,"props":2020,"children":2021},{"style":512},[2022],{"type":55,"value":1258},{"type":50,"tag":499,"props":2024,"children":2025},{"style":512},[2026],{"type":55,"value":823},{"type":50,"tag":499,"props":2028,"children":2029},{"class":501,"line":971},[2030,2035,2039,2043,2048,2052],{"type":50,"tag":499,"props":2031,"children":2032},{"style":653},[2033],{"type":55,"value":2034},"      event",{"type":50,"tag":499,"props":2036,"children":2037},{"style":512},[2038],{"type":55,"value":661},{"type":50,"tag":499,"props":2040,"children":2041},{"style":512},[2042],{"type":55,"value":536},{"type":50,"tag":499,"props":2044,"children":2045},{"style":539},[2046],{"type":55,"value":2047},"support\u002Ffeedback.received",{"type":50,"tag":499,"props":2049,"children":2050},{"style":512},[2051],{"type":55,"value":546},{"type":50,"tag":499,"props":2053,"children":2054},{"style":512},[2055],{"type":55,"value":679},{"type":50,"tag":499,"props":2057,"children":2058},{"class":501,"line":1497},[2059,2064,2068,2072,2077,2081],{"type":50,"tag":499,"props":2060,"children":2061},{"style":653},[2062],{"type":55,"value":2063},"      timeout",{"type":50,"tag":499,"props":2065,"children":2066},{"style":512},[2067],{"type":55,"value":661},{"type":50,"tag":499,"props":2069,"children":2070},{"style":512},[2071],{"type":55,"value":536},{"type":50,"tag":499,"props":2073,"children":2074},{"style":539},[2075],{"type":55,"value":2076},"7d",{"type":50,"tag":499,"props":2078,"children":2079},{"style":512},[2080],{"type":55,"value":546},{"type":50,"tag":499,"props":2082,"children":2083},{"style":512},[2084],{"type":55,"value":679},{"type":50,"tag":499,"props":2086,"children":2087},{"class":501,"line":1544},[2088,2093,2097,2102,2107,2112,2116,2120,2124,2128,2132,2136,2141,2146],{"type":50,"tag":499,"props":2089,"children":2090},{"style":653},[2091],{"type":55,"value":2092},"      if",{"type":50,"tag":499,"props":2094,"children":2095},{"style":512},[2096],{"type":55,"value":661},{"type":50,"tag":499,"props":2098,"children":2099},{"style":512},[2100],{"type":55,"value":2101}," `",{"type":50,"tag":499,"props":2103,"children":2104},{"style":539},[2105],{"type":55,"value":2106},"async.data.ticketId == '",{"type":50,"tag":499,"props":2108,"children":2109},{"style":512},[2110],{"type":55,"value":2111},"${",{"type":50,"tag":499,"props":2113,"children":2114},{"style":518},[2115],{"type":55,"value":1361},{"type":50,"tag":499,"props":2117,"children":2118},{"style":512},[2119],{"type":55,"value":252},{"type":50,"tag":499,"props":2121,"children":2122},{"style":518},[2123],{"type":55,"value":1370},{"type":50,"tag":499,"props":2125,"children":2126},{"style":512},[2127],{"type":55,"value":252},{"type":50,"tag":499,"props":2129,"children":2130},{"style":518},[2131],{"type":55,"value":1379},{"type":50,"tag":499,"props":2133,"children":2134},{"style":512},[2135],{"type":55,"value":720},{"type":50,"tag":499,"props":2137,"children":2138},{"style":539},[2139],{"type":55,"value":2140},"'",{"type":50,"tag":499,"props":2142,"children":2143},{"style":512},[2144],{"type":55,"value":2145},"`",{"type":50,"tag":499,"props":2147,"children":2148},{"style":512},[2149],{"type":55,"value":679},{"type":50,"tag":499,"props":2151,"children":2152},{"class":501,"line":1574},[2153,2157,2161],{"type":50,"tag":499,"props":2154,"children":2155},{"style":512},[2156],{"type":55,"value":1601},{"type":50,"tag":499,"props":2158,"children":2159},{"style":653},[2160],{"type":55,"value":725},{"type":50,"tag":499,"props":2162,"children":2163},{"style":512},[2164],{"type":55,"value":551},{"type":50,"tag":499,"props":2166,"children":2167},{"class":501,"line":1595},[2168],{"type":50,"tag":499,"props":2169,"children":2170},{"emptyLinePlaceholder":599},[2171],{"type":55,"value":602},{"type":50,"tag":499,"props":2173,"children":2174},{"class":501,"line":1612},[2175,2179],{"type":50,"tag":499,"props":2176,"children":2177},{"style":506},[2178],{"type":55,"value":1626},{"type":50,"tag":499,"props":2180,"children":2181},{"style":512},[2182],{"type":55,"value":823},{"type":50,"tag":499,"props":2184,"children":2185},{"class":501,"line":1620},[2186,2190,2194,2198,2203,2207],{"type":50,"tag":499,"props":2187,"children":2188},{"style":653},[2189],{"type":55,"value":1550},{"type":50,"tag":499,"props":2191,"children":2192},{"style":512},[2193],{"type":55,"value":661},{"type":50,"tag":499,"props":2195,"children":2196},{"style":512},[2197],{"type":55,"value":536},{"type":50,"tag":499,"props":2199,"children":2200},{"style":539},[2201],{"type":55,"value":2202},"user-feedback",{"type":50,"tag":499,"props":2204,"children":2205},{"style":512},[2206],{"type":55,"value":546},{"type":50,"tag":499,"props":2208,"children":2209},{"style":512},[2210],{"type":55,"value":679},{"type":50,"tag":499,"props":2212,"children":2213},{"class":501,"line":1650},[2214,2218,2222,2226,2231,2235,2239,2244,2249,2255,2260,2265],{"type":50,"tag":499,"props":2215,"children":2216},{"style":653},[2217],{"type":55,"value":1580},{"type":50,"tag":499,"props":2219,"children":2220},{"style":512},[2221],{"type":55,"value":661},{"type":50,"tag":499,"props":2223,"children":2224},{"style":518},[2225],{"type":55,"value":1980},{"type":50,"tag":499,"props":2227,"children":2228},{"style":512},[2229],{"type":55,"value":2230},"?.",{"type":50,"tag":499,"props":2232,"children":2233},{"style":518},[2234],{"type":55,"value":1370},{"type":50,"tag":499,"props":2236,"children":2237},{"style":512},[2238],{"type":55,"value":252},{"type":50,"tag":499,"props":2240,"children":2241},{"style":518},[2242],{"type":55,"value":2243},"helpful",{"type":50,"tag":499,"props":2245,"children":2246},{"style":512},[2247],{"type":55,"value":2248}," ?",{"type":50,"tag":499,"props":2250,"children":2252},{"style":2251},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[2253],{"type":55,"value":2254}," 1",{"type":50,"tag":499,"props":2256,"children":2257},{"style":512},[2258],{"type":55,"value":2259}," :",{"type":50,"tag":499,"props":2261,"children":2262},{"style":2251},[2263],{"type":55,"value":2264}," 0",{"type":50,"tag":499,"props":2266,"children":2267},{"style":512},[2268],{"type":55,"value":679},{"type":50,"tag":499,"props":2270,"children":2271},{"class":501,"line":1659},[2272],{"type":50,"tag":499,"props":2273,"children":2274},{"style":512},[2275],{"type":55,"value":2276},"    };\n",{"type":50,"tag":499,"props":2278,"children":2280},{"class":501,"line":2279},21,[2281],{"type":50,"tag":499,"props":2282,"children":2283},{"style":512},[2284],{"type":55,"value":1656},{"type":50,"tag":499,"props":2286,"children":2288},{"class":501,"line":2287},22,[2289,2293],{"type":50,"tag":499,"props":2290,"children":2291},{"style":518},[2292],{"type":55,"value":725},{"type":50,"tag":499,"props":2294,"children":2295},{"style":512},[2296],{"type":55,"value":551},{"type":50,"tag":58,"props":2298,"children":2299},{},[2300],{"type":55,"value":2301},"Trigger it from the producing function:",{"type":50,"tag":488,"props":2303,"children":2305},{"className":490,"code":2304,"language":492,"meta":493,"style":493},"async ({ event, step, defer }) => {\n  const answer = await step.run(\"generate-answer\", () =>\n    generateAnswer(event.data.ticketId)\n  );\n\n  defer(\"score-feedback\", {\n    function: feedbackScorer,\n    data: { ticketId: event.data.ticketId },\n  });\n\n  return { answer };\n}\n",[2306],{"type":50,"tag":179,"props":2307,"children":2308},{"__ignoreMap":493},[2309,2354,2414,2450,2462,2469,2502,2523,2572,2588,2595,2615],{"type":50,"tag":499,"props":2310,"children":2311},{"class":501,"line":502},[2312,2317,2321,2325,2329,2333,2337,2342,2346,2350],{"type":50,"tag":499,"props":2313,"children":2314},{"style":614},[2315],{"type":55,"value":2316},"async",{"type":50,"tag":499,"props":2318,"children":2319},{"style":512},[2320],{"type":55,"value":1248},{"type":50,"tag":499,"props":2322,"children":2323},{"style":1251},[2324],{"type":55,"value":1199},{"type":50,"tag":499,"props":2326,"children":2327},{"style":512},[2328],{"type":55,"value":1258},{"type":50,"tag":499,"props":2330,"children":2331},{"style":1251},[2332],{"type":55,"value":1263},{"type":50,"tag":499,"props":2334,"children":2335},{"style":512},[2336],{"type":55,"value":1258},{"type":50,"tag":499,"props":2338,"children":2339},{"style":1251},[2340],{"type":55,"value":2341}," defer",{"type":50,"tag":499,"props":2343,"children":2344},{"style":512},[2345],{"type":55,"value":1268},{"type":50,"tag":499,"props":2347,"children":2348},{"style":614},[2349],{"type":55,"value":1273},{"type":50,"tag":499,"props":2351,"children":2352},{"style":512},[2353],{"type":55,"value":823},{"type":50,"tag":499,"props":2355,"children":2356},{"class":501,"line":554},[2357,2362,2366,2370,2374,2378,2382,2386,2390,2394,2398,2402,2406,2410],{"type":50,"tag":499,"props":2358,"children":2359},{"style":614},[2360],{"type":55,"value":2361},"  const",{"type":50,"tag":499,"props":2363,"children":2364},{"style":518},[2365],{"type":55,"value":1290},{"type":50,"tag":499,"props":2367,"children":2368},{"style":512},[2369],{"type":55,"value":1295},{"type":50,"tag":499,"props":2371,"children":2372},{"style":506},[2373],{"type":55,"value":1300},{"type":50,"tag":499,"props":2375,"children":2376},{"style":518},[2377],{"type":55,"value":1263},{"type":50,"tag":499,"props":2379,"children":2380},{"style":512},[2381],{"type":55,"value":252},{"type":50,"tag":499,"props":2383,"children":2384},{"style":635},[2385],{"type":55,"value":1313},{"type":50,"tag":499,"props":2387,"children":2388},{"style":653},[2389],{"type":55,"value":642},{"type":50,"tag":499,"props":2391,"children":2392},{"style":512},[2393],{"type":55,"value":546},{"type":50,"tag":499,"props":2395,"children":2396},{"style":539},[2397],{"type":55,"value":1326},{"type":50,"tag":499,"props":2399,"children":2400},{"style":512},[2401],{"type":55,"value":546},{"type":50,"tag":499,"props":2403,"children":2404},{"style":512},[2405],{"type":55,"value":1258},{"type":50,"tag":499,"props":2407,"children":2408},{"style":512},[2409],{"type":55,"value":1339},{"type":50,"tag":499,"props":2411,"children":2412},{"style":614},[2413],{"type":55,"value":1344},{"type":50,"tag":499,"props":2415,"children":2416},{"class":501,"line":595},[2417,2422,2426,2430,2434,2438,2442,2446],{"type":50,"tag":499,"props":2418,"children":2419},{"style":635},[2420],{"type":55,"value":2421},"    generateAnswer",{"type":50,"tag":499,"props":2423,"children":2424},{"style":653},[2425],{"type":55,"value":642},{"type":50,"tag":499,"props":2427,"children":2428},{"style":518},[2429],{"type":55,"value":1361},{"type":50,"tag":499,"props":2431,"children":2432},{"style":512},[2433],{"type":55,"value":252},{"type":50,"tag":499,"props":2435,"children":2436},{"style":518},[2437],{"type":55,"value":1370},{"type":50,"tag":499,"props":2439,"children":2440},{"style":512},[2441],{"type":55,"value":252},{"type":50,"tag":499,"props":2443,"children":2444},{"style":518},[2445],{"type":55,"value":1379},{"type":50,"tag":499,"props":2447,"children":2448},{"style":653},[2449],{"type":55,"value":1384},{"type":50,"tag":499,"props":2451,"children":2452},{"class":501,"line":605},[2453,2458],{"type":50,"tag":499,"props":2454,"children":2455},{"style":653},[2456],{"type":55,"value":2457},"  )",{"type":50,"tag":499,"props":2459,"children":2460},{"style":512},[2461],{"type":55,"value":551},{"type":50,"tag":499,"props":2463,"children":2464},{"class":501,"line":30},[2465],{"type":50,"tag":499,"props":2466,"children":2467},{"emptyLinePlaceholder":599},[2468],{"type":55,"value":602},{"type":50,"tag":499,"props":2470,"children":2471},{"class":501,"line":682},[2472,2477,2481,2485,2490,2494,2498],{"type":50,"tag":499,"props":2473,"children":2474},{"style":635},[2475],{"type":55,"value":2476},"  defer",{"type":50,"tag":499,"props":2478,"children":2479},{"style":653},[2480],{"type":55,"value":642},{"type":50,"tag":499,"props":2482,"children":2483},{"style":512},[2484],{"type":55,"value":546},{"type":50,"tag":499,"props":2486,"children":2487},{"style":539},[2488],{"type":55,"value":2489},"score-feedback",{"type":50,"tag":499,"props":2491,"children":2492},{"style":512},[2493],{"type":55,"value":546},{"type":50,"tag":499,"props":2495,"children":2496},{"style":512},[2497],{"type":55,"value":1258},{"type":50,"tag":499,"props":2499,"children":2500},{"style":512},[2501],{"type":55,"value":823},{"type":50,"tag":499,"props":2503,"children":2504},{"class":501,"line":714},[2505,2510,2514,2519],{"type":50,"tag":499,"props":2506,"children":2507},{"style":653},[2508],{"type":55,"value":2509},"    function",{"type":50,"tag":499,"props":2511,"children":2512},{"style":512},[2513],{"type":55,"value":661},{"type":50,"tag":499,"props":2515,"children":2516},{"style":518},[2517],{"type":55,"value":2518}," feedbackScorer",{"type":50,"tag":499,"props":2520,"children":2521},{"style":512},[2522],{"type":55,"value":679},{"type":50,"tag":499,"props":2524,"children":2525},{"class":501,"line":908},[2526,2531,2535,2539,2543,2547,2551,2555,2559,2563,2567],{"type":50,"tag":499,"props":2527,"children":2528},{"style":653},[2529],{"type":55,"value":2530},"    data",{"type":50,"tag":499,"props":2532,"children":2533},{"style":512},[2534],{"type":55,"value":661},{"type":50,"tag":499,"props":2536,"children":2537},{"style":512},[2538],{"type":55,"value":515},{"type":50,"tag":499,"props":2540,"children":2541},{"style":653},[2542],{"type":55,"value":1892},{"type":50,"tag":499,"props":2544,"children":2545},{"style":512},[2546],{"type":55,"value":661},{"type":50,"tag":499,"props":2548,"children":2549},{"style":518},[2550],{"type":55,"value":1199},{"type":50,"tag":499,"props":2552,"children":2553},{"style":512},[2554],{"type":55,"value":252},{"type":50,"tag":499,"props":2556,"children":2557},{"style":518},[2558],{"type":55,"value":1370},{"type":50,"tag":499,"props":2560,"children":2561},{"style":512},[2562],{"type":55,"value":252},{"type":50,"tag":499,"props":2564,"children":2565},{"style":518},[2566],{"type":55,"value":1379},{"type":50,"tag":499,"props":2568,"children":2569},{"style":512},[2570],{"type":55,"value":2571}," },\n",{"type":50,"tag":499,"props":2573,"children":2574},{"class":501,"line":925},[2575,2580,2584],{"type":50,"tag":499,"props":2576,"children":2577},{"style":512},[2578],{"type":55,"value":2579},"  }",{"type":50,"tag":499,"props":2581,"children":2582},{"style":653},[2583],{"type":55,"value":725},{"type":50,"tag":499,"props":2585,"children":2586},{"style":512},[2587],{"type":55,"value":551},{"type":50,"tag":499,"props":2589,"children":2590},{"class":501,"line":954},[2591],{"type":50,"tag":499,"props":2592,"children":2593},{"emptyLinePlaceholder":599},[2594],{"type":55,"value":602},{"type":50,"tag":499,"props":2596,"children":2597},{"class":501,"line":963},[2598,2603,2607,2611],{"type":50,"tag":499,"props":2599,"children":2600},{"style":506},[2601],{"type":55,"value":2602},"  return",{"type":50,"tag":499,"props":2604,"children":2605},{"style":512},[2606],{"type":55,"value":515},{"type":50,"tag":499,"props":2608,"children":2609},{"style":518},[2610],{"type":55,"value":1290},{"type":50,"tag":499,"props":2612,"children":2613},{"style":512},[2614],{"type":55,"value":1647},{"type":50,"tag":499,"props":2616,"children":2617},{"class":501,"line":971},[2618],{"type":50,"tag":499,"props":2619,"children":2620},{"style":512},[2621],{"type":55,"value":2622},"}\n",{"type":50,"tag":58,"props":2624,"children":2625},{},[2626],{"type":55,"value":2627},"Guardrails:",{"type":50,"tag":81,"props":2629,"children":2630},{},[2631,2643,2660,2665],{"type":50,"tag":85,"props":2632,"children":2633},{},[2634,2636,2642],{"type":55,"value":2635},"Register scorers with ",{"type":50,"tag":179,"props":2637,"children":2639},{"className":2638},[],[2640],{"type":55,"value":2641},"serve({ functions: [...] })",{"type":55,"value":252},{"type":50,"tag":85,"props":2644,"children":2645},{},[2646,2651,2653,2658],{"type":50,"tag":179,"props":2647,"children":2649},{"className":2648},[],[2650],{"type":55,"value":271},{"type":55,"value":2652}," is fire-and-forget; do not ",{"type":50,"tag":179,"props":2654,"children":2656},{"className":2655},[],[2657],{"type":55,"value":755},{"type":55,"value":2659}," it.",{"type":50,"tag":85,"props":2661,"children":2662},{},[2663],{"type":55,"value":2664},"The parent run is attributed automatically for deferred scorers.",{"type":50,"tag":85,"props":2666,"children":2667},{},[2668,2670,2676],{"type":55,"value":2669},"Return a default score or ",{"type":50,"tag":179,"props":2671,"children":2673},{"className":2672},[],[2674],{"type":55,"value":2675},"null",{"type":55,"value":2677}," when a signal times out, based on the\nproduct semantics.",{"type":50,"tag":69,"props":2679,"children":2681},{"id":2680},"experiments",[2682],{"type":55,"value":2683},"Experiments",{"type":50,"tag":58,"props":2685,"children":2686},{},[2687,2688,2693],{"type":55,"value":293},{"type":50,"tag":179,"props":2689,"children":2691},{"className":2690},[],[2692],{"type":55,"value":184},{"type":55,"value":2694}," when comparing prompts, models, providers, tools,\nworkflow rewrites, or operational settings against real traffic.",{"type":50,"tag":488,"props":2696,"children":2698},{"className":490,"code":2697,"language":492,"meta":493,"style":493},"import { experiment } from \"inngest\";\n\nconst { result, variant, experimentRef } = await group.experiment(\n  \"answer-style\",\n  {\n    variants: {\n      concise: () => step.run(\"answer-concise\", () => answerConcise(event.data)),\n      detailed: () =>\n        step.run(\"answer-detailed\", () => answerDetailed(event.data)),\n    },\n    select: experiment.bucket(event.data.accountId, {\n      weights: { concise: 50, detailed: 50 },\n    }),\n  }\n);\n",[2699],{"type":50,"tag":179,"props":2700,"children":2701},{"__ignoreMap":493},[2702,2742,2749,2813,2834,2841,2857,2941,2961,3027,3034,3088,3139,3154,3161],{"type":50,"tag":499,"props":2703,"children":2704},{"class":501,"line":502},[2705,2709,2713,2718,2722,2726,2730,2734,2738],{"type":50,"tag":499,"props":2706,"children":2707},{"style":506},[2708],{"type":55,"value":509},{"type":50,"tag":499,"props":2710,"children":2711},{"style":512},[2712],{"type":55,"value":515},{"type":50,"tag":499,"props":2714,"children":2715},{"style":518},[2716],{"type":55,"value":2717}," experiment",{"type":50,"tag":499,"props":2719,"children":2720},{"style":512},[2721],{"type":55,"value":526},{"type":50,"tag":499,"props":2723,"children":2724},{"style":506},[2725],{"type":55,"value":531},{"type":50,"tag":499,"props":2727,"children":2728},{"style":512},[2729],{"type":55,"value":536},{"type":50,"tag":499,"props":2731,"children":2732},{"style":539},[2733],{"type":55,"value":8},{"type":50,"tag":499,"props":2735,"children":2736},{"style":512},[2737],{"type":55,"value":546},{"type":50,"tag":499,"props":2739,"children":2740},{"style":512},[2741],{"type":55,"value":551},{"type":50,"tag":499,"props":2743,"children":2744},{"class":501,"line":554},[2745],{"type":50,"tag":499,"props":2746,"children":2747},{"emptyLinePlaceholder":599},[2748],{"type":55,"value":602},{"type":50,"tag":499,"props":2750,"children":2751},{"class":501,"line":595},[2752,2757,2761,2766,2770,2775,2779,2784,2788,2792,2796,2801,2805,2809],{"type":50,"tag":499,"props":2753,"children":2754},{"style":614},[2755],{"type":55,"value":2756},"const",{"type":50,"tag":499,"props":2758,"children":2759},{"style":512},[2760],{"type":55,"value":515},{"type":50,"tag":499,"props":2762,"children":2763},{"style":518},[2764],{"type":55,"value":2765}," result",{"type":50,"tag":499,"props":2767,"children":2768},{"style":512},[2769],{"type":55,"value":1258},{"type":50,"tag":499,"props":2771,"children":2772},{"style":518},[2773],{"type":55,"value":2774}," variant",{"type":50,"tag":499,"props":2776,"children":2777},{"style":512},[2778],{"type":55,"value":1258},{"type":50,"tag":499,"props":2780,"children":2781},{"style":518},[2782],{"type":55,"value":2783}," experimentRef ",{"type":50,"tag":499,"props":2785,"children":2786},{"style":512},[2787],{"type":55,"value":720},{"type":50,"tag":499,"props":2789,"children":2790},{"style":512},[2791],{"type":55,"value":1295},{"type":50,"tag":499,"props":2793,"children":2794},{"style":506},[2795],{"type":55,"value":1300},{"type":50,"tag":499,"props":2797,"children":2798},{"style":518},[2799],{"type":55,"value":2800}," group",{"type":50,"tag":499,"props":2802,"children":2803},{"style":512},[2804],{"type":55,"value":252},{"type":50,"tag":499,"props":2806,"children":2807},{"style":635},[2808],{"type":55,"value":473},{"type":50,"tag":499,"props":2810,"children":2811},{"style":518},[2812],{"type":55,"value":1136},{"type":50,"tag":499,"props":2814,"children":2815},{"class":501,"line":605},[2816,2821,2826,2830],{"type":50,"tag":499,"props":2817,"children":2818},{"style":512},[2819],{"type":55,"value":2820},"  \"",{"type":50,"tag":499,"props":2822,"children":2823},{"style":539},[2824],{"type":55,"value":2825},"answer-style",{"type":50,"tag":499,"props":2827,"children":2828},{"style":512},[2829],{"type":55,"value":546},{"type":50,"tag":499,"props":2831,"children":2832},{"style":512},[2833],{"type":55,"value":679},{"type":50,"tag":499,"props":2835,"children":2836},{"class":501,"line":30},[2837],{"type":50,"tag":499,"props":2838,"children":2839},{"style":512},[2840],{"type":55,"value":1144},{"type":50,"tag":499,"props":2842,"children":2843},{"class":501,"line":682},[2844,2849,2853],{"type":50,"tag":499,"props":2845,"children":2846},{"style":653},[2847],{"type":55,"value":2848},"    variants",{"type":50,"tag":499,"props":2850,"children":2851},{"style":512},[2852],{"type":55,"value":661},{"type":50,"tag":499,"props":2854,"children":2855},{"style":512},[2856],{"type":55,"value":823},{"type":50,"tag":499,"props":2858,"children":2859},{"class":501,"line":714},[2860,2865,2869,2873,2877,2881,2885,2889,2893,2897,2902,2906,2910,2914,2918,2923,2928,2932,2937],{"type":50,"tag":499,"props":2861,"children":2862},{"style":635},[2863],{"type":55,"value":2864},"      concise",{"type":50,"tag":499,"props":2866,"children":2867},{"style":512},[2868],{"type":55,"value":661},{"type":50,"tag":499,"props":2870,"children":2871},{"style":512},[2872],{"type":55,"value":1339},{"type":50,"tag":499,"props":2874,"children":2875},{"style":614},[2876],{"type":55,"value":1273},{"type":50,"tag":499,"props":2878,"children":2879},{"style":518},[2880],{"type":55,"value":1263},{"type":50,"tag":499,"props":2882,"children":2883},{"style":512},[2884],{"type":55,"value":252},{"type":50,"tag":499,"props":2886,"children":2887},{"style":635},[2888],{"type":55,"value":1313},{"type":50,"tag":499,"props":2890,"children":2891},{"style":518},[2892],{"type":55,"value":642},{"type":50,"tag":499,"props":2894,"children":2895},{"style":512},[2896],{"type":55,"value":546},{"type":50,"tag":499,"props":2898,"children":2899},{"style":539},[2900],{"type":55,"value":2901},"answer-concise",{"type":50,"tag":499,"props":2903,"children":2904},{"style":512},[2905],{"type":55,"value":546},{"type":50,"tag":499,"props":2907,"children":2908},{"style":512},[2909],{"type":55,"value":1258},{"type":50,"tag":499,"props":2911,"children":2912},{"style":512},[2913],{"type":55,"value":1339},{"type":50,"tag":499,"props":2915,"children":2916},{"style":614},[2917],{"type":55,"value":1273},{"type":50,"tag":499,"props":2919,"children":2920},{"style":635},[2921],{"type":55,"value":2922}," answerConcise",{"type":50,"tag":499,"props":2924,"children":2925},{"style":518},[2926],{"type":55,"value":2927},"(event",{"type":50,"tag":499,"props":2929,"children":2930},{"style":512},[2931],{"type":55,"value":252},{"type":50,"tag":499,"props":2933,"children":2934},{"style":518},[2935],{"type":55,"value":2936},"data))",{"type":50,"tag":499,"props":2938,"children":2939},{"style":512},[2940],{"type":55,"value":679},{"type":50,"tag":499,"props":2942,"children":2943},{"class":501,"line":908},[2944,2949,2953,2957],{"type":50,"tag":499,"props":2945,"children":2946},{"style":635},[2947],{"type":55,"value":2948},"      detailed",{"type":50,"tag":499,"props":2950,"children":2951},{"style":512},[2952],{"type":55,"value":661},{"type":50,"tag":499,"props":2954,"children":2955},{"style":512},[2956],{"type":55,"value":1339},{"type":50,"tag":499,"props":2958,"children":2959},{"style":614},[2960],{"type":55,"value":1344},{"type":50,"tag":499,"props":2962,"children":2963},{"class":501,"line":925},[2964,2969,2973,2977,2981,2985,2990,2994,2998,3002,3006,3011,3015,3019,3023],{"type":50,"tag":499,"props":2965,"children":2966},{"style":518},[2967],{"type":55,"value":2968},"        step",{"type":50,"tag":499,"props":2970,"children":2971},{"style":512},[2972],{"type":55,"value":252},{"type":50,"tag":499,"props":2974,"children":2975},{"style":635},[2976],{"type":55,"value":1313},{"type":50,"tag":499,"props":2978,"children":2979},{"style":518},[2980],{"type":55,"value":642},{"type":50,"tag":499,"props":2982,"children":2983},{"style":512},[2984],{"type":55,"value":546},{"type":50,"tag":499,"props":2986,"children":2987},{"style":539},[2988],{"type":55,"value":2989},"answer-detailed",{"type":50,"tag":499,"props":2991,"children":2992},{"style":512},[2993],{"type":55,"value":546},{"type":50,"tag":499,"props":2995,"children":2996},{"style":512},[2997],{"type":55,"value":1258},{"type":50,"tag":499,"props":2999,"children":3000},{"style":512},[3001],{"type":55,"value":1339},{"type":50,"tag":499,"props":3003,"children":3004},{"style":614},[3005],{"type":55,"value":1273},{"type":50,"tag":499,"props":3007,"children":3008},{"style":635},[3009],{"type":55,"value":3010}," answerDetailed",{"type":50,"tag":499,"props":3012,"children":3013},{"style":518},[3014],{"type":55,"value":2927},{"type":50,"tag":499,"props":3016,"children":3017},{"style":512},[3018],{"type":55,"value":252},{"type":50,"tag":499,"props":3020,"children":3021},{"style":518},[3022],{"type":55,"value":2936},{"type":50,"tag":499,"props":3024,"children":3025},{"style":512},[3026],{"type":55,"value":679},{"type":50,"tag":499,"props":3028,"children":3029},{"class":501,"line":954},[3030],{"type":50,"tag":499,"props":3031,"children":3032},{"style":512},[3033],{"type":55,"value":960},{"type":50,"tag":499,"props":3035,"children":3036},{"class":501,"line":963},[3037,3042,3046,3050,3054,3059,3063,3067,3071,3075,3080,3084],{"type":50,"tag":499,"props":3038,"children":3039},{"style":653},[3040],{"type":55,"value":3041},"    select",{"type":50,"tag":499,"props":3043,"children":3044},{"style":512},[3045],{"type":55,"value":661},{"type":50,"tag":499,"props":3047,"children":3048},{"style":518},[3049],{"type":55,"value":2717},{"type":50,"tag":499,"props":3051,"children":3052},{"style":512},[3053],{"type":55,"value":252},{"type":50,"tag":499,"props":3055,"children":3056},{"style":635},[3057],{"type":55,"value":3058},"bucket",{"type":50,"tag":499,"props":3060,"children":3061},{"style":518},[3062],{"type":55,"value":2927},{"type":50,"tag":499,"props":3064,"children":3065},{"style":512},[3066],{"type":55,"value":252},{"type":50,"tag":499,"props":3068,"children":3069},{"style":518},[3070],{"type":55,"value":1370},{"type":50,"tag":499,"props":3072,"children":3073},{"style":512},[3074],{"type":55,"value":252},{"type":50,"tag":499,"props":3076,"children":3077},{"style":518},[3078],{"type":55,"value":3079},"accountId",{"type":50,"tag":499,"props":3081,"children":3082},{"style":512},[3083],{"type":55,"value":1258},{"type":50,"tag":499,"props":3085,"children":3086},{"style":512},[3087],{"type":55,"value":823},{"type":50,"tag":499,"props":3089,"children":3090},{"class":501,"line":971},[3091,3096,3100,3104,3109,3113,3118,3122,3127,3131,3135],{"type":50,"tag":499,"props":3092,"children":3093},{"style":653},[3094],{"type":55,"value":3095},"      weights",{"type":50,"tag":499,"props":3097,"children":3098},{"style":512},[3099],{"type":55,"value":661},{"type":50,"tag":499,"props":3101,"children":3102},{"style":512},[3103],{"type":55,"value":515},{"type":50,"tag":499,"props":3105,"children":3106},{"style":653},[3107],{"type":55,"value":3108}," concise",{"type":50,"tag":499,"props":3110,"children":3111},{"style":512},[3112],{"type":55,"value":661},{"type":50,"tag":499,"props":3114,"children":3115},{"style":2251},[3116],{"type":55,"value":3117}," 50",{"type":50,"tag":499,"props":3119,"children":3120},{"style":512},[3121],{"type":55,"value":1258},{"type":50,"tag":499,"props":3123,"children":3124},{"style":653},[3125],{"type":55,"value":3126}," detailed",{"type":50,"tag":499,"props":3128,"children":3129},{"style":512},[3130],{"type":55,"value":661},{"type":50,"tag":499,"props":3132,"children":3133},{"style":2251},[3134],{"type":55,"value":3117},{"type":50,"tag":499,"props":3136,"children":3137},{"style":512},[3138],{"type":55,"value":2571},{"type":50,"tag":499,"props":3140,"children":3141},{"class":501,"line":1497},[3142,3146,3150],{"type":50,"tag":499,"props":3143,"children":3144},{"style":512},[3145],{"type":55,"value":1601},{"type":50,"tag":499,"props":3147,"children":3148},{"style":518},[3149],{"type":55,"value":725},{"type":50,"tag":499,"props":3151,"children":3152},{"style":512},[3153],{"type":55,"value":679},{"type":50,"tag":499,"props":3155,"children":3156},{"class":501,"line":1544},[3157],{"type":50,"tag":499,"props":3158,"children":3159},{"style":512},[3160],{"type":55,"value":1656},{"type":50,"tag":499,"props":3162,"children":3163},{"class":501,"line":1574},[3164,3168],{"type":50,"tag":499,"props":3165,"children":3166},{"style":518},[3167],{"type":55,"value":725},{"type":50,"tag":499,"props":3169,"children":3170},{"style":512},[3171],{"type":55,"value":551},{"type":50,"tag":58,"props":3173,"children":3174},{},[3175],{"type":55,"value":3176},"Selection strategy:",{"type":50,"tag":81,"props":3178,"children":3179},{},[3180,3191,3202,3213],{"type":50,"tag":85,"props":3181,"children":3182},{},[3183,3189],{"type":50,"tag":179,"props":3184,"children":3186},{"className":3185},[],[3187],{"type":55,"value":3188},"experiment.weighted()",{"type":55,"value":3190}," for run-level traffic splits.",{"type":50,"tag":85,"props":3192,"children":3193},{},[3194,3200],{"type":50,"tag":179,"props":3195,"children":3197},{"className":3196},[],[3198],{"type":55,"value":3199},"experiment.bucket(stableId, { weights })",{"type":55,"value":3201}," when a user, account, or tenant\nshould usually keep the same experience.",{"type":50,"tag":85,"props":3203,"children":3204},{},[3205,3211],{"type":50,"tag":179,"props":3206,"children":3208},{"className":3207},[],[3209],{"type":55,"value":3210},"experiment.custom()",{"type":55,"value":3212}," when assignment comes from a database, flag service, or\nrollout table.",{"type":50,"tag":85,"props":3214,"children":3215},{},[3216,3222],{"type":50,"tag":179,"props":3217,"children":3219},{"className":3218},[],[3220],{"type":55,"value":3221},"experiment.fixed()",{"type":55,"value":3223}," to force one variant during testing or after choosing a\nwinner.",{"type":50,"tag":58,"props":3225,"children":3226},{},[3227],{"type":55,"value":989},{"type":50,"tag":81,"props":3229,"children":3230},{},[3231,3244,3249,3254],{"type":50,"tag":85,"props":3232,"children":3233},{},[3234,3236,3242],{"type":55,"value":3235},"Each variant callback must call at least one ",{"type":50,"tag":179,"props":3237,"children":3239},{"className":3238},[],[3240],{"type":55,"value":3241},"step.*",{"type":55,"value":3243}," tool.",{"type":50,"tag":85,"props":3245,"children":3246},{},[3247],{"type":55,"value":3248},"Keep experiment IDs and variant names stable because they appear in traces.",{"type":50,"tag":85,"props":3250,"children":3251},{},[3252],{"type":55,"value":3253},"The selected variant is memoized for retries and replays.",{"type":50,"tag":85,"props":3255,"children":3256},{},[3257,3259,3264],{"type":55,"value":3258},"Persist ",{"type":50,"tag":179,"props":3260,"children":3262},{"className":3261},[],[3263],{"type":55,"value":366},{"type":55,"value":3265}," and the parent run ID if a later, separate process\nwill score the selected variant.",{"type":50,"tag":58,"props":3267,"children":3268},{},[3269],{"type":55,"value":3270},"When deferred scoring a variant, pass the ref:",{"type":50,"tag":488,"props":3272,"children":3274},{"className":490,"code":3273,"language":492,"meta":493,"style":493},"defer(\"score-answer-feedback\", {\n  function: feedbackScorer,\n  data: { ticketId: event.data.ticketId },\n  experiment: experimentRef,\n});\n",[3275],{"type":50,"tag":179,"props":3276,"children":3277},{"__ignoreMap":493},[3278,3311,3331,3380,3401],{"type":50,"tag":499,"props":3279,"children":3280},{"class":501,"line":502},[3281,3286,3290,3294,3299,3303,3307],{"type":50,"tag":499,"props":3282,"children":3283},{"style":635},[3284],{"type":55,"value":3285},"defer",{"type":50,"tag":499,"props":3287,"children":3288},{"style":518},[3289],{"type":55,"value":642},{"type":50,"tag":499,"props":3291,"children":3292},{"style":512},[3293],{"type":55,"value":546},{"type":50,"tag":499,"props":3295,"children":3296},{"style":539},[3297],{"type":55,"value":3298},"score-answer-feedback",{"type":50,"tag":499,"props":3300,"children":3301},{"style":512},[3302],{"type":55,"value":546},{"type":50,"tag":499,"props":3304,"children":3305},{"style":512},[3306],{"type":55,"value":1258},{"type":50,"tag":499,"props":3308,"children":3309},{"style":512},[3310],{"type":55,"value":823},{"type":50,"tag":499,"props":3312,"children":3313},{"class":501,"line":554},[3314,3319,3323,3327],{"type":50,"tag":499,"props":3315,"children":3316},{"style":653},[3317],{"type":55,"value":3318},"  function",{"type":50,"tag":499,"props":3320,"children":3321},{"style":512},[3322],{"type":55,"value":661},{"type":50,"tag":499,"props":3324,"children":3325},{"style":518},[3326],{"type":55,"value":2518},{"type":50,"tag":499,"props":3328,"children":3329},{"style":512},[3330],{"type":55,"value":679},{"type":50,"tag":499,"props":3332,"children":3333},{"class":501,"line":595},[3334,3338,3342,3346,3350,3354,3358,3362,3366,3370,3375],{"type":50,"tag":499,"props":3335,"children":3336},{"style":653},[3337],{"type":55,"value":814},{"type":50,"tag":499,"props":3339,"children":3340},{"style":512},[3341],{"type":55,"value":661},{"type":50,"tag":499,"props":3343,"children":3344},{"style":512},[3345],{"type":55,"value":515},{"type":50,"tag":499,"props":3347,"children":3348},{"style":653},[3349],{"type":55,"value":1892},{"type":50,"tag":499,"props":3351,"children":3352},{"style":512},[3353],{"type":55,"value":661},{"type":50,"tag":499,"props":3355,"children":3356},{"style":518},[3357],{"type":55,"value":1199},{"type":50,"tag":499,"props":3359,"children":3360},{"style":512},[3361],{"type":55,"value":252},{"type":50,"tag":499,"props":3363,"children":3364},{"style":518},[3365],{"type":55,"value":1370},{"type":50,"tag":499,"props":3367,"children":3368},{"style":512},[3369],{"type":55,"value":252},{"type":50,"tag":499,"props":3371,"children":3372},{"style":518},[3373],{"type":55,"value":3374},"ticketId ",{"type":50,"tag":499,"props":3376,"children":3377},{"style":512},[3378],{"type":55,"value":3379},"},\n",{"type":50,"tag":499,"props":3381,"children":3382},{"class":501,"line":605},[3383,3388,3392,3397],{"type":50,"tag":499,"props":3384,"children":3385},{"style":653},[3386],{"type":55,"value":3387},"  experiment",{"type":50,"tag":499,"props":3389,"children":3390},{"style":512},[3391],{"type":55,"value":661},{"type":50,"tag":499,"props":3393,"children":3394},{"style":518},[3395],{"type":55,"value":3396}," experimentRef",{"type":50,"tag":499,"props":3398,"children":3399},{"style":512},[3400],{"type":55,"value":679},{"type":50,"tag":499,"props":3402,"children":3403},{"class":501,"line":30},[3404,3408,3412],{"type":50,"tag":499,"props":3405,"children":3406},{"style":512},[3407],{"type":55,"value":720},{"type":50,"tag":499,"props":3409,"children":3410},{"style":518},[3411],{"type":55,"value":725},{"type":50,"tag":499,"props":3413,"children":3414},{"style":512},[3415],{"type":55,"value":551},{"type":50,"tag":58,"props":3417,"children":3418},{},[3419],{"type":55,"value":3420},"When scoring from a later run explicitly:",{"type":50,"tag":488,"props":3422,"children":3424},{"className":490,"code":3423,"language":492,"meta":493,"style":493},"await inngest.score.experiment({\n  name: \"clickthrough\",\n  value: 1,\n  experiment: experimentRef,\n  runId: originalRunId,\n});\n",[3425],{"type":50,"tag":179,"props":3426,"children":3427},{"__ignoreMap":493},[3428,3463,3491,3511,3530,3551],{"type":50,"tag":499,"props":3429,"children":3430},{"class":501,"line":502},[3431,3435,3439,3443,3447,3451,3455,3459],{"type":50,"tag":499,"props":3432,"children":3433},{"style":506},[3434],{"type":55,"value":755},{"type":50,"tag":499,"props":3436,"children":3437},{"style":518},[3438],{"type":55,"value":760},{"type":50,"tag":499,"props":3440,"children":3441},{"style":512},[3442],{"type":55,"value":252},{"type":50,"tag":499,"props":3444,"children":3445},{"style":518},[3446],{"type":55,"value":1516},{"type":50,"tag":499,"props":3448,"children":3449},{"style":512},[3450],{"type":55,"value":252},{"type":50,"tag":499,"props":3452,"children":3453},{"style":635},[3454],{"type":55,"value":473},{"type":50,"tag":499,"props":3456,"children":3457},{"style":518},[3458],{"type":55,"value":642},{"type":50,"tag":499,"props":3460,"children":3461},{"style":512},[3462],{"type":55,"value":647},{"type":50,"tag":499,"props":3464,"children":3465},{"class":501,"line":554},[3466,3470,3474,3478,3483,3487],{"type":50,"tag":499,"props":3467,"children":3468},{"style":653},[3469],{"type":55,"value":785},{"type":50,"tag":499,"props":3471,"children":3472},{"style":512},[3473],{"type":55,"value":661},{"type":50,"tag":499,"props":3475,"children":3476},{"style":512},[3477],{"type":55,"value":536},{"type":50,"tag":499,"props":3479,"children":3480},{"style":539},[3481],{"type":55,"value":3482},"clickthrough",{"type":50,"tag":499,"props":3484,"children":3485},{"style":512},[3486],{"type":55,"value":546},{"type":50,"tag":499,"props":3488,"children":3489},{"style":512},[3490],{"type":55,"value":679},{"type":50,"tag":499,"props":3492,"children":3493},{"class":501,"line":595},[3494,3499,3503,3507],{"type":50,"tag":499,"props":3495,"children":3496},{"style":653},[3497],{"type":55,"value":3498},"  value",{"type":50,"tag":499,"props":3500,"children":3501},{"style":512},[3502],{"type":55,"value":661},{"type":50,"tag":499,"props":3504,"children":3505},{"style":2251},[3506],{"type":55,"value":2254},{"type":50,"tag":499,"props":3508,"children":3509},{"style":512},[3510],{"type":55,"value":679},{"type":50,"tag":499,"props":3512,"children":3513},{"class":501,"line":605},[3514,3518,3522,3526],{"type":50,"tag":499,"props":3515,"children":3516},{"style":653},[3517],{"type":55,"value":3387},{"type":50,"tag":499,"props":3519,"children":3520},{"style":512},[3521],{"type":55,"value":661},{"type":50,"tag":499,"props":3523,"children":3524},{"style":518},[3525],{"type":55,"value":3396},{"type":50,"tag":499,"props":3527,"children":3528},{"style":512},[3529],{"type":55,"value":679},{"type":50,"tag":499,"props":3531,"children":3532},{"class":501,"line":30},[3533,3538,3542,3547],{"type":50,"tag":499,"props":3534,"children":3535},{"style":653},[3536],{"type":55,"value":3537},"  runId",{"type":50,"tag":499,"props":3539,"children":3540},{"style":512},[3541],{"type":55,"value":661},{"type":50,"tag":499,"props":3543,"children":3544},{"style":518},[3545],{"type":55,"value":3546}," originalRunId",{"type":50,"tag":499,"props":3548,"children":3549},{"style":512},[3550],{"type":55,"value":679},{"type":50,"tag":499,"props":3552,"children":3553},{"class":501,"line":682},[3554,3558,3562],{"type":50,"tag":499,"props":3555,"children":3556},{"style":512},[3557],{"type":55,"value":720},{"type":50,"tag":499,"props":3559,"children":3560},{"style":518},[3561],{"type":55,"value":725},{"type":50,"tag":499,"props":3563,"children":3564},{"style":512},[3565],{"type":55,"value":551},{"type":50,"tag":69,"props":3567,"children":3569},{"id":3568},"brownfield-migration",[3570],{"type":55,"value":3571},"Brownfield Migration",{"type":50,"tag":58,"props":3573,"children":3574},{},[3575],{"type":55,"value":3576},"When adding Agent Evals to an existing app:",{"type":50,"tag":216,"props":3578,"children":3579},{},[3580,3585,3590,3602,3607,3612,3623],{"type":50,"tag":85,"props":3581,"children":3582},{},[3583],{"type":55,"value":3584},"Search for existing agent\u002Fworkflow outputs and where users act on them.",{"type":50,"tag":85,"props":3586,"children":3587},{},[3588],{"type":55,"value":3589},"Find durable identifiers already in the domain: conversation ID, ticket ID,\naccount ID, import ID, run ID, or recommendation ID.",{"type":50,"tag":85,"props":3591,"children":3592},{},[3593,3595,3600],{"type":55,"value":3594},"Add ",{"type":50,"tag":179,"props":3596,"children":3598},{"className":3597},[],[3599],{"type":55,"value":299},{"type":55,"value":3601}," at event producers before building dashboards around\ncorrelation.",{"type":50,"tag":85,"props":3603,"children":3604},{},[3605],{"type":55,"value":3606},"Add one direct score where the outcome is already known.",{"type":50,"tag":85,"props":3608,"children":3609},{},[3610],{"type":55,"value":3611},"Add a deferred scorer only after the signal event exists or can be emitted\ncleanly.",{"type":50,"tag":85,"props":3613,"children":3614},{},[3615,3616,3621],{"type":55,"value":3594},{"type":50,"tag":179,"props":3617,"children":3619},{"className":3618},[],[3620],{"type":55,"value":184},{"type":55,"value":3622}," only around one isolated decision at a time.",{"type":50,"tag":85,"props":3624,"children":3625},{},[3626],{"type":55,"value":3627},"Keep old prompt\u002Fmodel\u002Ftool behavior stable until scoring proves the new path.",{"type":50,"tag":58,"props":3629,"children":3630},{},[3631,3632,3638,3640,3646],{"type":55,"value":293},{"type":50,"tag":179,"props":3633,"children":3635},{"className":3634},[],[3636],{"type":55,"value":3637},"inngest-brownfield-audit",{"type":55,"value":3639}," first when the repo has many candidate\nworkflows. Use ",{"type":50,"tag":179,"props":3641,"children":3643},{"className":3642},[],[3644],{"type":55,"value":3645},"inngest-agents",{"type":55,"value":3647}," with this skill when the work is an AgentKit or\ndurable agent workflow.",{"type":50,"tag":69,"props":3649,"children":3651},{"id":3650},"anti-patterns",[3652],{"type":55,"value":3653},"Anti-Patterns",{"type":50,"tag":81,"props":3655,"children":3656},{},[3657,3662,3681,3700,3705,3710,3722,3727],{"type":50,"tag":85,"props":3658,"children":3659},{},[3660],{"type":55,"value":3661},"Starting with a prompt experiment before naming the outcome metric.",{"type":50,"tag":85,"props":3663,"children":3664},{},[3665,3667,3673,3674,3680],{"type":55,"value":3666},"Scoring with unstable names, strings, objects, ",{"type":50,"tag":179,"props":3668,"children":3670},{"className":3669},[],[3671],{"type":55,"value":3672},"NaN",{"type":55,"value":324},{"type":50,"tag":179,"props":3675,"children":3677},{"className":3676},[],[3678],{"type":55,"value":3679},"Infinity",{"type":55,"value":252},{"type":50,"tag":85,"props":3682,"children":3683},{},[3684,3686,3691,3693,3698],{"type":55,"value":3685},"Forgetting ",{"type":50,"tag":179,"props":3687,"children":3689},{"className":3688},[],[3690],{"type":55,"value":423},{"type":55,"value":3692}," and then assuming ",{"type":50,"tag":179,"props":3694,"children":3696},{"className":3695},[],[3697],{"type":55,"value":242},{"type":55,"value":3699}," is missing.",{"type":50,"tag":85,"props":3701,"children":3702},{},[3703],{"type":55,"value":3704},"Running scorers in an external queue when the scorer needs durable waits.",{"type":50,"tag":85,"props":3706,"children":3707},{},[3708],{"type":55,"value":3709},"Keeping experiment assignment only in memory.",{"type":50,"tag":85,"props":3711,"children":3712},{},[3713,3715,3721],{"type":55,"value":3714},"Scoring an experiment variant from a later run without the original ",{"type":50,"tag":179,"props":3716,"children":3718},{"className":3717},[],[3719],{"type":55,"value":3720},"runId",{"type":55,"value":252},{"type":50,"tag":85,"props":3723,"children":3724},{},[3725],{"type":55,"value":3726},"Using sessions for low-cardinality labels or sensitive personal data.",{"type":50,"tag":85,"props":3728,"children":3729},{},[3730],{"type":55,"value":3731},"Leaving model\u002Ftool work outside steps, making traces unable to explain the\nscore.",{"type":50,"tag":69,"props":3733,"children":3735},{"id":3734},"verification",[3736],{"type":55,"value":3737},"Verification",{"type":50,"tag":81,"props":3739,"children":3740},{},[3741,3746,3751,3762,3767,3772,3784],{"type":50,"tag":85,"props":3742,"children":3743},{},[3744],{"type":55,"value":3745},"Typecheck the Inngest client, functions, scorer schemas, and serve handler.",{"type":50,"tag":85,"props":3747,"children":3748},{},[3749],{"type":55,"value":3750},"Confirm scorers are registered with the serve endpoint.",{"type":50,"tag":85,"props":3752,"children":3753},{},[3754,3756,3761],{"type":55,"value":3755},"Test the producer emits events with expected ",{"type":50,"tag":179,"props":3757,"children":3759},{"className":3758},[],[3760],{"type":55,"value":299},{"type":55,"value":252},{"type":50,"tag":85,"props":3763,"children":3764},{},[3765],{"type":55,"value":3766},"Test direct scores use stable names and finite number\u002Fboolean values.",{"type":50,"tag":85,"props":3768,"children":3769},{},[3770],{"type":55,"value":3771},"Test deferred scorer timeout behavior.",{"type":50,"tag":85,"props":3773,"children":3774},{},[3775,3777,3782],{"type":55,"value":3776},"For experiments, test that each variant callback contains step work and that\nlater scoring receives ",{"type":50,"tag":179,"props":3778,"children":3780},{"className":3779},[],[3781],{"type":55,"value":366},{"type":55,"value":3783}," plus the original run ID when needed.",{"type":50,"tag":85,"props":3785,"children":3786},{},[3787],{"type":55,"value":3788},"If possible, run the Inngest dev server and inspect traces, sessions, scores,\nand experiment variant selection in the dashboard or through available CLI\u002FAPI\ntooling.",{"type":50,"tag":3790,"props":3791,"children":3792},"style",{},[3793],{"type":55,"value":3794},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":3796,"total":1544},[3797,3805,3819,3833,3846,3860,3875],{"slug":4,"name":4,"fn":5,"description":6,"org":3798,"tags":3799,"stars":26,"repoUrl":27,"updatedAt":28},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3800,3801,3802,3803,3804],{"name":21,"slug":22,"type":15},{"name":18,"slug":19,"type":15},{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"name":24,"slug":25,"type":15},{"slug":3645,"name":3645,"fn":3806,"description":3807,"org":3808,"tags":3809,"stars":26,"repoUrl":27,"updatedAt":3818},"build durable AI agent workflows","Use when building durable AI agents or agentic workflows with Inngest and AgentKit, including model calls, tool calls, multi-agent networks, human approval, realtime progress, provider rate limits, crash-safe execution, and Agent Evals handoff. Covers AgentKit, `step.ai`, `step.run`, `step.waitForEvent`, native realtime, and when to use lower-level Inngest primitives instead of an in-memory agent loop. Use `inngest-agent-evals` with this skill when the user wants scoring, sessions, experiments, deferred scorers, or outcome-based evaluation for the agent.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3810,3811,3814,3815],{"name":21,"slug":22,"type":15},{"name":3812,"slug":3813,"type":15},"Automation","automation",{"name":9,"slug":8,"type":15},{"name":3816,"slug":3817,"type":15},"LLM","llm","2026-07-12T07:36:45.984181",{"slug":3820,"name":3820,"fn":3821,"description":3822,"org":3823,"tags":3824,"stars":26,"repoUrl":27,"updatedAt":3832},"inngest-api","interact with Inngest REST API","Use when the user explicitly asks for the Inngest REST API v2, raw HTTP, OpenAPI, API docs, API authentication, or an endpoint that the Inngest CLI does not expose. Covers api-docs.inngest.com, llms.txt, the OpenAPI v2 spec, Bearer authentication with API keys or signing keys, production and local base URLs, raw curl\u002Ffetch requests, request-shape discovery, pagination, secret redaction, and when to prefer the `inngest-api-cli` skill instead.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3825,3828,3831],{"name":3826,"slug":3827,"type":15},"API Development","api-development",{"name":3829,"slug":3830,"type":15},"REST API","rest-api",{"name":24,"slug":25,"type":15},"2026-07-12T07:36:39.364409",{"slug":3834,"name":3834,"fn":3835,"description":3836,"org":3837,"tags":3838,"stars":26,"repoUrl":27,"updatedAt":3845},"inngest-api-cli","operate Inngest API resources via CLI","Use when operating Inngest API resources from the terminal with `npx inngest-cli@latest api`: Cloud\u002Flocal run debugging, event-run lookup, function traces, function invocation, app syncs, webhooks, environments, keys, account checks, and Insights queries. Provides prescriptive command routing for agents: which CLI command to run for a run ID, event ID, app ID, function ID, Cloud environment, API key, missing ID, or potentially mutating operation. Use `inngest-cli` for dev server setup\u002Fgeneral CLI workflows and `inngest-api` only when raw REST API v2 docs or OpenAPI fallback are needed.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3839,3840,3841,3844],{"name":3826,"slug":3827,"type":15},{"name":3812,"slug":3813,"type":15},{"name":3842,"slug":3843,"type":15},"CLI","cli",{"name":9,"slug":8,"type":15},"2026-07-12T07:36:47.58183",{"slug":3637,"name":3637,"fn":3847,"description":3848,"org":3849,"tags":3850,"stars":26,"repoUrl":27,"updatedAt":3859},"audit codebases for Inngest integration","Use when analyzing an existing TypeScript or JavaScript codebase to decide where and how to introduce Inngest. Covers repository discovery, framework and package detection, finding durability gaps in HTTP handlers, webhooks, cron jobs, queues, long-running jobs, AI agents, Agent Evals, polling loops, eval loops, and side-effect-heavy code, then producing and implementing an incremental integration plan.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3851,3852,3855,3858],{"name":3812,"slug":3813,"type":15},{"name":3853,"slug":3854,"type":15},"Code Analysis","code-analysis",{"name":3856,"slug":3857,"type":15},"Engineering","engineering",{"name":9,"slug":8,"type":15},"2026-07-12T07:36:55.811247",{"slug":3861,"name":3861,"fn":3862,"description":3863,"org":3864,"tags":3865,"stars":26,"repoUrl":27,"updatedAt":3874},"inngest-cli","configure Inngest CLI and dev server","Use when installing or running the Inngest CLI and Dev Server for local development, local testing, serve endpoint debugging, Docker or Docker Compose setup, MCP configuration, self-hosted `inngest start`, or deployment workflow checks. Covers `inngest dev`, `inngest start`, auto-discovery, config files, environment variables, `@inngest\u002Ftest`, local event sending, platform gotchas, and production\u002Fself-hosted server flags.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3866,3867,3870,3871],{"name":3842,"slug":3843,"type":15},{"name":3868,"slug":3869,"type":15},"Docker","docker",{"name":9,"slug":8,"type":15},{"name":3872,"slug":3873,"type":15},"Local Development","local-development","2026-07-12T07:36:40.694652",{"slug":3876,"name":3876,"fn":3877,"description":3878,"org":3879,"tags":3880,"stars":26,"repoUrl":27,"updatedAt":3887},"inngest-durable-functions","build durable and retry-safe functions","Use when building functions that must survive process crashes, retry automatically on failure, run on a schedule, react to events, or maintain state across infrastructure failures — e.g., webhook handlers that drop events, flaky cron jobs, background jobs that fail mid-execution, or workflows that need to resume where they left off. Covers Inngest function configuration, triggers (events, cron, invoke), step execution and memoization, idempotency, cancellation, error handling, retries, logging, and observability.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3881,3882,3885,3886],{"name":3812,"slug":3813,"type":15},{"name":3883,"slug":3884,"type":15},"Backend","backend",{"name":9,"slug":8,"type":15},{"name":24,"slug":25,"type":15},"2026-07-12T07:36:57.141023",{"items":3889,"total":1544},[3890,3898,3905,3911,3918,3925,3932,3939,3951,3964,3980,3995],{"slug":4,"name":4,"fn":5,"description":6,"org":3891,"tags":3892,"stars":26,"repoUrl":27,"updatedAt":28},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3893,3894,3895,3896,3897],{"name":21,"slug":22,"type":15},{"name":18,"slug":19,"type":15},{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"name":24,"slug":25,"type":15},{"slug":3645,"name":3645,"fn":3806,"description":3807,"org":3899,"tags":3900,"stars":26,"repoUrl":27,"updatedAt":3818},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3901,3902,3903,3904],{"name":21,"slug":22,"type":15},{"name":3812,"slug":3813,"type":15},{"name":9,"slug":8,"type":15},{"name":3816,"slug":3817,"type":15},{"slug":3820,"name":3820,"fn":3821,"description":3822,"org":3906,"tags":3907,"stars":26,"repoUrl":27,"updatedAt":3832},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3908,3909,3910],{"name":3826,"slug":3827,"type":15},{"name":3829,"slug":3830,"type":15},{"name":24,"slug":25,"type":15},{"slug":3834,"name":3834,"fn":3835,"description":3836,"org":3912,"tags":3913,"stars":26,"repoUrl":27,"updatedAt":3845},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3914,3915,3916,3917],{"name":3826,"slug":3827,"type":15},{"name":3812,"slug":3813,"type":15},{"name":3842,"slug":3843,"type":15},{"name":9,"slug":8,"type":15},{"slug":3637,"name":3637,"fn":3847,"description":3848,"org":3919,"tags":3920,"stars":26,"repoUrl":27,"updatedAt":3859},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3921,3922,3923,3924],{"name":3812,"slug":3813,"type":15},{"name":3853,"slug":3854,"type":15},{"name":3856,"slug":3857,"type":15},{"name":9,"slug":8,"type":15},{"slug":3861,"name":3861,"fn":3862,"description":3863,"org":3926,"tags":3927,"stars":26,"repoUrl":27,"updatedAt":3874},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3928,3929,3930,3931],{"name":3842,"slug":3843,"type":15},{"name":3868,"slug":3869,"type":15},{"name":9,"slug":8,"type":15},{"name":3872,"slug":3873,"type":15},{"slug":3876,"name":3876,"fn":3877,"description":3878,"org":3933,"tags":3934,"stars":26,"repoUrl":27,"updatedAt":3887},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3935,3936,3937,3938],{"name":3812,"slug":3813,"type":15},{"name":3883,"slug":3884,"type":15},{"name":9,"slug":8,"type":15},{"name":24,"slug":25,"type":15},{"slug":3940,"name":3940,"fn":3941,"description":3942,"org":3943,"tags":3944,"stars":26,"repoUrl":27,"updatedAt":3950},"inngest-events","design event-driven workflows","Use when designing event-driven workflows, decoupling services, implementing fan-out patterns (one trigger, many downstream handlers), implementing idempotent event handling with IDs (24-hour dedupe window), or handling at-least-once delivery from external sources like Stripe webhooks. Covers Inngest event schema, payload format, naming conventions, IDs for idempotency, the ts param, fan-out patterns, and system events like inngest\u002Ffunction.failed.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3945,3948,3949],{"name":3946,"slug":3947,"type":15},"Data Pipeline","data-pipeline",{"name":9,"slug":8,"type":15},{"name":24,"slug":25,"type":15},"2026-07-12T07:36:44.685364",{"slug":3952,"name":3952,"fn":3953,"description":3954,"org":3955,"tags":3956,"stars":26,"repoUrl":27,"updatedAt":3963},"inngest-flow-control","manage API rate limits and load","Use when handling external API rate limits (e.g., OpenAI 429s, HubSpot or Stripe rate limits), preventing duplicate work from rapid event bursts (debouncing user actions), spreading load over time, ensuring per-tenant fairness, processing events in batches, limiting concurrent runs of the same operation, or assigning priority to important runs. Covers Inngest flow control: concurrency limits with keys, throttling, rate limiting, debounce, priority, singleton, and event batching.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3957,3958,3959,3960],{"name":3826,"slug":3827,"type":15},{"name":3812,"slug":3813,"type":15},{"name":9,"slug":8,"type":15},{"name":3961,"slug":3962,"type":15},"Performance","performance","2026-07-12T07:36:52.987451",{"slug":3965,"name":3965,"fn":3966,"description":3967,"org":3968,"tags":3969,"stars":26,"repoUrl":27,"updatedAt":3979},"inngest-middleware","add middleware to Inngest durable functions","Use when adding cross-cutting concerns to durable functions — structured logging or tracing across all functions, error tracking with Sentry, payload encryption for sensitive data, dependency injection of clients (DB, Stripe, etc.) into function handlers, custom telemetry, or behavior that should apply uniformly across many functions. Covers Inngest middleware lifecycle, creating custom middleware, dependencyInjectionMiddleware, @inngest\u002Fmiddleware-encryption, @inngest\u002Fmiddleware-sentry, and custom middleware patterns.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3970,3971,3972,3975,3976],{"name":3856,"slug":3857,"type":15},{"name":9,"slug":8,"type":15},{"name":3973,"slug":3974,"type":15},"Middleware","middleware",{"name":13,"slug":14,"type":15},{"name":3977,"slug":3978,"type":15},"Sentry","sentry","2026-07-12T07:36:50.127999",{"slug":3981,"name":3981,"fn":3982,"description":3983,"org":3984,"tags":3985,"stars":26,"repoUrl":27,"updatedAt":3994},"inngest-realtime","stream durable workflow updates to UI","Use when streaming durable workflow updates to a UI in real time — live order status pages that animate as steps complete, AI agent token streaming from a function to the browser, log tailing for long-running jobs, or human-in-the-loop approval flows that publish a prompt and wait for a user reply. Covers Inngest v4 native realtime: defining typed channels, publishing from inside step.run, minting subscription tokens via server actions, and consuming the stream from React\u002FNext.js client components.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3986,3987,3990,3991],{"name":3812,"slug":3813,"type":15},{"name":3988,"slug":3989,"type":15},"Frontend","frontend",{"name":9,"slug":8,"type":15},{"name":3992,"slug":3993,"type":15},"Real-time","real-time","2026-07-12T07:36:48.895092",{"slug":3996,"name":3996,"fn":3997,"description":3998,"org":3999,"tags":4000,"stars":26,"repoUrl":27,"updatedAt":4006},"inngest-setup","build durable TypeScript workflows","Use when adding durable execution to a TypeScript project — building retry-safe webhook handlers, background jobs that survive crashes, scheduled tasks, or long-running workflows that outlive a single request. Covers Inngest SDK installation, client config, environment variables, serve endpoints (Next.js, Express, Hono, Fastify), connect-as-worker mode, and the local dev server.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4001,4002,4003,4004],{"name":3812,"slug":3813,"type":15},{"name":3883,"slug":3884,"type":15},{"name":9,"slug":8,"type":15},{"name":4005,"slug":492,"type":15},"TypeScript","2026-07-12T07:36:42.004122"]