Commit Graph

47 Commits

Author SHA1 Message Date
John Kennedy 37a12fa57e fix(deps): patch all open Dependabot security vulnerabilities via pnpm overrides (#425)
Adds/updates pnpm overrides to resolve 11 open Dependabot alerts:
- lodash <= 4.17.23 → 4.18.1 (prototype pollution)
- picomatch < 2.3.2 → 2.3.2 and >= 4.0.0 < 4.0.4 → 4.0.4 (ReDoS)
- fast-xml-parser >= 4.0.0-beta.3 <= 5.5.6 → 5.5.10 (multiple vulns)
- flatted < 3.4.2 → 3.4.2 (prototype pollution)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 22:10:24 -07:00
Hunter Lovell 1f2ca049d7 chore: fix lockfile (#420) 2026-04-02 07:05:02 +00:00
dependabot[bot] 67d7423c82 build(deps-dev): bump typescript from 5.9.3 to 6.0.2 (#409)
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.9.3 to 6.0.2.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.9.3...v6.0.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-version: 6.0.2
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-01 21:29:10 -07:00
Hunter Lovell ca5cc0acfb chore: merge alpha into main (#404)
* Revert "revert: "feat(deepagents): support multimodal files for backends (#298)" (#352)" (#353)

This reverts commit 03ea1c9729.

* 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 commit 367e43a5ed.

* use any backend protocol

* Reapply "chore(deepagents): refactor backend method names - `lsInfo` -> `ls`, …" (#349) (#356)

This reverts commit 573479d743.

* Reapply "chore(sdk): unify sync subagents and async subagents into a single pr…" (#348) (#355)

This reverts commit 96dc34ccb6.

* 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>
2026-04-01 17:10:16 -07:00
dependabot[bot] 18def024a5 build(deps-dev): bump @changesets/changelog-github from 0.5.2 to 0.6.0 (#374)
Bumps [@changesets/changelog-github](https://github.com/changesets/changesets) from 0.5.2 to 0.6.0.
- [Release notes](https://github.com/changesets/changesets/releases)
- [Commits](https://github.com/changesets/changesets/compare/@changesets/read@0.5.2...@changesets/changelog-github@0.6.0)

---
updated-dependencies:
- dependency-name: "@changesets/changelog-github"
  dependency-version: 0.6.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-25 11:43:15 -07:00
John Kennedy cb95cd5cd1 fix: patch 6 security alerts (critical + high severity)
Resolves 6 Dependabot security alerts using pnpm.overrides (Strategy C):

- fast-xml-parser 5.3.4 → 5.3.6: CVE-2026-25896 (critical), CVE-2026-26278 (high)
- rollup 4.57.1 → 4.59.0: CVE-2026-27606 (high)
- minimatch 3.1.2 → 3.1.4: CVE-2026-26996, CVE-2026-27903, CVE-2026-27904 (all high)

Also fixes broken override from PR #257 that pinned minimatch@<3.1.3
to the vulnerable version 3.1.2 instead of the fixed 3.1.4.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 14:31:26 -08:00
John Kennedy bd93f768c3 fix: minimize lockfile churn, patch all vulnerable minimatch ranges
The original lockfile regeneration pulled in unrelated dependency bumps
(langgraph 1.1.4→1.2.0, core 1.1.26→1.1.29) that caused TypeScript
type errors. Regenerate from main's lockfile with targeted overrides
that only change minimatch versions.

Also fix override selectors to catch minimatch@10.1.2 (in the
>=10.0.0 <10.2.1 vulnerable range) used by @typescript-eslint.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 14:21:46 -08:00
John Kennedy 957209b955 fix: bump minimatch to resolve CVE-2026-26996
minimatch < 3.1.3, < 9.0.6, < 10.2.1 are vulnerable.
Strategy: lockfile re-resolution (transitive dependency).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 16:44:47 -08:00
Christian Bromann ae70fa400e fix(deepagents): pass on subagent name (#218)
* fix(deepagents): pass on subagent name

* Add changeset for deepagents patch

* update deps

* format
2026-02-10 23:04:54 -08:00
dependabot[bot] 7f91c53506 build(deps-dev): bump the major-deps-updates-main group with 2 updates (#214)
Bumps the major-deps-updates-main group with 2 updates: [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) and [eslint](https://github.com/eslint/eslint).


Updates `@eslint/js` from 9.39.2 to 10.0.1
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/commits/HEAD/packages/js)

Updates `eslint` from 9.39.2 to 10.0.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v9.39.2...v10.0.0)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 10.0.1
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: major-deps-updates-main
- dependency-name: eslint
  dependency-version: 10.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: major-deps-updates-main
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-10 13:03:41 -08:00
Christian Bromann 2789ebd9d9 feat: add VFS sandbox (#163)
* feat: add support for Vercel sandbox

* format

* switch to deno

* cr

* format

* feat: add support for Vercel sandbox

* feat: add VFS sandbox

* format

* rm vercel

* rename

* format

* rename

* skip if on windows
2026-02-04 21:35:46 -08:00
Christian Bromann c0e676a1a5 feat: add support for Deno sandbox (#162)
* feat: add support for Vercel sandbox

* format

* switch to deno

* cr

* format

* rename

* format

* remove skip

* feedback

* Apply suggestion from @hntrl

Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com>

* auto bump peer dep

* format

* fix lock file

* add jiti

* add support for initialFiles

* include provider integration tests

* use DENO_DEPLOY_TOKEN

* add changeset

---------

Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com>
2026-02-04 21:10:28 -08:00
Christian Bromann 8a92e572ea fix(deepagents): use new StateSchema class (#145)
* fix(deepagents): use new StateSchema class

* format

* fix bundling

* run unit tests also in windows

* revert

* fix windows test issue

* bump lc

* bump lc

* path normalization
2026-01-28 10:52:38 -08:00
Christian Bromann 67018b2443 fix(deepagents): port backend agnostic skills (#124)
* fix(deepagents): port backend agnostic skills

* update test
2026-01-16 10:58:05 -08:00
Christian Bromann c648cd67b5 feat(deepagents): add MemoryMiddleware for AGENTS.md support (#123)
* feat(deepagents): add MemoryMiddleware for AGENTS.md support

Port of langchain-ai/deepagents#646 to TypeScript.

Adds MemoryMiddleware that loads persistent context from AGENTS.md files
following the agents.md specification. Unlike skills (which are on-demand),
memory is always loaded at agent startup and injected into the system prompt.

Changes:
- Add createMemoryMiddleware in middleware/memory.ts
- Add `memory` parameter to createDeepAgent for automatic middleware setup
- Export MemoryMiddleware from package index
- Add unit tests for memory loading and prompt injection

Usage:
const agent = createDeepAgent({
  memory: [
    "~/.deepagents/AGENTS.md",
    "./.deepagents/AGENTS.md",
  ],
});

* add example
2026-01-16 10:53:39 -08:00
Christian Bromann 321ecf3193 chore: migrate to libs (#98)
* internal: migrate to libs

* format

* update

* format

* codespell

* release process

* format

* update deps

* no need of npm tokens

* fix lock file

* type strictness

* no need for withLangGraph

* format

* fix

* remove withLanggraph

* add changeset
2026-01-09 15:10:42 -08:00
dependabot[bot] dfbd0abe4c build(deps-dev): bump @types/uuid (#96)
Bumps the major-deps-updates-main group with 1 update in the / directory: [@types/uuid](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/uuid).


Updates `@types/uuid` from 10.0.0 to 11.0.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/uuid)

---
updated-dependencies:
- dependency-name: "@types/uuid"
  dependency-version: 11.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: major-deps-updates-main
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-08 18:41:15 -08:00
dependabot[bot] 24d654b28b build(deps-dev): bump the major-deps-updates-main group with 5 updates (#95)
Bumps the major-deps-updates-main group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `22.18.13` | `25.0.3` |
| [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) | `8.10.2` | `10.1.8` |
| [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) | `4.2.5` | `5.5.4` |
| [globals](https://github.com/sindresorhus/globals) | `15.15.0` | `17.0.0` |
| [uuid](https://github.com/uuidjs/uuid) | `11.1.0` | `13.0.0` |


Updates `@types/node` from 22.18.13 to 25.0.3
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `eslint-config-prettier` from 8.10.2 to 10.1.8
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/commits/v10.1.8)

Updates `eslint-plugin-prettier` from 4.2.5 to 5.5.4
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v4.2.5...v5.5.4)

Updates `globals` from 15.15.0 to 17.0.0
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v15.15.0...v17.0.0)

Updates `uuid` from 11.1.0 to 13.0.0
- [Release notes](https://github.com/uuidjs/uuid/releases)
- [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/uuidjs/uuid/compare/v11.1.0...v13.0.0)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 25.0.3
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: major-deps-updates-main
- dependency-name: eslint-config-prettier
  dependency-version: 10.1.8
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: major-deps-updates-main
- dependency-name: eslint-plugin-prettier
  dependency-version: 5.5.4
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: major-deps-updates-main
- dependency-name: globals
  dependency-version: 17.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: major-deps-updates-main
- dependency-name: uuid
  dependency-version: 13.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: major-deps-updates-main
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-08 18:39:02 -08:00
Christian Bromann b999955b01 ci: secure workflows, add dependabot auto-update (#87)
* fix(examples): make it its own workspace

* skip integration tests for dependabot
2026-01-08 18:38:47 -08:00
Christian Bromann 5b911d9c8b refactor: colocate tests with implementations and add mode-based test runner (#90)
* feat: catch up with Python

* add example

* feat: add SDK Skills + Memory System

Port SDK Skills and Agent Memory features from Python PR 646.

* add example

* refactor: colocate tests with implementations and add mode-based test runner

* run integration tests in CI

* fix prettier issues in Windows

* fix globbing

* fix linting

* add dependabot file

* merge unit test workflow into ci

* pin and update CI

* increase timeout
2026-01-08 18:21:44 -08:00
Christian Bromann 8dec003748 feat: add SDK Skills + Memory System (#89)
* feat: catch up with Python

* feat: add SDK Skills + Memory System

Port SDK Skills and Agent Memory features from Python PR 646.

* prettier

* fix unit test for Windows

* add example

* format
2026-01-08 17:48:53 -08:00
Christian Bromann c53d7d7004 feat: add sandbox execution support for feature parity with Python deepagents (#88)
* feat: catch up with Python

* add unit tests

* add example

* format

* Potential fix for code scanning alert no. 7: Unsafe shell command constructed from library input

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* format

* make sure it is truly boolean

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-01-08 17:44:58 -08:00
killa e1e3003af7 feat: add CJS/ESM dual module support (#81)
- Add exports field in package.json for dual module support
- Configure tsdown to build both CJS and ESM formats
- Add post-build script to rename files to correct extensions
- Keep original tsconfig.json configuration
- Generate single-file outputs: index.cjs and index.mjs

Refs:
- https://github.com/langchain-ai/deepagentsjs/issues/75
- https://github.com/langchain-ai/deepagents/issues/557
2026-01-02 17:29:53 -08:00
github-actions[bot] 5cfb823592 chore: version packages 2025-12-11 17:20:02 +00:00
github-actions[bot] 5b2ea69edc chore: version packages 2025-12-02 01:51:30 +00:00
github-actions[bot] 092d8ae9a1 chore: version packages 2025-11-25 17:22:25 +00:00
Tat Dat Duong 73445c2b83 feat: add readRaw method to filesystem backend protocol 2025-11-24 23:45:43 +01:00
github-actions[bot] b5f1cd42b1 chore: version packages 2025-11-14 02:16:30 +00:00
Hunter Lovell 41f9a1b5d9 fix: thread config options to subagents
* adds config option to subagent invocations
* updates langchain and removes note about summarization middleware
* updates params to use more appropriate BaseLanguageModel class
2025-11-11 16:01:46 -08:00
github-actions[bot] 3df0bf27da chore: version packages (#48)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-05 13:56:37 -08:00
github-actions[bot] c166a4d830 chore: version packages (#46)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-05 13:40:11 -08:00
nhuang-lc 4b894f2d60 Set up changesets (#44) 2025-11-05 13:19:55 -08:00
David Duong 605e311a0a feat: rewrite deep agents on top of createAgent (#42)
* feat: migrate to createAgent API and middleware architecture

BREAKING CHANGE: Major refactor from custom LangGraph implementation to new langchain createAgent API

**Architecture Migration:**
- Replace createReactAgent with createAgent API from langchain package
- Migrate from custom state management to middleware-based architecture
- Remove custom DeepAgentState and model configuration in favor of built-in patterns

**Package Updates:**
- Upgrade to @langchain/anthropic@alpha, @langchain/langgraph@next
- Add langchain package as main dependency with createAgent support
- Update @langchain/core to local development version

**Code Reorganization:**
- Move tools from src/tools.ts to modular middleware pattern (src/middleware/)
- Simplify type definitions in src/types.ts with Zod schema validation
- Refactor src/subAgent.ts to use createAgent with middleware integration
- Update src/graph.ts and src/index.ts for new API patterns

**Removed Files:**
- src/state.ts: Custom state management no longer needed
- src/model.ts: Default model configuration handled by createAgent
- src/interrupt.ts: Interrupt handling integrated into middleware

**New Middleware System:**
- src/middleware/fs.ts: File system operations middleware
- src/middleware/todo.ts: Todo management middleware
- src/middleware/index.ts: Middleware exports and configuration

**Configuration:**
- Fix tsconfig.json extends path for @tsconfig/recommended
- Update examples/research/research-agent.ts for new API
- Upgrade TypeScript ESLint and other dev dependencies

This migration provides a more maintainable architecture with better separation of concerns
and aligns with the latest LangChain patterns for agent development.

* consolidate imports

* progress

* push remaining update

* fix ci

* cr

* fix

* add anthropicPromptCachingMiddleware

* prettier

* prettier

* allow sub agents to have middleware

* prettier

* Merge pull request #37 from wuchangming/cb/createAgent-migration

feat: Add a name property value to ToolMessage

* fix types

* First stab at porting deepagents

* Cleanup

* wip: middleware review

* Fix to work on LSD

* Use Zod 4

* Revert "Use Zod 4"

This reverts commit 2292cd27ae.

* fix: use store from runnable config

* Exclude `jumpTo` from subgraph state

* Auto-infer filesystem middleware

* Include `strict` in tests

* Further cleanup of test files

* Remove any, remove only

* Fix invalid types for filesystem

* Fix invalid condition

* Fix file system tests, make those concurrent

* Replace _getType with type

* Remove Annotation

* Cleanup rest of test files

* Bump to 1.0.0

* Use PNPM

* Fix scripts

* Build using tsdown

* Bump to 1.0.0-beta.1

* Update CI

* Update again

* Fix formatting

* Add stub prettierrc for VSCode

* Add pluggable filesystem

* linting

* Full test coverage

* Add coerce option

* Bump to 1.0.0-beta.2

* Bump to 1.0.0-beta.3

* Add windows to matrix

* Address comments

* Add examples

* tweak prompt

* Linting

* Remove checkpointer=False

* Add missing env files

* Update README

* add missing dev deps

* add lockfile

* Fix broken test

* Normalize paths for linux

* Fix tests to be OS agnostic

* Normalize for glob search

---------

Co-authored-by: Christian Bromann <git@bromann.dev>
Co-authored-by: Wu Changming <wuchangmingnice@163.com>
Co-authored-by: Nick Huang <nick@langchain.dev>
Co-authored-by: Hunter Lovell <hunter@hntrl.io>
2025-11-05 11:52:40 -08:00
Palash Shah 3a830fa72d release: update package to 0.0.2 2025-08-29 12:58:25 -04:00
Palash Shah c46f7d73c0 nit: update package version 2025-08-29 12:42:51 -04:00
bracesproul 457bb226cf chore: Bump langgraph version 2025-08-25 16:57:07 -07:00
Palash Shah 42200daf4f fix: upate build 2025-08-13 20:55:12 -04:00
Palash Shah a0d52eb1d5 fix: update name to correct npm 2025-08-12 14:04:13 -04:00
Palash Shah 8e7776ce68 0.0.0-rc 2025-08-12 13:54:50 -04:00
bracesproul 9fbdfa752f fix tavily and readme 2025-08-05 13:22:24 -07:00
bracesproul 2ee230c75d cr 2025-08-05 13:12:26 -07:00
bracesproul f32c79036f chore: Fixes before release 2025-08-05 11:47:34 -07:00
Palash Shah 865d2e4d53 fix: formatting 2025-08-05 11:25:34 -04:00
Palash Shah 79e800e74f format: add eslint 2025-08-05 10:25:41 -04:00
bracesproul 0cec17c267 fix build 2025-08-04 14:15:50 -07:00
open-swe[bot] e6f5ed88df Apply patch [skip ci] 2025-08-04 18:35:42 +00:00
open-swe[bot] d972ed936a Apply patch [skip ci] 2025-08-04 18:10:02 +00:00