LangSmith Agent Testing
Sets up LangSmith datasets, scorers and experiments so you can prove an AI agent change is better before release.
Claude's review
7/10 Detailed LangSmith experiment method with assertion datasets, code first evaluators and judge alignment, for LangSmith users only.
We asked Claude the question you would ask: would I be glad I installed this? Two separate reviews, the second blind to the first, must both rate a skill 7 or higher before we sell it.
In detail
Use when testing an agent or LLM application offline in LangSmith before it ships, including building and maintaining evaluation datasets, writing the target function and evaluators, aligning LLM judges with human labels, running and comparing experiments, and diagnosing why an experiment scored badly.
How you use it
- Add it to your pack, then download your pack (1 credit).
- In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
- Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide
Safety check
Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.
An automated scan lowers risk but cannot promise zero risk. How we check skills
Preview
The first lines of SKILL.md
---
name: langchain-agent-experiments
description: Use when testing an agent or LLM application offline in LangSmith before it ships, including building and maintaining evaluation datasets, writing the target function and evaluators, aligning LLM judges with human labels, running and comparing experiments, and diagnosing why an experiment scored badly.
---
# Test agents with LangSmith experiments
An experiment runs one version of an application over a dataset and scores each
result with evaluators. It answers "is this version better than the last one,
and where does it fail?" before a change ships.
The order matters: inspect real outputs, shape the dataset to match, write the
target function, then evaluators. Most broken evaluations come from guessing
the output shape.
## Choose the harness
- **Experiment with `evaluate()`:** the default for comparing versions of an
application over a shared dataset, with results, comparisons, and evaluator
feedback in LangSmith.
- **pytest or Vitest/Jest integration:** when the checks belong next to the
code as test cases with assertions, run in CI, and the team already reads
test output. Results are still logged to LangSmith as experiments.
- **Harbor task:** when the agent must act in a controlled environment, such as
files, services, or a simulated user, and the verifier inspects the resulting
state. Use `langchain-eval-engineering`.
- **Online evaluator:** when the question is how live traffic behaves, not how
a candidate version compares. Use `langchain-agent-monitoring`.
## Inspect before you build
Run the application on a few representative inputs and read the traces
(`langchain-agent-tracing` covers finding them). Note the exact fields in the
root run's inputs and outputs, and where tool calls, retrieved documents, or
intermediate decisions appear. Framework output shapes vary; never assume one.
## Build the dataset
Default to **assertion-based reference outputs**: short claims a correct answer
must or must not satisfy, stored as `{"assertions": [{"key", "comment"}]}` in
...From langchain-ai's repository, MIT licence.
Related skills
-
Checked
RAG evaluation
Measures how well a RAG system retrieves and answers, with test questions, metrics and chunking advice.
7/101 credit -
Checked
Test and Fix Loop
Sets up a coding agent to run tests, read failures and fix them until green, with a safe point to stop.
8/101 credit -
Checked
AI Failure Analysis
Sorts real chatbot or agent logs into named failure types with counts, so you know which tests to write first.
7/101 credit -
Checked
AI Agent Eval Rubric
Writes pass or fail checks that define good behaviour for your AI agent, plus release targets for the PRD.
7/101 credit -
Checked
LLM Feature Testing
Builds an offline eval suite for AI features, so a prompt or model change cannot quietly make quality worse.
7/101 credit -
Checked
ElevenLabs Voice Agent Builder
Sets up phone and website voice agents on ElevenLabs that reply fast, sound natural and stay on task.
7/101 credit