> ## Documentation Index
> Fetch the complete documentation index at: https://docs.narada.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Screenshots

> Learn how to take screenshots and save them locally using the Narada Python SDK

## Take Screenshots with Narada SDK

The Narada Python SDK makes it easy to capture screenshots of web pages during automation tasks. When you ask Narada to take a screenshot, it automatically saves the image to your local Downloads folder with a timestamped filename for easy organization.

<Frame>
  <iframe
    width="100%"
    height="400px"
    src="https://www.youtube.com/embed/4JfFPRqlFGo"
    title="Narada Screenshot Demo"
    frameBorder="0"
    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
    allowFullScreen
    style={{
  width: "100%",
  minHeight: "400px",
  borderRadius: "0.5rem",
}}
  />
</Frame>

## How to Take Screenshots with the SDK

<Steps>
  <Step title="Basic Screenshot Capture">
    Use the SDK to capture screenshots with a simple command:

    ```python theme={null}
    import asyncio

    from narada import Agent, BrowserEnvironment

    async def main() -> None:
        env = BrowserEnvironment()
        agent = Agent(environment=env)

        try:
            # Take a screenshot of the current page
            response = await agent.run(
                prompt='take a screenshot of this page'
            )

            print("Screenshot captured!")
            print("Response:", response.text)
        finally:
            await env.close()

    if __name__ == "__main__":
        asyncio.run(main())
    ```

    <Note>
      The SDK automatically handles screenshot capture and file organization for you.
    </Note>
  </Step>

  <Step title="Automatic Directory Creation">
    Narada automatically creates a directory structure for your screenshots:

    1. **Main Directory**: `Narada Downloads` in your machine's Downloads folder
    2. **Request Directory**: Directory named after your `request_id` from the [SDK response](/documentation/getting-started-with-sdk)
    3. **File**: Screenshot saved as a `.jpeg` file with timestamp

    <Check>
      If the `Narada Downloads` directory doesn't exist, it will be created automatically.
    </Check>
  </Step>

  <Step title="Find Your Screenshot File">
    Navigate to your Downloads folder and look for:

    ```
    Downloads/
    └── Narada Downloads/
        └── req_abc123def456/
            └── save-screenshot-20250828232853.jpeg
    ```

    Each screenshot request gets its own directory named after the `request_id` for easy correlation with your SDK calls. The screenshot file is automatically named with a timestamp for unique identification.
  </Step>
</Steps>

## Screenshot Organization

<CardGroup cols={2}>
  <Card title="JPEG Format" icon="image">
    All screenshots are saved as JPEG files for optimal file size and universal
    compatibility.
  </Card>

  <Card title="Request Correlation" icon="folder">
    Each screenshot directory is named after the `request_id` from the [SDK response](/documentation/getting-started-with-sdk), allowing you to easily track which SDK request generated which files.
  </Card>

  <Card title="Timestamp Naming" icon="clock">
    Screenshots are automatically named with timestamps (e.g., `save-screenshot-20250828232853.jpeg`) to prevent filename conflicts and maintain chronological order.
  </Card>
</CardGroup>

## Example Use Cases

* **Documentation**: Capture screenshots of web interfaces for user guides
* **Quality Assurance**: Take screenshots during automated testing workflows
* **Monitoring**: Capture visual evidence of web page states
* **Reporting**: Include screenshots in automated reports and summaries
* **Debugging**: Visual documentation of automation steps and results

<Tip>
  You can take a screenshot of any page that's currently visible in your browser. The screenshot captures the full viewport at the time of capture.
</Tip>
