# LangChain.js 1.5.19: our test log

Canonical: https://theagenticweekly.com/tests/langchainjs · Last verified: 2026-10-25 · Published: 2026-10-25 · Author: Agentic Weekly (operated independently from Texas, US) · Evidence: Tested by us on 2026-10-25. Local open-weight model, not the vendor's hosted models. A smoke test on a CPU-only box, not a benchmark.

> LangChain.js 1.5.19 passed our one-tool task 3 of 3 on Node 20 and 3 of 3 on Node 24; about 101 MB in 36 packages.

## Result at a glance

Table: LangChain.js test record

| Field | Value |
|---|---|
| Result | Passed |
| Version tested | 1.5.19 |
| Date and time | 2026-10-25, 22:44 to 22:45 CDT (America/Chicago) |
| Task | Give a local model one function tool, add_numbers(a, b), and ask it to use that tool to compute 17 + 25 and report the result. Pass means the function was called with 17 and 25 and the final answer contains 42. Run on Node 20.19.2 and again on Node 24.22.1 (which can resolve newer package versions). |
| Model used | Qwen2.5-3B-Instruct (Q4_K_M) through Ollama 0.40.11 |
| Hardware | Linux x86_64 virtual machine (Debian 13), 8 vCPU (Intel Xeon, 1 thread per core), 15 GiB RAM, no GPU |
| Install, Node 20 | 3.7 s, 101 MB, 36 packages, version 1.5.19 |
| Install, Node 24 | 4.0 s, 115 MB, 36 packages, version 1.5.19 |
| Node 20, default sampling | 3 of 3 passed (load 6.5 to 6.6) |
| Node 24, default sampling | 3 of 3 passed (load 7.4 to 7.4) |

## What we found

- 3 of 3 on Node 20 and 3 of 3 on Node 24 using createAgent from langchain 1.5.19.
- Install size is about 100 MB in 36 packages on both Node versions, roughly four times the Vercel AI SDK.

## What we ran, step by step

Table: Commands run, wall-clock time and exit code

| Step | Wall time | Exit code | Notes |
|---|---|---|---|
| npm install on Node 20.19.2 (cold, empty cache) | 3.7 s | 0 | Resolved 1.5.19; 101 MB in 36 packages; load 3.99. |
| npm install on Node 24.22.1 (cold, empty cache) | 4 s | 0 | Resolved 1.5.19; 115 MB in 36 packages; load 1.51. |
| Task command (all trials) | n/a | n/a | Run inside the install directory; script shown below. |
| Node 20, default sampling, trial 1 | 2.8 s | 0 | PASS: [[17, 25]] -> The result of adding 17 and 25 is 42. |
| Node 20, default sampling, trial 2 | 3.2 s | 0 | PASS: [[17, 25]] -> The result of adding 17 and 25 is 42. |
| Node 20, default sampling, trial 3 | 2.8 s | 0 | PASS: [[17, 25]] -> The result of adding 17 and 25 is 42. |
| Node 24, default sampling, trial 1 | 2.9 s | 0 | PASS: [[17, 25]] -> The result of adding 17 and 25 is 42. |
| Node 24, default sampling, trial 2 | 3 s | 0 | PASS: [[17, 25]] -> The result of adding 17 and 25 is 42. |
| Node 24, default sampling, trial 3 | 2.6 s | 0 | PASS: [[17, 25]] -> The result of adding 17 and 25 is 42. |

Exact commands (paths shortened)

```
# npm install on Node 20.19.2 (cold, empty cache)
cd work/npm/langchainjs && npm install --no-audit --no-fund --cache /tmp/npmcache --loglevel=error langchain @langchain/openai @langchain/core zod

# npm install on Node 24.22.1 (cold, empty cache)
cd work/npm24/langchainjs && npm install --no-audit --no-fund --cache /tmp/npmcache --loglevel=error langchain @langchain/openai @langchain/core zod

# Task command (all trials)
node task.mjs
```

## Raw output (excerpts)

task.mjs for this test

```
import { createAgent, tool } from "langchain";
import { ChatOpenAI } from "@langchain/openai";
import { z } from "zod";
const calls = [];
const add = tool(async ({ a, b }) => { calls.push([a, b]); return String(a + b); }, { name: "add_numbers", description: "Add two integers and return the sum.", schema: z.object({ a: z.number(), b: z.number() }) });
const agent = createAgent({ model: new ChatOpenAI({ model: "qwen2.5-3b", temperature: 0, apiKey: "ollama", configuration: { baseURL: "http://127.0.0.1:11434/v1" } }), tools: [add] });
const r = await agent.invoke({ messages: [{ role: "user", content: "Use the add_numbers tool to compute 17 + 25, then tell me the result." }] });
const final = String(r.messages.at(-1).content);
const ok = calls.some(([a, b]) => (a === 17 && b === 25) || (a === 25 && b === 17)) && final.includes("42");
console.log("RESULT_JSON " + JSON.stringify({ calls, final: final.slice(0, 300), ok }));
```

## Gotchas and things that broke

- The agent API is createAgent from the langchain package, not the older AgentExecutor patterns shown in many tutorials.

## What we did not test

- Any vendor-hosted model: everything ran against one local 3B model.
- Multi-agent flows, memory, streaming and deployment.
- Anything beyond one tool and one question; five trials is a smoke test, not a benchmark.

## Reproduce it

Versions change. These commands install whatever is latest on the day you run them unless a version is pinned, so expect different results later. The version we measured is in the table above.

```
# serve a tool-calling local model at http://127.0.0.1:11434/v1 (we used Ollama with Qwen2.5-3B-Instruct, model name qwen2.5-3b)
mkdir t && cd t && npm init -y && npm install langchain @langchain/openai @langchain/core zod
# save task.mjs (above) and run it:
node task.mjs
```

## How to read this test

Every number on this page was measured on this one machine, which also ran other jobs, so timings are indicative and vary run to run. A pass means our small task worked once or as stated, a fail means it did not work as we ran it; neither says how the tool behaves with a vendor's frontier model, on a GPU, or at scale. Where a tool could not run without an account or a GPU, we say so instead of guessing.

See the [testing rig](https://theagenticweekly.com/methodology#testing-rig) for the hardware, the local model and the rules we follow, and the [test hub](https://theagenticweekly.com/tests) for every other test.

## FAQ

### Does LangChain.js work with a local model?

For this one task it did once the sampling temperature was pinned to 0; see the findings for what happened without that.

### What Node version does LangChain.js need?

See the gotchas: we measured the resolved version on Node 20 and Node 24 and they differ for some packages.

## Related

- [All test logs](https://theagenticweekly.com/tests)
- [Methodology and testing rig](https://theagenticweekly.com/methodology#testing-rig)
- [Study: install size and first-task results across 16 frameworks](https://theagenticweekly.com/research/agent-framework-install-and-first-task)
- [Study: the silent version downgrade on older Node, and other install traps](https://theagenticweekly.com/research/older-node-silent-downgrades)
- [LangChain facts and sources](https://theagenticweekly.com/tools/langchain)

## How to cite

Agentic Weekly, "LangChain.js 1.5.19: our test log", last updated 2026-10-25, https://theagenticweekly.com/tests/langchainjs
