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
- W2AToolkit — one typed tool per skill for a known site
- 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
- PyPI: Client Challenge
- W2A spec: GitHub - Nijjwol23/w2a: The open standard for agent-readable websites. agents.json — like robots.txt, but for AI agents. · GitHub
- Live demo: W2A — Generate & Validate
- Research paper: The Agent Discovery Problem — W2A Protocol
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.