Logo di Inngest Agent Evals

Inngest Agent Evals

Organizzazione
inngest
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.

Panoramica

Pubblicato dainngest
Repositoryinngest-skills
Nome della skillinngest-agent-evals
Stelle
29
Fork
5
File inclusi
Solo istruzioni
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da inngest su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Inngest Agent Evals in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/inngest/inngest-skills/tree/main/skills/inngest-agent-evals
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/inngest/inngest-skills.git /tmp/inngest-skills
mkdir -p .claude/skills
cp -r /tmp/inngest-skills/skills/inngest-agent-evals .claude/skills/inngest-agent-evals
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Inngest Agent Evals in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Inngest Agent Evals non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Inngest Agent Evals non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

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:

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.

Domande frequenti

Cosa fa la skill IA 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.

Perché usare Inngest Agent Evals su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Inngest Agent Evals è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Inngest Agent Evals in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/inngest/inngest-skills/tree/main/skills/inngest-agent-evals. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Inngest Agent Evals?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Inngest Agent Evals?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Inngest Agent Evals: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Inngest Agent Evals è gratuita?

È pubblicata su GitHub da inngest. Consulta il repository per i termini di licenza. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇