Integraciones
AutoGen
Dale a los agentes de Microsoft AutoGen un lector web impulsado por Thunderbit
Los agentes de AutoGen aceptan funciones Python como Tools. Envuelve /distill y cualquier AssistantAgent (o miembro de un GroupChat) podrá obtener contenido web en vivo.
Instalación
pip install pyautogen httpxFunction tool
import httpx
API = "https://openapi.thunderbit.com/openapi/v1"
H = {"Authorization": "Bearer YOUR_API_KEY"}
def read_url(url: str) -> str:
"""Fetch a URL and return clean Markdown.
Use for any web research task: docs, articles, search results, product pages.
"""
resp = httpx.post(f"{API}/distill",
headers=H,
json={"url": url, "renderMode": "basic"},
timeout=60.0)
resp.raise_for_status()
return resp.json()["data"]["markdown"]Registrar con un Agent
from autogen import AssistantAgent, UserProxyAgent
llm_config = {"model": "gpt-4o", "api_key": "YOUR_OPENAI_KEY"}
researcher = AssistantAgent(name="researcher", llm_config=llm_config)
proxy = UserProxyAgent(name="proxy", code_execution_config=False)
researcher.register_for_llm(name="read_url", description="Fetch URL as Markdown")(read_url)
proxy.register_for_execution(name="read_url")(read_url)
proxy.initiate_chat(researcher, message="Summarize https://arxiv.org/abs/2501.00001")GroupChat
Para crews multi-agente (researcher + writer + critic), registra read_url solo en el register_for_llm del researcher para que los demás Agents no puedan invocarlo. La ejecución sigue pasando por el UserProxyAgent compartido.
Relacionado
- CrewAI — patrón multi-agente similar
- Tool Agent Read-URL