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.

Hey @Nijjwol23 much appreciated, contributions are always welcome! Requesting to please follow our contributing guide so we can take a look.

Hi Niloy,

Thanks for taking the time to review this. I just wrapped up all four steps from the contributing guide.

Ready for review:
Step 1 — Independent package - ✓
langchain-w2a v0.2.0 published as standalone package.
Follows BaseTool + BaseToolkit patterns with Pydantic v2 schemas.

Step 2 — Standard tests - ✓
Implemented langchain_tests.unit_tests.ToolsUnitTests for both W2ADiscoverTool and W2ASkillTool. All 12 standard tests pass (test_init, test_has_input_schema, test_input_schema_matches_invoke_params,
test_no_overrides_DO_NOT_OVERRIDE, etc.) with 0 warnings. Also added ToolsIntegrationTests that run against the live W2A site.

Step 3 — Published to PyPI - ✓
https://pypi.org/project/langchain-w2a/0.2.0/

Step 4 — Documentation PR - ✓
https://github.com/langchain-ai/docs/pull/4021 Adds src/oss/python/integrations/tools/w2a.mdx using the tools template, plus W2A entry in the index.mdx “All tools and toolkits” section.

Brief summary of what the integration does:

  • W2A is an open standard for agent-readable websites and sites declare their skills, inputs, outputs, and auth at /.well-known/agents.json
  • langchain-w2a turns any W2A-enabled site’s declared skills into typed LangChain tools at runtime
  • W2AToolkit.from_url() returns one BaseTool per skill, with Pydantic input schemas built from the site’s manifest
  • Apache 2.0, optionally A2A-compatible via the a2a_profile block

Happy to address any feedback on the PR or here. Thanks for reviewing.

Repo: github.com/Nijjwol23/w2a
Spec: w2a-protocol.org

Best,
Nijjwol