* Revert "revert: "feat(deepagents): support multimodal files for backends (#298)" (#352)" (#353) This reverts commit03ea1c9729. * revert: "revert: "feat(sdk): add async subagent middleware for remote LangGraph servers (#323)" (#351)" (#354) * Revert "revert: "feat(sdk): add async subagent middleware for remote LangGraph servers (#323)" (#351)" This reverts commit367e43a5ed. * use any backend protocol * Reapply "chore(deepagents): refactor backend method names - `lsInfo` -> `ls`, …" (#349) (#356) This reverts commit573479d743. * Reapply "chore(sdk): unify sync subagents and async subagents into a single pr…" (#348) (#355) This reverts commit96dc34ccb6. * chore: align alpha with main (#358) * fix(deepagents): remove orphaned ToolMessages for Gemini compatibility (#335) * fix(deepagents): remove orphaned ToolMessages for Gemini compatibility * Fix ToolMessages for Gemini compatibility --------- Co-authored-by: Christian Bromann <git@bromann.dev> * fix(deepagents): throw on built-in tool collision (#330) * add error * Create big-horses-fail.md * add config error class * cr --------- Co-authored-by: Christian Bromann <git@bromann.dev> * fix(deepagents): use `crypto.randomUUID()` instead of uuid (#336) * fix(deepagents): use crypto.randomUUID() instead of uuid * update pnpm-lock * Create grumpy-weeks-wave.md * Update libs/deepagents/src/middleware/fs.int.test.ts * feat(deepagent): add LangSmithSandbox (#324) * feat(deepagent): add LangSmithSandbox * Change deepagents version from patch to minor * format * fix tests * format * make it a patch * cr * cr * fix * cr * chore: version packages (#321) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * regen lockfile * fix langsmith tests so that they use backend protocol v2 methods * format --------- Co-authored-by: pawel-twardziak <pawel.twardziak.dev@gmail.com> Co-authored-by: Christian Bromann <git@bromann.dev> Co-authored-by: Maahir Sachdev <maahir.sachdev@langchain.dev> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * feat(deepagents): add completion notifier middleware for async subagents (#334) Port of langchain-ai/deepagents#2119 to TypeScript. Adds a createCompletionNotifierMiddleware that async subagents can use to proactively notify their supervisor when they complete or error, closing the gap where the supervisor only learns about completion when someone calls check_async_task. - New createCompletionNotifierMiddleware with afterAgent and wrapModelCall hooks - Uses @langchain/langgraph-sdk Client to send runs.create() to the supervisor's thread - Reads parent_thread_id from subagent state (injected by start_async_task) - Derives task_id from runtime.configurable.thread_id - Silently no-ops if parent context is missing - Guards against duplicate notifications - 22 unit tests covering all hooks, edge cases, and error paths fix(deepagents): make url required in completion notifier (no ASGI in JS) JS does not have ASGI transport like Python, so the url parameter must be provided explicitly. Removed all ASGI references from docs and the localhost fallback default. fix(deepagents): throw on built-in tool collision (#330) * add error * Create big-horses-fail.md * add config error class * cr --------- Co-authored-by: Christian Bromann <git@bromann.dev> fix(deepagents): use `crypto.randomUUID()` instead of uuid (#336) * fix(deepagents): use crypto.randomUUID() instead of uuid * update pnpm-lock * Create grumpy-weeks-wave.md * Update libs/deepagents/src/middleware/fs.int.test.ts feat(deepagent): add LangSmithSandbox (#324) * feat(deepagent): add LangSmithSandbox * Change deepagents version from patch to minor * format * fix tests * format * make it a patch * cr * cr * fix * cr regen lockfile linting linting add missing url property chore: version packages (#321) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> changeset regen lockfil * chore: enter alpha pre-release * chore: target alpha for releases * chore: version packages (alpha) (#359) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore(deepagents): extend supported backend file types (#363) * extend supported file types * Create strong-tigers-share.md --------- Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com> * chore(deepagents): implement async subagents + use stream example (#360) * async subagents + use stream example * fix lockfile * format * linting * readme and linting * format * proactively send responses when subagents complete * better examples * feat(deepagents): rename completion notifier to completion callback and align with Python (#361) * feat(deepagents): rename completion notifier to completion callback and align with Python PR - Rename completion_notifier.ts -> completion_callback.ts to match Python's completion_callback.py naming - Rename exports: createCompletionNotifierMiddleware -> createCompletionCallbackMiddleware, CompletionNotifierOptions -> CompletionCallbackOptions - Rename state key: parent_thread_id -> callbackThreadId, option: parentGraphId -> callbackGraphId - Make url optional (Python allows omitting for ASGI transport) - Match Python's strict error behavior: throw on empty messages, non-AIMessage types, and missing callbackThreadId - Add truncation suffix with task_id hint for long messages - Use generic error message in wrapModelCall (don't leak error details) - Remove duplicate notification guard (Python notifies on every error) - Add extractCallbackContext to async_subagents.ts: injects callbackThreadId into subagent input state when launching via start_async_task - Add tests for extractCallbackContext and callback context injection * cr * Rename completion notifier to completion callback Renamed completion notifier to completion callback for consistency with Python. * fix(sdk): `AsyncTask` `updatedAt` field doesn't update on task status changes (#400) * update updatedAt field to change on any task update * added changeset * chore: set up self hosted async subagent example (#399) * self hosted async subagent example * with postgres * formatting * eslint disable no console * fix dockerfile and readme * Update examples/async-subagent-server/server.ts Co-authored-by: Christian Bromann <git@bromann.dev> --------- Co-authored-by: Christian Bromann <git@bromann.dev> * chore(sdk): update async subagent middleware for agent protocol (#394) * update async subagent middleware for agent protocol * add changeset * Update libs/deepagents/src/middleware/async_subagents.ts Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com> * Update libs/deepagents/src/middleware/async_subagents.ts Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com> * Update libs/deepagents/src/middleware/async_subagents.ts Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com> * differentiate agent protocol --------- Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com> * chore(repo): migrate linting and formatting to oxc tooling (#391) * chore(repo): migrate linting and formatting to oxc tooling * cr * cr * chore(lint): clean up console disables for oxlint * cr * Apply suggestions from code review Co-authored-by: Christian Bromann <git@bromann.dev> --------- Co-authored-by: Christian Bromann <git@bromann.dev> * refactor(deepagents): clean up createDeepAgent middleware wiring (#392) * refactor(deepagents): clean up createDeepAgent middleware wiring * fix(deepagents): avoid duplicate HITL middleware on subagents * add comments, remove iife * Create ten-masks-flow.md * fix(deepagents): align prompt templates with runtime behavior (#393) * fix(deepagents): align prompt templates with runtime behavior * chore: add changeset for prompt alignment fixes * cr * cr * fix store backend and tests * lint * fix rests and resolveBackend * lint * fix failing tests * revert adapt resolve backend * fix resolve backend * better variable name * fix backend factory to return a maybe promise * mark resolve backend as internal * format --------- Co-authored-by: Colin Francis <131073567+colifran@users.noreply.github.com> Co-authored-by: pawel-twardziak <pawel.twardziak.dev@gmail.com> Co-authored-by: Christian Bromann <git@bromann.dev> Co-authored-by: Maahir Sachdev <maahir.sachdev@langchain.dev> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Colin Francis <colin.francis@langchain.dev>
oolong
Implementation of Oolong: Evaluating Long Context Reasoning and Aggregation Capabilities by Amanda Bertsch, Adithya Pratapa, Teruko Mitamura, Graham Neubig, and Matthew R. Gormley (2025).
As model context lengths continue to grow, concerns about whether models effectively use the full context length have persisted. Oolong is a benchmark of long-context reasoning tasks that require analyzing individual chunks of text on an atomic level, and then aggregating these analyses to answer distributional questions.
Uses the oolong-synth dataset
from HuggingFace. The agent receives a large context_window_text as a seeded file and must
answer aggregation questions (counting, frequency, temporal, user-based).
Structure
Each source dataset has its own test file under datasets/:
| File | Source dataset |
|---|---|
datasets/spam.test.ts |
SMS spam classification |
datasets/trec_coarse.test.ts |
TREC question type classification |
datasets/agnews.test.ts |
AG News topic classification |
datasets/imdb.test.ts |
IMDB sentiment |
datasets/negation.test.ts |
HiTZ negation detection |
datasets/yahoo.test.ts |
Yahoo Answers topics |
datasets/formality.test.ts |
Pavlick formality |
datasets/multinli.test.ts |
MultiNLI entailment |
datasets/metaphors.test.ts |
BigBench metaphor interpretation |
datasets/app_reviews.test.ts |
App review sentiment |
Data loading is handled by loadOolongTasksByDataset() in load-oolong.ts
which caches at the module level, so multiple test files share the same data.
The shared test logic lives in make-tests.ts.
Running
# Run all datasets
EVAL_RUNNER=sonnet-4-5 pnpm --filter @deepagents/eval-oolong test:eval
# Run a single dataset
EVAL_RUNNER=sonnet-4-5 pnpm --filter @deepagents/eval-oolong test:eval -- datasets/spam.test.ts
# Run all validation tasks (~1300)
OOLONG_MAX_PER_DATASET=0 EVAL_RUNNER=sonnet-4-5 pnpm --filter @deepagents/eval-oolong test:eval
# Custom subset size
OOLONG_MAX_PER_DATASET=5 EVAL_RUNNER=sonnet-4-5 pnpm --filter @deepagents/eval-oolong test:eval
Environment variables
| Variable | Default | Description |
|---|---|---|
EVAL_RUNNER |
(required) | Model runner to use (e.g. sonnet-4-5, opus-4-6) |
OOLONG_MAX_PER_DATASET |
10 |
Max tasks per source dataset. Set to 0 for all. |
OOLONG_CONTEXT_LEN |
(all) | Filter to a specific context_len (e.g. 1024, 131072) |
Scoring
Scoring is ported from the official Oolong eval harness (synth_process_response) to ensure results are directly comparable to the paper.
- Answer parsing -- split on
:and take the last segment; strip markdown/bracket artifacts - Exact match --
str(parsed) == str(gold)after parsing - Comparison answers (
ANSWER_TYPE.COMPARISON) -- substring containment for "more common than" / "less common than" / "same frequency as" - Numeric answers (
ANSWER_TYPE.NUMERIC) -- partial credit via0.75^|gold - pred| - Date answers (
ANSWER_TYPE.DATE) -- flexible date parsing comparison
A prediction is scored 1.0 for exact/comparison/date matches, partial credit for near numeric answers, and 0 otherwise. The test assertion requires a perfect score (1.0).
Citation
@article{bertsch2025oolong,
title={Oolong: Evaluating Long Context Reasoning and Aggregation Capabilities},
author={Bertsch, Amanda and Pratapa, Adithya and Mitamura, Teruko and Neubig, Graham and Gormley, Matthew R.},
journal={arXiv preprint arXiv:2511.02817},
year={2025}
}
Adaptations
- Uses the
oolong-synthvalidation split (all source datasets, not justtrec_coarse) - Defaults to a 10-task-per-dataset subset for cost efficiency
- Context is seeded as an
initialFilerather than a REPL VFS - Agent uses the standard
getDefaultRunner()harness rather than a custom RLM agent