CrewAI 整合
CrewAI 整合
Section titled “CrewAI 整合”用 HydraSkill 為你的 CrewAI agent 提供可靠的網路存取。
pip install hydraskill crewai crewai-tools自訂 Tool
Section titled “自訂 Tool”from crewai_tools import BaseToolfrom hydraskill import ProxyClientimport requests
class ProxiedWebTool(BaseTool): name: str = "Proxied Web Browser" description: str = "Browse any URL with proxy protection against IP blocks"
def _run(self, url: str) -> str: client = ProxyClient() proxy = client.get_proxy(target=url, auto_heal=True) response = requests.get(url, proxies=proxy.to_dict()) proxy.release() return response.text[:5000]
# 在你的 crew 中使用researcher = Agent( role="Web Researcher", tools=[ProxiedWebTool()], goal="Research competitor pricing without getting blocked")