Agent Native

inngest-agent-evals

Builds production evaluation workflows for AI agents on Inngest using direct and deferred scoring, sessions for grouping related runs, step experiments for…

by InngestOfficial publisherNot reviewed

Identity proven by GitHub's verified organisation badge (inngest)

Agents
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, claude.ai and API
License
Apache-2.0 (permissive)
Pin
082798apinned Oct 9, 2026
Context cost
about 2,600 tokenswhen the skill loads
GitHub stars
28on inngest/inngest-skills
Scripts
None found

What it does

“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.”
The author's description, from SKILL.md

Generated summary from the skill's own text

Builds production evaluation workflows for AI agents on Inngest using direct and deferred scoring, sessions for grouping related runs, step experiments for variant comparisons, and durable steps to preserve traceability. Covers scoring APIs, deferred scorers that wait for user feedback or async signals, experiment assignment strategies, and brownfield migration patterns for existing applications.

When to use it

  • Evaluating agent or workflow outcomes with scores tied to quality signals like user feedback or task success
  • Comparing prompts, models, tools, or workflow variants against real traffic with statistical bucketing
  • Grouping related runs by conversation ID, ticket ID, or agent task for human inspection and correlation
  • Adding deferred scoring when evaluation signals arrive after the workflow completes

When not to

  • Scoring with unstable metric names or non-numeric values like objects or strings
  • Running heavy async evaluation in external systems instead of durable Inngest functions
  • Storing sensitive personal data in session identifiers

Install

These commands install from the publisher's repository and need no account.

skills CLI

npx skills add inngest/inngest-skills --skill inngest-agent-evals

Installs from the repository's default branch, which may have changed since the commit we checked.

GitHub CLI 2.90 or later

gh skill install inngest/inngest-skills inngest-agent-evals@082798a627bbe9c3ed3a6638a9f56116a035f122

Installs the commit we checked (082798a).

Copy by hand

Download the folder at 082798a and put it in .claude/skills/inngest-agent-evals for Claude Code and in .agents/skills/inngest-agent-evals for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.

Skill folder on GitHub at 082798a

Copy for your agent

A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.

Prompt

Install the agent skill "inngest-agent-evals" by Inngest.

Source, pinned to commit 082798a627bbe9c3ed3a6638a9f56116a035f122:
https://github.com/inngest/inngest-skills/tree/082798a627bbe9c3ed3a6638a9f56116a035f122/skills/inngest-agent-evals

1. Download that folder at exactly this commit. Do not use the default branch.
2. Copy every file unchanged, keeping the folder structure, into .claude/skills/inngest-agent-evals/ for Claude Code and .agents/skills/inngest-agent-evals/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist.
3. Do not edit the files, and do not run any script in the folder unless I ask you to.
4. When you are done, list the files you copied and where you put them.

Listing and checks: https://www.agentnative.dev/skills/inngest/inngest-agent-evals-inngest-skills

SKILL.md at the pin

---
name: inngest-agent-evals
description: "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."
---

# Inngest Agent Evals

Use this skill when the user wants to evaluate AI agents or AI workflows in
production, add scoring, compare prompts/models/tools, group related runs, or
debug why an agent outcome was good or bad.

Agent Evals is not a separate package. It is the production evaluation workflow
built from Inngest functions, durable steps, scores, deferred scorers, sessions,
traces, experiments, and Insights.

## Canonical References

Check the public docs first when exact API details matter:

- Agent Evals overview: https://www.inngest.com/docs/learn/agent-evals
- Scoring guide: https://www.inngest.com/docs/features/inngest-functions/steps-workflows/scoring
- Deferred scoring guide: https://www.inngest.com/docs/features/inngest-functions/steps-workflows/deferred-scoring
- Step experiments guide: https://www.inngest.com/docs/features/inngest-functions/steps-workflows/step-experiments
- Sessions: https://www.inngest.com/docs/features/events-triggers/sessions
- Traces: https://www.inngest.com/docs/platform/monitor/traces
- Insights: https://www.inngest.com/docs/platform/monitor/insights
- Scoring reference: https://www.inngest.com/docs/reference/typescript/v4/functions/scoring
- `group.experiment()` reference: https://www.inngest.com/docs/reference/typescript/v4/functions/group-experiment
- Launch context: https://www.inngest.com/blog/introducing-agent-evals

## Decision Flow

Start from the outcome, not the mechanism:

1. Identify the product or quality signal: helpful click, ticket resolution,
   conversion, guardrail pass, retrieval quality, model confidence, latency,
   cost, human review, or LLM-as-judge result.
2. Decide when the signal appears:
   - During the run: use direct scoring with `step.score()` or
     `inngest.score()`.
   - After the run: use deferred scoring with `createScorer()` and `defer()`,
     or explicit `inngest.score({ runId })`.
3. Decide how humans will inspect related work:
   - Use `meta.sessions` for repeated high-cardinality identifiers such as
     `conversation_id`, `ticket_id`, `agent_run_id`, or `import_id`.
   - Use Insights for ad hoc historical analysis, low-cardinality filters, SQL
     aggregates, and broad investigation.
4. Decide whether to compare variants:
   - Use `group.experiment()` for prompt, model, provider, tool, workflow, or
     rollout comparisons.
   - Pass `experimentRef` to deferred or later scores when the score should be
     credited to the selected variant.
5. Preserve traceability:
   - Keep model calls, tool calls, waits, database writes, and scoring work in
     durable steps so traces explain why the score happened.

## Setup Requirements

- Use TypeScript SDK v4 and install the latest SDK: `npm install inngest@latest`.
- Scoring and deferred scoring are beta APIs; verify current imports against
  the docs before shipping user-facing examples.
- `step.score()` requires `scoreMiddleware()` from `inngest/experimental` on
  the Inngest client.
- `createScorer()` is imported from `inngest/experimental` and the scorer must
  be registered in the serve handler with other functions.
- Sessions sent through the TypeScript SDK require v4.7.0 or later.
- Step experiments require v4.8.0 or later for `group.experiment()` and the
  `experiment` helper from `inngest`.

Client shape:

```typescript
import { Inngest } from "inngest";
import { scoreMiddleware } from "inngest/experimental";

export const inngest = new Inngest({
  id: "support-agent",
  middleware: [scoreMiddleware()],
});
```

## Sessions

Add sessions when events belong to a user flow, conversation, ticket, import,
or agent task that someone will inspect repeatedly.

```typescript
await inngest.send({
  name: "support/ticket.created",
  data: {
    ticketId: "tk_123",
    message: "I can't sign in.",
  },
  meta: {
    sessions: {
      ticket_id: "tk_123",
    },
  },
});
```

Rules:

- Use stable, non-secret, high-cardinality IDs.
- Keep the key generic, such as `conversation_id`; put the actual ID in the
  value.
- Pass sessions explicitly through `step.invoke()` and `step.sendEvent()` when
  downstream runs should join the same session.
- Do not use sessions for labels like `environment: prod`; use Insights for
  that style of filtering.

## Direct Scoring

Use direct scoring when the score is known during the function run.

Good direct scores:

- guardrail pass/fail
- JSON validity
- retrieval confidence
- tool success
- model confidence
- inline LLM-as-judge result

```typescript
export const answerTicket = inngest.createFunction(
  {
    id: "answer-ticket",
    triggers: [{ event: "support/ticket.created" }],
  },
  async ({ event, step }) => {
    const answer = await step.run("generate-answer", () =>
      generateAnswer(event.data.ticketId)
    );

    const passed = await step.run("check-answer", () => validateAnswer(answer));

    await step.score("score-answer-quality", {
      name: "answer-quality",
      value: passed,
    });

    return { answer, passed };
  }
);
```

Use stable score names. Changing a score name creates a separate metric.
Score values must be finite numbers or booleans.

## Deferred Scoring

Use deferred scoring when the useful signal arrives after the parent workflow
finishes, such as user feedback, conversion, ticket reopen, retention, or a
slow LLM-as-judge run.

```typescript
import { createScorer } from "inngest/experimental";
import { z } from "zod";

export const feedbackScorer = createScorer(
  inngest,
  {
    id: "support-feedback-scorer",
    schema: z.object({ ticketId: z.string() }),
  },
  async ({ event, step }) => {
    const feedback = await step.waitForEvent("wait-for-feedback", {
      event: "support/feedback.received",
      timeout: "7d",
      if: `async.data.ticketId == '${event.data.ticketId}'`,
    });

    return {
      name: "user-feedback",
      value: feedback?.data.helpful ? 1 : 0,
    };
  }
);
```

Trigger it from the producing function:

```typescript
async ({ event, step, defer }) => {
  const answer = await step.run("generate-answer", () =>
    generateAnswer(event.data.ticketId)
  );

  defer("score-feedback", {
    function: feedbackScorer,
    data: { ticketId: event.data.ticketId },
  });

  return { answer };
}
```

Guardrails:

- Register scorers with `serve({ functions: [...] })`.
- `defer()` is fire-and-forget; do not `await` it.
- The parent run is attributed automatically for deferred scorers.
- Return a default score or `null` when a signal times out, based on the
  product semantics.

## Experiments

Use `group.experiment()` when comparing prompts, models, providers, tools,
workflow rewrites, or operational settings against real traffic.

```typescript
import { experiment } from "inngest";

const { result, variant, experimentRef } = await group.experiment(
  "answer-style",
  {
    variants: {
      concise: () => step.run("answer-concise", () => answerConcise(event.data)),
      detailed: () =>
        step.run("answer-detailed", () => answerDetailed(event.data)),
    },
    select: experiment.bucket(event.data.accountId, {
      weights: { concise: 50, detailed: 50 },
    }),
  }
);
```

Selection strategy:

- `experiment.weighted()` for run-level traffic splits.
- `experiment.bucket(stableId, { weights })` when a user, account, or tenant
  should usually keep the same experience.
- `experiment.custom()` when assignment comes from a database, flag service, or
  rollout table.
- `experiment.fixed()` to force one variant during testing or after choosing a
  winner.

Rules:

- Each variant callback must call at least one `step.*` tool.
- Keep experiment IDs and variant names stable because they appear in traces.
- The selected variant is memoized for retries and replays.
- Persist `experimentRef` and the parent run ID if a later, separate process
  will score the selected variant.

When deferred scoring a variant, pass the ref:

```typescript
defer("score-answer-feedback", {
  function: feedbackScorer,
  data: { ticketId: event.data.ticketId },
  experiment: experimentRef,
});
```

When scoring from a later run explicitly:

```typescript
await inngest.score.experiment({
  name: "clickthrough",
  value: 1,
  experiment: experimentRef,
  runId: originalRunId,
});
```

## Brownfield Migration

When adding Agent Evals to an existing app:

1. Search for existing agent/workflow outputs and where users act on them.
2. Find durable identifiers already in the domain: conversation ID, ticket ID,
   account ID, import ID, run ID, or recommendation ID.
3. Add `meta.sessions` at event producers before building dashboards around
   correlation.
4. Add one direct score where the outcome is already known.
5. Add a deferred scorer only after the signal event exists or can be emitted
   cleanly.
6. Add `group.experiment()` only around one isolated decision at a time.
7. Keep old prompt/model/tool behavior stable until scoring proves the new path.

Use `inngest-brownfield-audit` first when the repo has many candidate
workflows. Use `inngest-agents` with this skill when the work is an AgentKit or
durable agent workflow.

## Anti-Patterns

- Starting with a prompt experiment before naming the outcome metric.
- Scoring with unstable names, strings, objects, `NaN`, or `Infinity`.
- Forgetting `scoreMiddleware()` and then assuming `step.score()` is missing.
- Running scorers in an external queue when the scorer needs durable waits.
- Keeping experiment assignment only in memory.
- Scoring an experiment variant from a later run without the original `runId`.
- Using sessions for low-cardinality labels or sensitive personal data.
- Leaving model/tool work outside steps, making traces unable to explain the
  score.

## Verification

- Typecheck the Inngest client, functions, scorer schemas, and serve handler.
- Confirm scorers are registered with the serve endpoint.
- Test the producer emits events with expected `meta.sessions`.
- Test direct scores use stable names and finite number/boolean values.
- Test deferred scorer timeout behavior.
- For experiments, test that each variant callback contains step work and that
  later scoring receives `experimentRef` plus the original run ID when needed.
- If possible, run the Inngest dev server and inspect traces, sessions, scores,
  and experiment variant selection in the dashboard or through available CLI/API
  tooling.

From inngest/inngest-skills at 082798a, shown as plain text under its license: Apache-2.0 (permissive). The license text is in LICENSE.

View SKILL.md on GitHub at 082798a

Files

1 file, 11 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.

Skill folder on GitHub at 082798a

Also in

The same SKILL.md content appears in these places too. We list it once and credit the oldest public source.

All 18 skills from Inngest

More from Inngest

  • inngest-agents

    Build durable AI agents and multi-step agentic workflows using Inngest and AgentKit.

    Claude Code, Codex, Cursor +4 · about 2.1K tokens · pinned 6 days ago

  • inngest-api-cli

    This skill routes the agent to use the Inngest CLI `inngest api` command for operational tasks like debugging runs, querying events, syncing apps, invoking…

    Claude Code, Codex, Cursor +4 · about 1.9K tokens · pinned 6 days ago

  • inngest-api

    This skill enables agents to interact with the Inngest REST API v2 for Cloud operations, raw HTTP requests, and API reference lookups.

    Claude Code, Codex, Cursor +4 · about 1.1K tokens · pinned 6 days ago

  • inngest-brownfield-audit

    This skill audits existing TypeScript or JavaScript codebases to identify where Inngest can improve reliability and durability.

    Claude Code, Codex, Cursor +4 · about 2.5K tokens · pinned 6 days ago

  • inngest-cli

    This skill enables installation and operation of the Inngest CLI for local development and testing with the Dev Server, which provides a browser UI at…

    Claude Code, Codex, Cursor +4 · about 3.4K tokens · pinned 6 days ago

  • inngest-cloud

    This skill connects an agent to Inngest Cloud through OAuth to inspect and manage deployed applications, functions, and event workflows.

    Claude Code, Codex, Cursor +4 · about 1.1K tokens · pinned 6 days ago

All AI and agents skills
  • transformers-js

    Transformers.js runs pre-trained machine learning models directly in JavaScript and TypeScript across browsers and server runtimes (Node.js, Bun, Deno)…

    by Hugging FaceOfficial publisher

    Claude Code, Codex, Cursor +4 · about 6K tokens · pinned 6 days ago

  • mcp-builder

    This skill guides agents through building Model Context Protocol (MCP) servers that connect LLMs to external services via well-designed tools.

    by SnykOfficial publisher

    Contains scripts

    Claude Code, Codex, Cursor +3 · about 2.2K tokens · pinned 6 days ago

  • iris-development

    This skill integrates with Redis Agent Memory, a managed service on Redis Cloud that provides persistent memory for AI agents.

    by RedisOfficial publisher

    Claude Code, Codex, Cursor +4 · about 970 tokens · pinned 6 days ago

  • create-call

    This skill creates one-off outbound phone calls, web calls, and batch calls via the Vapi API.

    by VapiOfficial publisher

    Claude Code, Codex, Cursor +4 · about 1.5K tokens · pinned 6 days ago

  • create-call

    This skill enables agents to create outbound phone calls, web calls, and batch calls via the Vapi API.

    by VapiOfficial publisher

    Claude Code, Codex, Cursor +4 · about 1.5K tokens · pinned 6 days ago

  • vapi-bootstrap-framework

    This skill scaffolds a complete Vapi voice-agent project from a rough draft specification, generating a Bun and TypeScript framework with scenario registry…

    by VapiOfficial publisher

    Claude Code, Codex, Cursor +4 · about 4.5K tokens · pinned 6 days ago

Open roles at Inngest

No open roles at Inngest on the Agent Native jobs board right now.

Browse the jobs board

The skills listed here are third-party software, collected from public GitHub repositories as a catalog of recent skills and provided as is. Agent Native does not write or control them and is not responsible for any harm, loss or damage caused by installing or using them. Labels and checks describe what we saw at one commit and are not a guarantee. Read a skill's files before you run it. Terms of use