agentleFS
iblaiiblai/vibe/skills/agents/iblai-vibe-agent-evals/SKILL.md

iblai-vibe-agent-evals

Skill15 starsChanged 2 months agoMITView on GitHub

Add the agent Evals tab (run the agent against benchmarks, score responses with LLM-as-Judge reviews or manual scores, export CSV) to your Next.js app

  • Reads credentials
  • Installs packages

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Add the agent Evals tab -- run your agent against a benchmark (a set of test questions) and score every response, so you can catch weak …

    line 12
  2. Distinctive:

    Check status / Export CSV / Delete), a New Evaluation dialog, an embedded Manage benchmarks dialog (create benchmarks, add Q&A pairs …

    line 17
  3. Very specific:

    Ask the user for a real mentorId (agent UUID).

    line 41
  4. Very specific:

    Before proceeding, check for an iblai.env in the project root.

    line 45
  5. Very specific:

    Run /iblai-vibe-ops-test before telling the user the work is ready:

    line 214
  6. Distinctive:

    Start dev server and touch test:

    line 218
  7. Very specific:

    Redux store: Must include mentorReducer and mentorMiddleware -- the evaluations API slice (datasets / runs / judges / scores) ships inside …

    line 226

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/iblai-vibe-agent-evals

Add the agent Evals tab -- run your agent against a benchmark (a set of test questions) and score every response, so you can catch weak spots and track improvements as you refine the agent. The tab bundles several surfaces into one component: a benchmark picker, an evaluations table with status badges and a per-row actions menu (View results / New review / Check status / Export CSV / Delete), a New Evaluation dialog, an embedded Manage benchmarks dialog (create benchmarks, add Q&A pairs manually or via CSV upload), a results modal showing every trace with its scores and LLM-as-Judge reviews, and an Evaluate (new review) modal with an LLM provider/model picker. This is one tab in the wider agent-settings family (access, api, datasets, disclaimers, embed, evals, history, llm, memory, prompts, safety, settings, tasks, tools). Each tab is a separate skill. All tabs share the same AgentSettingsProvider wrapper -- set it up once and mount as many tabs as you need.

Image: Evals tab with benchmark picker and evaluations table Image: Manage benchmarks dialog (search, New Benchmark) Image: Results modal (traces, scores, reviews) Image: Evaluate modal (criteria, score name, concurrency, LLM)

Common setup (brand, conventions, env files, verification): see docs/skill-setup.md.

Prerequisites

  • Auth must be set up first (/iblai-vibe-auth)
  • MCP server + skills configured (@iblai/mcp in .mcp.json)
  • AgentSettingsProvider must wrap the route (see /iblai-vibe-agent-setting Step 2 if not already set up)
  • Ask the user for a real mentorId (agent UUID). Do NOT invent one.

Step 1: Check Environment

Before proceeding, check for an iblai.env in the project root. Look for PLATFORM, DOMAIN, and TOKEN variables. If the file does not exist or is missing these variables, tell the user: "You need an iblai.env with your platform configuration. Download the template and fill in your values: curl -o iblai.env https://raw.githubusercontent.com/iblai/vibe/refs/heads/main/iblai.env"

Step 2: Mount AgentEvaluationTab

AgentEvaluationTab has one required prop: getLLMProviderDetails. This maps a provider name to display info (logo URL, display name) for the LLM picker inside the Evaluate (new review) modal. The host app provides this because logos and display names are host-specific -- same contract as the LLM tab (/iblai-vibe-agent-llm); if that tab is already mounted, reuse the same function.

// app/(app)/agents/[mentorId]/evals/page.tsx
"use client";

import {
  AgentEvaluationTab,
  type LLMProviderDetails,
} from "@iblai/iblai-js/web-containers/next";

function getLLMProviderDetails(
  providerName: string,
  llmName?: string,
): LLMProviderDetails {
  const providers: Record<string, LLMProviderDetails> = {
    openai: { name: "OpenAI", logo: "/logos/openai.svg" },
    anthropic: { name: "Anthropic", logo: "/logos/anthropic.svg" },
    google: { name: "Google", logo: "/logos/google.svg" },
  };
  return (
    providers[providerName] ?? {
      name: providerName,
      logo: "/logos/default.svg",
    }
  );
}

export default function AgentEvalsPage() {
  return (
    <div className="flex h-full flex-col bg-white">
      <AgentEvaluationTab getLLMProviderDetails={getLLMProviderDetails} />
    </div>
  );
}

AgentEvaluationTab reads tenantKey, mentorId, and username from AgentSettingsProvider (via useAgentSettings()) and handles all of its own data fetching and mutations (benchmarks, runs, reviews, scores, export, delete).

With custom pagination

The evaluations table paginates (10 per page). Without a PaginationComponent the built-in web-containers AdvancedPagination is used. Inject your own to match the host app's pagination UI:

<AgentEvaluationTab
  getLLMProviderDetails={getLLMProviderDetails}
  PaginationComponent={({ currentPage, totalPages, onPageChange, disabled }) => (
    <MyPagination
      page={currentPage}
      total={totalPages}
      onChange={onPageChange}
      disabled={disabled}
    />
  )}
/>;

Step 3: Customize Labels (Optional)

AgentEvaluationTab renders with the default agent-facing copy (AGENT_EVALUATION_TAB_LABELS). Override any string via the labels prop. Pass a full EvaluationTabLabels bundle (for a full re-skin) or a partial object (for one-off edits).

import {
  AgentEvaluationTab,
  type EvaluationTabLabels,
  AGENT_EVALUATION_TAB_LABELS,
} from "@iblai/iblai-js/web-containers/next";

<AgentEvaluationTab
  getLLMProviderDetails={getLLMProviderDetails}
  labels={{
    header: {
      title: "Benchmarks",
      description: "Score this agent against your test sets.",
    },
    actions: { newExperiment: "Run benchmark" },
  }}
/>;

The label bundle is grouped by surface: header, benchmarkPicker, actions, checkStatusToast, table, startExperimentModal, manageBenchmarksModal, detailModal, evaluateModal, and deleteModal. Override only the keys you need.

Step 4: Use MCP Tools for Customization

get_component_info("AgentEvaluationTab")
get_component_info("AgentSettingsProvider")

Tab surfaces

AgentEvaluationTab is a single mounted component, but it renders several distinct surfaces. The corresponding web-containers source (under web-containers/.../edit-mentor-modal/tabs/evaluation-tab) is listed for reference -- these pieces are internal to AgentEvaluationTab and are not mounted separately.

SurfaceScreenshotSource componentWhat it shows
Evaluations listlist / actionsindex (tab root) / benchmark-comboboxInfo box, benchmark combobox, Manage benchmarks + New Evaluation buttons, and a table of runs (Evaluation / Status / Initiated by / Created) with a per-row menu: View results, New review, Check status, Export CSV, Delete
New Evaluation dialog--start-experiment-modalBenchmark (read-only) + optional evaluation name (auto-generated if blank); starts a background run of the agent over every benchmark item
Manage benchmarks dialogbenchmarks / newprofile/benchmarks (embedded BenchmarksTab)Organization-wide benchmark list with search, a New Benchmark dialog (name + description), and per-benchmark view
Benchmark Q&A itemsitems / manual / csvprofile/benchmarks/benchmark-items-modalQuestion/answer pairs used to evaluate agents; Add Q&A supports manual rows or CSV upload (required input column, optional expected_output, max 10 MB / 10,000 rows)
Results modalresults / review detailsexperiment-detail-modalTrace count, a Reviews section (LLM-as-Judge runs with status pill, criteria, and scores produced), and every trace with Input / Expected output / Actual output, its score chips (removable), and an Add-a-score form (name, 0-1 value, comment)
Evaluate modal (new review)evaluate / llm pickerllm-judge-modal / evaluate-llm-pickerCriteria textarea, score name, max concurrency, and a provider-then-model LLM picker; kicks off an LLM-as-Judge run that scores every trace
Delete confirmationdeletedelete-experiment-modalConfirm-then-delete for an evaluation run; cannot be undone

Evaluations run in the background: the table shows a status badge (COMPLETED green / FAILED red / anything else blue) and Check status refetches a single run and pushes the fresh status into the table. View results, New review, and Export CSV are disabled until the run completes.

<AgentEvaluationTab> Props

Import from @iblai/iblai-js/web-containers/next.

PropTypeRequiredDescription
getLLMProviderDetails(providerName: string, llmName?: string) => LLMProviderDetailsYesMaps a provider name to display info (logo, display name) for the review-modal LLM picker
labelsDeepPartial<EvaluationTabLabels>NoOverride user-visible strings
PaginationComponentComponentType<{ currentPage, totalPages, onPageChange, disabled }>NoCustom pagination for the evaluations table. Defaults to the web-containers AdvancedPagination

Related Exports

From @iblai/iblai-js/web-containers/next:

  • AGENT_EVALUATION_TAB_LABELS -- the default agent-facing label bundle.
  • EvaluationTabLabels -- type for the full label bundle.
  • AgentEvaluationTabProps -- props type for the tab.
  • LLMProviderDetails -- type for the return value of getLLMProviderDetails (shared with /iblai-vibe-agent-llm).

From @iblai/data-layer (the same RTK Query hooks the tab uses, for custom UI): useListEvalDatasetsQuery, useListEvalRunsQuery, useStartEvalRunMutation, useGetEvalRunQuery, useEvaluateEvalRunMutation, useListEvalRunJudgesQuery, useCreateEvalScoreMutation, useDeleteEvalScoreMutation, useExportEvalRunMutation, useDeleteEvalRunMutation, plus the EvalDataset, EvalDatasetRun, EvalDatasetRunDetail, EvalJudgeTask, EvalScore payload types.

Step 5: Verify

Run /iblai-vibe-ops-test before telling the user the work is ready:

  1. pnpm build -- must pass with zero errors
  2. pnpm test -- vitest must pass
  3. Start dev server and touch test:
    pnpm dev &
    npx playwright screenshot http://localhost:3000/agents/<id>/evals /tmp/agent-evals.png

Important Notes

  • Redux store: Must include mentorReducer and mentorMiddleware -- the evaluations API slice (datasets / runs / judges / scores) ships inside those bundles.
  • initializeDataLayer(): 5 args (v1.2+)
  • @reduxjs/toolkit: Deduplicated via webpack aliases in next.config.ts
  • Peer deps: sonner and @iblai/iblai-web-mentor must be installed (pnpm add sonner @iblai/iblai-web-mentor)
  • Shared provider: AgentSettingsProvider must wrap the route at a layout level. See /iblai-vibe-agent-setting Step 2 for the full snippet.
  • Benchmarks are organization-wide, runs are agent-scoped: a benchmark can be evaluated against multiple agents. The tab filters runs client-side to the current agent via metadata.mentor_unique_id; pending runs without populated metadata are kept only when the current user initiated them (their freshly-started evaluation).
  • Manual scores are 0-1: the Add-a-score form requires a numeric value between 0 and 1. Score writes are ingested asynchronously by the eval store -- the modal patches its cache optimistically and the real record appears on the next refresh.
  • CSV format (benchmark Q&A upload): UTF-8, required input column, optional expected_output column, max 10 MB / 10,000 rows; rows with a blank question are skipped.
  • First benchmark auto-selected: the combobox picks the first benchmark automatically; New Evaluation stays disabled until a benchmark exists (use Manage benchmarks to create one).
  • Brand guidelines: BRAND.md

Evaluations REST API

For custom UI beyond <AgentEvaluationTab>. All endpoints are prefixed with ${dmUrl}/api/ai-mentor/orgs/{org}/users/{user_id}/evaluations where dmUrl is NEXT_PUBLIC_API_BASE_URL.

Benchmarks (datasets)

MethodPathPurpose
GETdatasets/List benchmarks (params: page, limit, name, user_email)
POSTdatasets/Create a benchmark ({ "name", "description" })
GETdatasets/{name}/Get one benchmark
GETdatasets/{name}/items/List Q&A items (params: page, limit, include_trace)
POSTdatasets/{name}/items/Add Q&A items
POSTdatasets/{name}/items/upload/Upload items CSV (multipart)
PUTdatasets/{name}/items/{item_id}/Update an item
DELETEdatasets/{name}/items/{item_id}/Delete an item

Evaluation runs

MethodPathPurpose
GETdatasets/{name}/runs/List runs for a benchmark
POSTdatasets/{name}/runs/Start a run
GETdatasets/{name}/runs/{run}/Run detail (traces + scores)
DELETEdatasets/{name}/runs/{run}/Delete a run
GETdatasets/{name}/runs/{run}/export/Export results as CSV (text response)

Start-run body (bind the run to the agent being evaluated):

{
  "mentor_unique_id": "agent-uuid",
  "run_name": "qa-eval-v1"
}

run_name is optional -- the backend auto-generates one (e.g. run-091c4937) when omitted.

LLM-as-Judge reviews

MethodPathPurpose
POSTdatasets/{name}/runs/{run}/evaluate/Start a review (LLM scores every trace)
GETdatasets/{name}/runs/{run}/evaluate/List reviews for a run (params: page, limit, status)
GETjudges/List reviews across runs (params: dataset_name, status)

Review body:

{
  "criteria": "Evaluate the response on accuracy",
  "score_name": "accuracy",
  "llm_provider": "openai",
  "llm_name": "gpt-5",
  "max_concurrency": 4
}

Scores

MethodPathPurpose
GETscores/List scores (params: dataset_run_id, trace_id, name)
POSTscores/Add a manual score ({ "trace_id", "name", "value", "comment"?, "dataset_run_id"? }, value 0-1)
DELETEscores/{score_id}/Remove a score
GETscore-configs/List score configs
POSTscore-configs/Create a score config

Task status polling (used by Check status) goes through /api/ai-mentor/orgs/{org}/users/{user_id}/tasks/{task_id}.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.