Files
deepagentsjs/internal/eval-harness
github-actions[bot] 750d69c024 chore: version packages (#568)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @langchain/node-vfs@0.2.0

### Minor Changes

- [#575](https://github.com/langchain-ai/deepagentsjs/pull/575)
[`5d266a2`](https://github.com/langchain-ai/deepagentsjs/commit/5d266a213d8d3d15c2281e2e00ab71ee30ca3ffe)
Thanks [@hntrl](https://github.com/hntrl)! - BREAKING: remove shell
execution from the VFS provider

`VfsBackend` now operates as a filesystem-only `BackendProtocolV2`
implementation and no longer exposes command execution.

The provider now implements `read`, `ls`, `grep`, and `glob` directly
against the in-memory VFS, path resolution is confined to the virtual
workspace root, and legacy `VfsSandbox` / `createVfsSandboxFactory*`
aliases are removed.
## @langchain/quickjs@0.5.0

### Minor Changes

- [#590](https://github.com/langchain-ai/deepagentsjs/pull/590)
[`7ee3feb`](https://github.com/langchain-ai/deepagentsjs/commit/7ee3feb674c361305b2a031db9132253e3d0543b)
Thanks [@colifran](https://github.com/colifran)! - chore(quickjs):
remove skills backend and associated plumbing

- [#592](https://github.com/langchain-ai/deepagentsjs/pull/592)
[`72cfb0c`](https://github.com/langchain-ai/deepagentsjs/commit/72cfb0c0384b30059b5e8028139a2e167c1be882)
Thanks [@colifran](https://github.com/colifran)! - feat(quickjs):
implement default subagent primitive in code interpreter for
programmatic subagent calling

### Patch Changes

- [#594](https://github.com/langchain-ai/deepagentsjs/pull/594)
[`61db938`](https://github.com/langchain-ai/deepagentsjs/commit/61db9381494f61b4548cd80b715e5af72fdde381)
Thanks [@colifran](https://github.com/colifran)! - chore(quickjs):
remove configurable concurrency and add subagents option with true
default

- [#546](https://github.com/langchain-ai/deepagentsjs/pull/546)
[`b7a5f26`](https://github.com/langchain-ai/deepagentsjs/commit/b7a5f26fd9cba992b11e1a4cf18607d64533503b)
Thanks [@open-swe](https://github.com/apps/open-swe)! - fix(quickjs):
scope `CodeInterpreterMiddleware` REPL prompt sandbox bullet to the
runtime
## deepagents-acp@0.1.14

### Patch Changes

- Updated dependencies
[[`18557db`](https://github.com/langchain-ai/deepagentsjs/commit/18557db7bbdf92052ed5f994512fb70e11989e69),
[`773cac5`](https://github.com/langchain-ai/deepagentsjs/commit/773cac5dc7efc7843dd882642d91f7d64d6fde81),
[`1ca6dc9`](https://github.com/langchain-ai/deepagentsjs/commit/1ca6dc92fd40a6d845d24b95ba14b8f2643db394),
[`03df237`](https://github.com/langchain-ai/deepagentsjs/commit/03df237385fbdfefd862076c5588eb39cb6e43c3),
[`84f3c0c`](https://github.com/langchain-ai/deepagentsjs/commit/84f3c0c2f1cad271191bcc138b84ba5b9c9205c9),
[`72cfb0c`](https://github.com/langchain-ai/deepagentsjs/commit/72cfb0c0384b30059b5e8028139a2e167c1be882),
[`04cc3fc`](https://github.com/langchain-ai/deepagentsjs/commit/04cc3fc26001ee566ed94de44c2dda2cf6adecc4),
[`18fbb48`](https://github.com/langchain-ai/deepagentsjs/commit/18fbb4839050e98ae3cfd36ec69b11f0725ad6d6),
[`e3d4b53`](https://github.com/langchain-ai/deepagentsjs/commit/e3d4b5367b1825df56c919b483ec4a3e117d631f)]:
  - deepagents@1.10.4
## deepagents@1.10.4

### Patch Changes

- [#551](https://github.com/langchain-ai/deepagentsjs/pull/551)
[`18557db`](https://github.com/langchain-ai/deepagentsjs/commit/18557db7bbdf92052ed5f994512fb70e11989e69)
Thanks [@antonnak](https://github.com/antonnak)! - fix(deepagents): gate
cache_control writes on per-call request.model

`createCacheBreakpointMiddleware` and `createMemoryMiddleware` were
gating
the Anthropic-specific `cache_control` write at agent-creation time
only.
When `modelFallbackMiddleware` swapped `request.model` to a
non-Anthropic
  provider mid-flight (e.g. on Anthropic 5xx), the marker leaked through
  and the fallback provider rejected the request with
  `400 Unknown parameter: 'cache_control'`. Both middlewares now also
check `isAnthropicModel(request.model)` inside `wrapModelCall`. Fixes
[#550](https://github.com/langchain-ai/deepagentsjs/issues/550).

- [#591](https://github.com/langchain-ai/deepagentsjs/pull/591)
[`773cac5`](https://github.com/langchain-ai/deepagentsjs/commit/773cac5dc7efc7843dd882642d91f7d64d6fde81)
Thanks [@colifran](https://github.com/colifran)! - chore(deepagents):
expose createSubAgent

- [#541](https://github.com/langchain-ai/deepagentsjs/pull/541)
[`1ca6dc9`](https://github.com/langchain-ai/deepagentsjs/commit/1ca6dc92fd40a6d845d24b95ba14b8f2643db394)
Thanks [@ixchio](https://github.com/ixchio)! - fix getMimeType to return
application/octet-stream for unknown file extensions instead of
text/plain

- [#572](https://github.com/langchain-ai/deepagentsjs/pull/572)
[`03df237`](https://github.com/langchain-ai/deepagentsjs/commit/03df237385fbdfefd862076c5588eb39cb6e43c3)
Thanks [@hntrl](https://github.com/hntrl)! - fix: scope CompositeBackend
grep/glob route fanout by search path

CompositeBackend now limits fallback route fanout to routes mounted
under the requested search path, instead of querying all routed backends
unconditionally.

This avoids unrelated routed backend calls (and side-effect errors) for
scoped searches like `path="/workspace"`, while preserving full fanout
behavior at root (`path="/"`).

- [#574](https://github.com/langchain-ai/deepagentsjs/pull/574)
[`84f3c0c`](https://github.com/langchain-ai/deepagentsjs/commit/84f3c0c2f1cad271191bcc138b84ba5b9c9205c9)
Thanks [@hntrl](https://github.com/hntrl)! - fix(deepagents): add
explicit browser and node entrypoints
  - add `deepagents/browser` and `deepagents/node` subpath exports
- route browser bundlers to the browser-safe bundle via the root
`browser` export condition
- avoid named Node builtin imports in backend utils that can break
browser builds
  - document browser guidance to import from `deepagents/browser`

- [#592](https://github.com/langchain-ai/deepagentsjs/pull/592)
[`72cfb0c`](https://github.com/langchain-ai/deepagentsjs/commit/72cfb0c0384b30059b5e8028139a2e167c1be882)
Thanks [@colifran](https://github.com/colifran)! - feat(quickjs):
implement default subagent primitive in code interpreter for
programmatic subagent calling

- [#566](https://github.com/langchain-ai/deepagentsjs/pull/566)
[`04cc3fc`](https://github.com/langchain-ai/deepagentsjs/commit/04cc3fc26001ee566ed94de44c2dda2cf6adecc4)
Thanks [@hntrl](https://github.com/hntrl)! - fix(deepagents): propagate
subagent `lc_agent_name` during task delegation
- Ensure `task` tool subagent invocations override
`metadata.lc_agent_name` with the selected `subagent_type`.
- Add regression coverage for both compiled subagents (`runnable`) and
standard subagent specs to verify tool-time metadata reflects the active
subagent.
- Update the `langsmith` peer dependency range in `deepagents` to
`^0.7.1`.

- [#595](https://github.com/langchain-ai/deepagentsjs/pull/595)
[`18fbb48`](https://github.com/langchain-ai/deepagentsjs/commit/18fbb4839050e98ae3cfd36ec69b11f0725ad6d6)
Thanks [@christian-bromann](https://github.com/christian-bromann)! -
fix(deepagents): count tokens once per model call in summarization
middleware

`createSummarizationMiddleware` counted tokens twice on every model
call—once
inside `truncateArgs` and again for the should-summarize check—even when
nothing was truncated or summarized. Count once and pass the total into
`truncateArgs`; recount only when truncation actually modifies messages.

- [#242](https://github.com/langchain-ai/deepagentsjs/pull/242)
[`e3d4b53`](https://github.com/langchain-ai/deepagentsjs/commit/e3d4b5367b1825df56c919b483ec4a3e117d631f)
Thanks [@alvedder](https://github.com/alvedder)! - feat(deepagents):
support direct skill paths as sources in createSkillsMiddleware
## @deepagents/evals@0.0.13

### Patch Changes

- Updated dependencies
[[`18557db`](https://github.com/langchain-ai/deepagentsjs/commit/18557db7bbdf92052ed5f994512fb70e11989e69),
[`773cac5`](https://github.com/langchain-ai/deepagentsjs/commit/773cac5dc7efc7843dd882642d91f7d64d6fde81),
[`1ca6dc9`](https://github.com/langchain-ai/deepagentsjs/commit/1ca6dc92fd40a6d845d24b95ba14b8f2643db394),
[`03df237`](https://github.com/langchain-ai/deepagentsjs/commit/03df237385fbdfefd862076c5588eb39cb6e43c3),
[`84f3c0c`](https://github.com/langchain-ai/deepagentsjs/commit/84f3c0c2f1cad271191bcc138b84ba5b9c9205c9),
[`72cfb0c`](https://github.com/langchain-ai/deepagentsjs/commit/72cfb0c0384b30059b5e8028139a2e167c1be882),
[`04cc3fc`](https://github.com/langchain-ai/deepagentsjs/commit/04cc3fc26001ee566ed94de44c2dda2cf6adecc4),
[`18fbb48`](https://github.com/langchain-ai/deepagentsjs/commit/18fbb4839050e98ae3cfd36ec69b11f0725ad6d6),
[`e3d4b53`](https://github.com/langchain-ai/deepagentsjs/commit/e3d4b5367b1825df56c919b483ec4a3e117d631f)]:
  - deepagents@1.10.4

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-17 15:05:26 -07:00
..
2026-04-01 17:10:16 -07:00
2026-06-17 15:05:26 -07:00
2026-06-17 15:05:26 -07:00

@deepagents/evals

Generic eval harness for deepagents. Provides the runner interface, runner registry, trajectory parsing, and custom vitest matchers with LangSmith feedback integration.

Package exports

Export Description
@deepagents/evals Core harness — EvalRunner, registry functions, parseTrajectory, getFinalText, custom matchers
@deepagents/evals/deepagent registerDeepAgentRunner() — wires createDeepAgent into the generic runner interface
@deepagents/evals/setup Side-effect import that registers all concrete runners (sonnet-4-5, gpt-4.1, etc.)

Core concepts

EvalRunner

The central interface. A runner has a name, a run() method, and an extend() method:

interface EvalRunner {
  name: string;
  run(params: RunAgentParams): Promise<AgentTrajectory>;
  extend(overrides: Record<string, unknown>): EvalRunner;
}
  • run() takes invocation params only — { query, initialFiles? }.
  • extend() returns a new runner with agent configuration overrides (e.g. systemPrompt, tools, subagents) baked in. This keeps "what the agent is" separate from "what to ask it".

RunAgentParams

interface RunAgentParams {
  query: string;
  initialFiles?: Record<string, string>;
}

Pure invocation inputs. query is the user message; initialFiles seeds the agent's virtual file system.

AgentTrajectory

interface AgentTrajectory {
  steps: AgentStep[];
  files: Record<string, string>;
}

The output of every run() call. steps is an ordered list of agent turns (each containing an AIMessage action and any ToolMessage observations). files is the final file-system snapshot.

Runner registry

flowchart LR
    setup["setup.ts<br/><i>vitest setupFile</i>"]
    deepagent["deepagent.ts<br/>registerDeepAgentRunner()"]
    registry["index.ts<br/>registerRunner()"]
    resolve["resolveRunner(name)"]
    default["getDefaultRunner()<br/>reads EVAL_RUNNER env"]
    test["test file<br/>runner.run() / runner.extend()"]

    setup -- "calls for each model" --> deepagent
    deepagent -- "wraps in DeepAgentEvalRunner" --> registry
    default -- "looks up by name" --> registry
    resolve -- "looks up by name" --> registry
    test --> default
    test --> resolve
  1. setup.ts is loaded as a vitest setupFile. It calls registerDeepAgentRunner() for each model, which internally calls registerRunner().
  2. getDefaultRunner() reads the EVAL_RUNNER env var, looks up the runner by name, and returns it (cached).
  3. resolveRunner(name) is the lower-level lookup if you need a specific runner by name.

registerDeepAgentRunner

Bridges createDeepAgent to the generic EvalRunner interface:

registerDeepAgentRunner("sonnet-4-5", (config) =>
  createDeepAgent({
    ...config,
    model: new ChatAnthropic({ model: "claude-sonnet-4-5-20250929" }),
  }),
);

The factory receives optional overrides (from extend()) and must return an invokable agent. A default agent (no overrides) is built eagerly at registration time and reused across run() calls for performance. When extend() is called, a fresh agent is constructed with the overrides.

The DeepAgentEvalRunner handles:

  • Converting initialFiles strings into the FileData format expected by the agent's state backend
  • Generating a unique thread_id per invocation
  • Calling ls.logOutputs() for LangSmith experiment tracking
  • Parsing the raw LangGraph result into an AgentTrajectory

Custom vitest matchers

Imported automatically when you import from @deepagents/evals. Each matcher also logs LangSmith feedback (scores) so results appear in the experiment dashboard.

Matcher Description
toHaveAgentSteps(n) Trajectory has exactly n steps
toHaveToolCallRequests(n) Total tool-call count equals n
toHaveToolCallInStep(step, match) Step (1-indexed) contains a tool call matching { name, argsContains?, argsEquals? }
toHaveFinalTextContaining(text, caseInsensitive?) Last step's text content includes text

Adding a new runner

To add support for a new model, add a registerDeepAgentRunner call in src/setup.ts:

registerDeepAgentRunner("my-model", (config) =>
  createDeepAgent({ ...config, model: new ChatMyProvider({ model: "my-model" }) }),
);

Then run evals with EVAL_RUNNER=my-model.

To add a completely different runner backend (not deepagents), implement the EvalRunner interface directly and call registerRunner(), or use the runner directly inside of the eval suite.

Development

pnpm build       # Build with tsdown
pnpm typecheck   # Type-check without emitting