npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@unbrowse/langchain-js

v0.1.0

Published

Unbrowse as native LangChain JS tools. Three tools (resolve, execute, search) shaped exactly like LangChain's StructuredTool/DynamicStructuredTool — { name, description, schema (JSON Schema), invoke, call }. No zod dependency. Pass your own @langchain/cor

Readme

@unbrowse/langchain-js

Unbrowse as native LangChain JS tools.

This is the JavaScript / TypeScript adapter for @langchain/core (a separate Python package, unbrowse-langchain, exists for the Python ecosystem).

It exposes three tools, shaped exactly like LangChain's StructuredTool / DynamicStructuredTool runtime surface — { name, description, schema, invoke(input), call(input) }:

| tool | input | does | | ----------------- | ------------------------------ | ----------------------------------------------------------- | | unbrowse_resolve| { url, intent } | resolve an intent + URL to a ranked endpoint shortlist | | unbrowse_execute| { endpoint_id, params? } | execute a resolved endpoint | | unbrowse_search | { query, url? } | resolve + execute, synthesized into ranked results |

schema is a plain JSON Schema object, so this package has no zod dependency. invoke is the modern Runnable method; call is the legacy alias — both are provided and both return a JSON string (LangChain tools return strings).

Install

npm install @unbrowse/langchain-js

Use — register with an agent

import { unbrowseTools } from '@unbrowse/langchain-js';
import { createReactAgent } from '@langchain/langgraph/prebuilt';
import { ChatOpenAI } from '@langchain/openai';

const llm = new ChatOpenAI({ model: 'gpt-4o' });

// Bind Unbrowse's tools straight into the agent's tools array:
const agent = createReactAgent({ llm, tools: unbrowseTools });

const out = await agent.invoke({
  messages: [{ role: 'user', content: 'Find the latest docs on x402 and summarize.' }],
});

You can also call a single tool directly:

import { unbrowseSearchTool } from '@unbrowse/langchain-js';

const json = await unbrowseSearchTool.invoke({ query: 'x402 payment spec' });
const results = JSON.parse(json);

Branded DynamicStructuredTool instances

unbrowseTools already matches LangChain's tool shape and works wherever a tools array is accepted. If you want genuine, branded DynamicStructuredTool instances (for type checks, tracing, or strict runtime guards), pass your own tool helper from @langchain/core:

import { tool } from '@langchain/core/tools';
import { createUnbrowseTools } from '@unbrowse/langchain-js';

const tools = createUnbrowseTools({ tool }); // 3 real DynamicStructuredTool instances

This package does not import @langchain/core itself — you supply the tool helper you already depend on, keeping this adapter dependency-free.

Configuration

| env | default | meaning | | -------------------------------- | -------------------------------- | ------------------------------------------ | | UNBROWSE_API_URL / UNBROWSE_BASE | https://beta-api.unbrowse.ai | Unbrowse API base | | UNBROWSE_API_KEY | — | Bearer auth | | UNBROWSE_X_PAYMENT / X_PAYMENT | — | x402 payment header | | UNBROWSE_DRYRUN=1 | — | deterministic offline result, no network |

License

MIT