LangChain Integration
LangChain Integration
Section titled “LangChain Integration”Use HydraSkill with LangChain’s web tools for reliable agent browsing.
pip install hydraskill langchain langchain-communityWith WebBaseLoader
Section titled “With WebBaseLoader”from hydraskill import ProxyClientfrom langchain_community.document_loaders import WebBaseLoader
client = ProxyClient()proxy = client.get_proxy(target="example.com", session_lock=True)
loader = WebBaseLoader( "https://example.com/article", proxies=proxy.to_dict())docs = loader.load()With Browser Tools
Section titled “With Browser Tools”from langchain.tools import Toolfrom hydraskill import ProxyClient
client = ProxyClient()
def browse_with_proxy(url: str) -> str: proxy = client.get_proxy(target=url) response = requests.get(url, proxies=proxy.to_dict()) return response.text
browse_tool = Tool( name="browse", func=browse_with_proxy, description="Browse a URL with proxy protection")Benefits for LangChain Agents
Section titled “Benefits for LangChain Agents”- Agents can browse any website without IP blocks
- Long-running research tasks maintain session continuity
- Multi-step web interactions don’t get interrupted
- No need to add retry logic in your agent code