Open-source project
langchain-ai/deepagentsjs avatar
langchain-ai/deepagentsjs

deepagentsjs: the batteries-included agent harness for TypeScript

The batteries included agent harness.

1,557 stars272 forksTypeScriptMIT

At a glance

What is it?
deepagentsjs ships a working LangGraph agent with planning, filesystem tools and sub-agents already wired up. It is fast to start and deliberately thin on safety rails, so the boundary you get is the boundary you build.
Who is it for?
Adopt deepagentsjs if you want a LangGraph agent with planning, file tools and sub-agent delegation already assembled, and you are willing to enforce permissions at the tool or sandbox layer yourself. Do not adopt it if you need a read-only assistant, a fixed workflow, or a harness that refuses risky actions on its own, because the security policy explicitly trusts the model.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What deepagentsjs solves, and who ends up using it

Most agent projects start the same way. You pick a model, write a system prompt, register a handful of tools, and then spend the next two weeks rebuilding the same scaffolding: a task list the model can update, a way to stash intermediate results somewhere the context window can reach, and some mechanism for splitting a long job into pieces. deepagentsjs exists to skip that phase. The README calls it an opinionated, ready-to-run agent, and the package description in the monorepo package.json says it is a library for building controllable AI agents with LangGraph.

The intended user is a TypeScript developer who already accepts LangGraph as the runtime. The project is not trying to be framework-neutral. It is a layer on top of LangGraph that pre-assembles a specific set of behaviours, and the value comes from that specificity. If you have never used LangGraph, the harness still works, but you inherit a dependency you did not choose.

The tools it ships are the ones that show up in almost every long-horizon agent: write_todos for task breakdown, read_file, write_file, edit_file, ls, glob and grep for working memory, and task for delegating work to sub-agents with isolated context windows. None of these are novel on their own. The claim is that the defaults around them make them useful without tuning.

How the harness is assembled: LangGraph graph, middleware, backends

createDeepAgent returns a compiled LangGraph graph. That single sentence explains most of the architecture. Everything LangGraph offers, including streaming, checkpointers, and the Studio debugger, applies to the object you get back, because there is no wrapper hiding it. The README states this directly under the LangGraph Native heading.

The second architectural fact is the backend split. The package publishes environment-specific entrypoints. The default deepagents entrypoint is the Node.js one and exposes the full API, including FilesystemBackend. The deepagents/browser entrypoint is the recommended browser import and deliberately omits Node-only exports. There is also an explicit deepagents/node entrypoint with the same full API as the default, for cases where you want the import path to be unambiguous. If you are building for the browser and you import from the root package, you are importing from the wrong place.

The third piece is middleware. The README refers to built-in prompt and middleware that make the tools useful out of the box, and the customization example shows only model, tools and systemPrompt being overridden at the top level. The middleware layer is where the planning and context-management behaviour lives, and it is the part you will be reading source for if the defaults fight your use case.

Installing deepagents from npm and running a first agent

Installation is a normal npm install. The README lists npm, pnpm and yarn as equivalent options.

bash
npm install deepagents

The trap is peer dependencies. The README marks this as important: deepagents declares the LangChain runtime packages as peer dependencies so that your application controls their versions and everything resolves to a single shared copy. npm 7 and later and pnpm 8 and later install them automatically. Yarn does not, and the README gives the explicit list.

bash
yarn add @langchain/core @langchain/langgraph @langchain/langgraph-checkpoint @langchain/langgraph-sdk langchain langsmith

With that resolved, the smallest working agent is four lines of setup. The README gives exactly this example.

typescript
import { createDeepAgent } from "deepagents";

const agent = createDeepAgent();

Calling it with no arguments gives you the default model and the default tool set. The invocation shape is the LangGraph one: you pass an object with a messages array, and each message has a role and content. The README's example asks the agent to research LangGraph and write a summary into summary.md, which exercises the planning tool and the file-writing tool in one request. What you should see is a result object whose messages include tool calls for write_todos and write_file before the final assistant turn.

For a real project you will want a model you control and a system prompt that matches your domain. The customization example imports ChatOpenAI from @langchain/openai and passes a model instance, a tools array, and a systemPrompt string into createDeepAgent. The .env.example at the repository root lists ANTHROPIC_API_KEY and TAVILY_API_KEY, which tells you the examples lean on Anthropic models and Tavily search rather than any single provider.

The trust-the-LLM security model is the real limitation

The security section of the README is short and unusually blunt. Deep Agents follows what it calls a trust the LLM model. The agent can do anything its tools allow. The README's own instruction is to enforce boundaries at the tool or sandbox level, not by expecting the model to self-police.

Read that against the shipped tool list and the consequence is concrete. write_file and edit_file are on by default. There is no documented permission prompt, no approval step, and no dry-run mode. An agent that decides the right move is to edit a configuration file will edit it, and the harness will not ask. If your deployment target is a developer's working directory, the blast radius is whatever that developer can write to.

The examples directory shows the intended answer rather than a code-level one. There is an examples/sandbox directory and an examples/backends directory, and the package publishes @langchain/sandbox-standard-tests. The pattern the project points at is running the agent against a backend that is not your real filesystem. That is a sound design, but it moves the work to you. A harness that ships a sandbox and a harness that ships the hooks to build one are different products, and this is the second.

The other failure mode is quieter. Sub-agents get isolated context windows, which is the point, but isolation also means the parent agent sees a summary rather than the reasoning. When a sub-agent goes down a wrong path, the parent's context contains the conclusion and not the evidence. Debugging that requires the LangGraph traces, not the final message list.

Where deepagentsjs is the wrong tool, and what to use instead

If your task is a fixed sequence of steps with known inputs, an agent harness is overhead. A chain of calls with a schema-validated output at each stage is cheaper, deterministic, and testable without a model in the loop. deepagentsjs earns its place when the number of steps is not known in advance and the model needs to decide what to do next.

The more interesting comparison is with the Python package. The README links to langchain-ai/deepagents for Python users, and the two projects share a name and a concept but not an implementation. The practical difference is the host runtime and the ecosystem around it. If your data tooling is pandas and your deployment is a Python service, the Python package is the obvious pick and the TypeScript one is not a substitute. If your application is a Node service or a browser front end, the reverse holds. The JavaScript package is the only one of the two that publishes a browser entrypoint, which matters if the agent has to run client-side.

The third alternative is to build directly on LangGraph. That is what deepagentsjs does internally. Choosing the harness means accepting its middleware defaults and its tool names in exchange for not writing them. The trade is reasonable at the start and becomes less so as your requirements diverge from the defaults, at which point you are configuring around a layer rather than using it.

Versioning, release cadence and the MIT licence

The repository is a pnpm monorepo. The root package.json is private and versioned 0.0.0, and the release script runs pnpm build followed by changeset publish. Versioning goes through Changesets, with @changesets/cli and @changesets/changelog-github in devDependencies and a .changeset directory at the top level. Practically, that means the published packages move independently. The recent releases show deepagents at 1.13.4, deepagents-acp at 0.1.30, and @langchain/sandbox-standard-tests at 2.0.1, all published on 2026-09-09. The ACP package is still on a 0.x line, so treat its API as unsettled.

Upgrade cost depends on which surface you touch. If you use createDeepAgent with default tools, the surface is small and the peer dependency arrangement means runtime packages move on your schedule. If you import from deepagents/browser, the entrypoint split is a compatibility boundary you have to respect on every upgrade. If you build custom middleware, you are coupled to internals the README does not document, and the README does not describe a middleware API or a stability guarantee for one.

The licence is MIT, declared in the root package.json and shown in the README badge. MIT permits commercial use and modification. It also means there is no patent grant and no warranty, so the security posture described above is entirely your responsibility to manage. That is a factual consequence of the licence text, not legal advice; if your organisation has a policy on agent tooling, route it through whoever owns that policy.

The last push to the repository was on 2026-09-14, one day before the release of 1.13.4.

Editorial conclusion

Adopt deepagentsjs if you want a LangGraph agent with planning, file tools and sub-agent delegation already assembled, and you are willing to enforce permissions at the tool or sandbox layer yourself. Do not adopt it if you need a read-only assistant, a fixed workflow, or a harness that refuses risky actions on its own, because the security policy explicitly trusts the model. Before you commit, verify three things: that your package manager installs the peer dependencies cleanly, that your runtime tolerates the write_file and edit_file tools, and that createDeepAgent returns a graph your existing streaming and checkpointer setup can consume.

Frequently asked questions

What is LangChain Deep Agents and what can it do?

Deep Agents is described in the README as an agent harness: an opinionated, ready-to-run agent you get out of the box instead of wiring prompts, tools and context management yourself. It ships planning through write_todos, filesystem tools including read_file, write_file, edit_file, ls, glob and grep, and sub-agent delegation through task.

When should I use Deep Agents?

The README positions it for cases where you would otherwise build the scaffolding around a tool-calling model yourself, and it is explicit that it follows a trust the LLM model where the agent can do anything its tools allow. Use it when the task length is not known in advance and you can enforce boundaries at the tool or sandbox level.

How do I install Deepagents?

Run npm install deepagents, or pnpm add deepagents, or yarn add deepagents. The README notes that the LangChain runtime packages are peer dependencies, and that Yarn users must add @langchain/core, @langchain/langgraph, @langchain/langgraph-checkpoint, @langchain/langgraph-sdk, langchain and langsmith explicitly.

Official sources

  1. langchain-ai/deepagentsjs on GitHub
  2. License: MIT
  3. Project website
  4. README
  5. Releases
Community notes

Community notes