langchain-quickjs
JavaScript REPL middleware for deepagents
Decision gist · record as of 2026-08-14
Yes, if you are building deepagents-based agents and need to reduce model round-trips for orchestrated tool use. The low install friction, active maintenance, and permissive MIT license make it a straightforward addition. The 16-day-old release and alpha status mean expect occasional breaking changes; verify that the default timeouts and memory limits suit your workload before production use.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.11+; must use ainvoke (async) rather than sync invoke when PTC bridges are registered, or ConcurrentEvalError is raised.
- Low friction: ships as a prebuilt wheel for CPython 3.11+ on macOS, Linux, and Windows.
- Active maintenance with recent releases; 27774 repository stars suggest established backing.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in commercial and private projects with minimal obligations.
last release 2026-07-29 (16 days) · last repo commit 2026-08-14 · 27,774 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 198,124 downloads/mo, #9,739 on PyPI
Alternatives
Verify before relying
from deepagents import create_deep_agent
from langchain_quickjs import CodeInterpreterMiddleware
agent = create_deep_agent(
model="claude-sonnet-4-6",
middleware=[CodeInterpreterMiddleware()],
)
result = await agent.ainvoke({"messages": [{"role": "user", "content": "..."}]})- Whether the 64 MiB default memory limit and 5 s timeout are tunable per-agent or only globally configurable.
- Exact concurrency cap for subagent dispatching mentioned as 'per REPL' but not quantified.
- Whether PTC host-function budget of 256 calls can be tuned or only disabled entirely.
What it is and what it does
langchain-quickjs is a middleware for deepagents that injects a persistent, sandboxed JavaScript REPL into an agent's tool set. Instead of the model issuing N serial tool calls, it can write one JavaScript block that orchestrates work in-loop—variables and functions persist across calls, Promise.all runs concurrent work, and configured subagents are dispatchable as await task({...}). The REPL runs in a QuickJS context with no ambient capabilities (no filesystem, network, or real clock), but can explicitly call into the agent's own tools via programmatic tool calling (PTC).
The middleware registers an eval tool, appends a system-prompt snippet explaining sandbox semantics, and gives each LangGraph thread_id its own QuickJS Runtime so conversations remain isolated. Persistence modes control how far state reaches: thread (default, survives across turns), turn (within a turn only), or call (fresh per eval). Each call has a wall-clock timeout (default 5 s) and the runtime has a shared memory limit (default 64 MiB); PTC calls are budgeted at 256 per eval by default. Results and console output are independently truncated before returning to the model.
Use it for
- Loop over a list and call tools per item without round-tripping to the model between iterations.
- Run multiple independent tool calls concurrently using Promise.all and orchestrate filtering or aggregation in one eval.
- Dispatch multiple subagents in parallel, filter results, and synthesize them in JavaScript before returning to the parent.
- Compute intermediate state between tool calls (aggregate, dedupe, format) without leaving the REPL.
- Reuse state across several turns by persisting variables and functions in thread mode.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are building deepagents-based agents and need to reduce model round-trips for orchestrated tool use.
The low install friction, active maintenance, and permissive MIT license make it a straightforward addition. The 16-day-old release and alpha status mean expect occasional breaking changes; verify that the default timeouts and memory limits suit your workload before production use.
Install
langchain-quickjs on PyPI
Before you install
Low friction: ships as a prebuilt wheel for CPython 3.11+ on macOS, Linux, and Windows. Active maintenance with recent releases; 27774 repository stars suggest established backing.
Requires Python 3.11+; must use ainvoke (async) rather than sync invoke when PTC bridges are registered, or ConcurrentEvalError is raised.
License in practice
MIT license permits unrestricted use, modification, and distribution in commercial and private projects with minimal obligations.
Quickstart
from deepagents import create_deep_agent
from langchain_quickjs import CodeInterpreterMiddleware
agent = create_deep_agent(
model="claude-sonnet-4-6",
middleware=[CodeInterpreterMiddleware()],
)
result = await agent.ainvoke({"messages": [{"role": "user", "content": "..."}]})
Verify before relying
- Whether the 64 MiB default memory limit and 5 s timeout are tunable per-agent or only globally configurable.
- Exact concurrency cap for subagent dispatching mentioned as 'per REPL' but not quantified.
- Whether PTC host-function budget of 256 calls can be tuned or only disabled entirely.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <4.0,>=3.11 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 6 packagesbsdiff4deepagentslangchain-corelangchainlanggraphquickjs-rs |
| Maintenance | Actively maintained 16 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 198,124 / month, #9,739 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13 |
Evidence: langchain_quickjs-0.3.5-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “javascript repl for agents”
- langchain-quickjsAdds a persistent, sandboxed JavaScript REPL tool to deepagents…
- bash_kernelEnables running and interacting with bash commands directly inside…
- pairmuxpairmux lets AI agents control interactive terminal programs through…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also deepagents-cli · deepagents · quickjs-rs · langchain-cli · deepagents-code · langchain-modal · quickjs · deepagents-acp · quickjs-ng