evals

A method for measuring how well an AI agent performs using LangSmith, a platform for testing and monitoring language-model applications. It can compare an agent's answers or the order of its tool calls with an expected result.

In plain words
What is it for?
Use it to write evaluator functions, compare outputs with reference answers, or check whether an agent follows an expected tool-use path.
Why use it?
It gives you a repeatable way to judge agent behavior instead of relying only on casual inspection.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/langchain-ai/langgraphjs/evals
Clone the repo
git clone --depth 1 https://github.com/langchain-ai/langgraphjs
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 924 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00924
Opus 5 $0.00000 $0.00462
Sonnet 5 $0.00000 $0.00185
Haiku 4.5 $0.00000 $0.00092

Measured 2d ago against content hash 1b4e52325391, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

evals scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/docs/agents/evals.md · 124 lines

How it starts

The opening of the file, as written. The whole thing — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Evals

To evaluate your agent's performance you can use LangSmith evaluations. You would need to first define an evaluator function to judge the results from an agent, such as final outputs or trajectory. Depending on your evaluation technique, this may or may not involve a reference output:

const evaluator = async (params: {
  inputs: Record<string, unknown>;
  outputs: Record<string, unknown>;
  referenceOutputs?: Record<string, unknown>;
}) => {
  // compare agent outputs against reference outputs
  const outputMessages = params.outputs.messages;
  const referenceMessages = params.referenceOutputs.messages;
  const score = compareMessages(outputMessages, referenceMessages);
  return { key: "evaluator_score", score: score };
};

To get started, you can use prebuilt evaluators from AgentEvals package:

npm install agentevals @langchain/core

Create evaluator

A common way to evaluate agent performance is by comparing its trajectory (the order in which it calls its tools) against a reference trajectory:

// highlight-next-line
import { createTrajectoryMatchEvaluator } from "agentevals";

const outputs = [
  {
    role: "assistant",
    tool_calls: [
      {
        function: {
          name: "get_weather",
          arguments: JSON.stringify({ city: "san francisco" }),
        },
      },
      {
        function: {
          name: "get_directions",
          arguments: JSON.stringify({ destination: "presidio" }),
        },
      },
    ],
  },
];

const referenceOutputs = [
  {
    role: "assistant",
    tool_calls: [
      {
        function: {
          name: "get_weather",
          arguments: JSON.stringify({ city: "san francisco" }),
        },
      },
    ],
  },
];

// Create the evaluator
const evaluator = createTrajectoryMatchEvaluator({
  // highlight-next-line
  trajectoryMatchMode: "superset",  // (1)!
})

// Run the evaluator
const result = await evaluator({
  outputs,
  referenceOutputs,
});

Read the full file on GitHub · 124 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 124 lines · 0 tokens per session scan A 1b4e52325391

Subscribe to this mod's changes

evals is an agent published in the GitHub repository langchain-ai/langgraphjs (3,242 stars, last pushed 6d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 924 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

FREE_MCP_SERVERS

A catalog of real, public MCP servers you can plug straight into the Swarms Agent class — most require no authentication, a few use a free-tier API key. Runnable examples live in this folder.

kyegomez/swarms · 0 tokens

overview

The Agent Starter Pack follows a "bring your own agent" approach. It provides several production-ready agent templates designed to accelerate your development while offering the flexibility to use your preferred agent framework or pattern.

GoogleCloudPlatform/agent-starter-pack · 0 tokens

iteration

The iteration agent of /auto. Runs the /auto-iteration-loop skill — an autonomous review loop that consumes /auto-verify's four-state output (PASS / FAIL / INCONCLUSIVE / ZEROELIGIBLEVARIANTS) plus the orthogonal deferred bucket and routes each claim to the right back-edge (① variant-only fix / ② baseline-script fix /…

zjunlp/Mechanist · 143 tokens

huyen-agents

Updated 2025: This is a summary of Chip Huyen's blog and book chapter on agents, with some added context to provide a comprehensive overview of their design, capabilities, and practical applications.

alirezadir/Agentic-AI-Systems · 0 tokens

04-worker-mode

Worker mode allows an agent to dispatch complex, long-running tasks to background "copy" agents while the main agent stays fully interactive. When a worker finishes, its result is automatically surfaced back to the user through the main agent's conversation.

SmythOS/sre · 0 tokens

00-creating-agents

The SmythOS SDK offers flexible ways to create and configure agents. This guide covers everything from basic agent creation to advanced model configuration.

SmythOS/sre · 0 tokens