New integration: langchain-w2a — LangChain tools for W2A-enabled websites

Hi LangChain team,

I’ve built and published langchain-w2a - a LangChain integration for the Web2Agent Protocol (W2A).

pip install langchain-w2a

What it does

W2A is an open standard where websites declare their capabilities at /.well-known/agents.json. langchain-w2a turns those declared skills into typed LangChain tools automatically.

from langchain_w2a import W2AToolkit
toolkit = await W2AToolkit.from_url(“``w2a-protocol.org``”)
tools = toolkit.get_tools()
#Returns one BaseTool per skill, with Pydantic input schemas
#built from the site’s declared inputs

Two tool types

  1. W2AToolkit — one typed tool per skill for a known site
  2. W2ADiscoverTool + W2ASkillTool — generic tools for unknown sites

Why it’s useful for LangChain agents

Right now agents that need to interact with external websites either crawl them blind (40-50 requests) or require custom integrations per site. W2A gives any website a machine-readable capability declaration. langchain-w2a turns that into tools your agent can use immediately.

Links

Happy to open a formal PR if this is the right approach, or adjust the implementation based on your feedback.

The package follows LangChain’s integration patterns : BaseTool, BaseToolkit, Pydantic schemas, async _arun support.

Thanks for building LangChain.