콘텐츠로 이동

LangChain 연동

LangChain의 웹 도구와 함께 HydraSkill을 사용해 안정적인 에이전트 브라우징을 구현하세요.

pip install hydraskill langchain langchain-community
from hydraskill import ProxyClient
from 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()
from langchain.tools import Tool
from 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"
)
  • 에이전트가 IP 차단 없이 어떤 웹사이트든 탐색할 수 있습니다
  • 장시간 실행되는 리서치 작업에서 세션 연속성을 유지합니다
  • 다단계 웹 상호작용이 중단되지 않습니다
  • 에이전트 코드에 재시도 로직을 추가할 필요가 없습니다