CrewAI Integration
Add website intelligence to your CrewAI agents with a custom tool.
Tool Definition
from crewai_tools import BaseTool
import requests
class WebsiteIntelligenceTool(BaseTool):
name: str = "Website Intelligence"
description: str = (
"Analyze any website URL and return structured data about the company, "
"including tech stack, contact info, social links, and trust signals."
)
def _run(self, url: str) -> dict:
response = requests.post(
"https://theindex.dev/api/v1/analyze",
json={"url": url},
headers={"Authorization": "Bearer idx_live_YOUR_KEY"}
)
return response.json()Usage with CrewAI
from crewai import Agent, Task, Crew
intel_tool = WebsiteIntelligenceTool()
researcher = Agent(
role="Company Researcher",
goal="Research companies and extract key intelligence",
backstory="Expert at analyzing websites and companies.",
tools=[intel_tool]
)
task = Task(
description="Research vercel.com and summarize their tech stack and contact info.",
agent=researcher,
expected_output="A summary of Vercel's technology and contact information."
)
crew = Crew(agents=[researcher], tasks=[task])
result = crew.kickoff()