--- title: CrewAI | Lightcone description: Add Lightcone browser automation as a tool for CrewAI multi-agent workflows. --- Use Lightcone as a [CrewAI](https://crewai.com) tool to give your agents the ability to browse the web, fill forms, take screenshots, and extract data. ## Install Terminal window ``` pip install crewai tzafon ``` ## Example ``` from crewai import Agent, Task, Crew from crewai.tools import BaseTool from tzafon import Lightcone class LightconeBrowserTool(BaseTool): name: str = "browser" description: str = ( "Browse a website and return a screenshot URL. " "Input should be a URL to visit." ) def _run(self, url: str) -> str: client = Lightcone() with client.computer.create(kind="browser") as computer: computer.navigate(url) computer.wait(2) result = computer.screenshot() return computer.get_screenshot_url(result) # Create an agent with the browser tool researcher = Agent( role="Web Researcher", goal="Find information on websites", backstory="You are a skilled web researcher.", tools=[LightconeBrowserTool()], ) task = Task( description="Visit https://news.ycombinator.com and describe the top 3 stories", expected_output="A summary of the top 3 stories on Hacker News", agent=researcher, ) crew = Crew(agents=[researcher], tasks=[task]) result = crew.kickoff() print(result) ``` ## How it works The integration wraps Lightcone’s browser actions into a CrewAI `BaseTool`. When a CrewAI agent decides it needs to visit a website, it calls the tool, which: 1. Creates a Lightcone browser session 2. Navigates to the URL 3. Takes a screenshot and returns the URL 4. Terminates the session You can extend the tool to support more actions (clicking, typing, form filling) based on your workflow needs. ## Resources - [CrewAI custom tools documentation](https://docs.crewai.com/en/tools/integration/overview) - [CrewAI GitHub](https://github.com/crewaiinc/crewai) ## See also - [**LangChain**](/integrations/langchain/index.md) — document loader and browser tool for LangChain - [**Vercel AI SDK**](/integrations/vercel-ai/index.md) — Lightcone tools for TypeScript agents - [**Run an agent**](/guides/run-an-agent/index.md) — use Lightcone’s built-in agent instead