Download Files with Narada SDK

The Narada Python SDK makes it easy to download files and documents during automation tasks. When you ask Narada to download content, it automatically saves files to your local Downloads folder with an organized directory structure.

How to Download Files with the SDK

1

Basic File Download

Use the SDK to download files with a simple command:
import asyncio
from narada import Narada

async def main() -> None:
    async with Narada() as narada:
        window = await narada.open_and_initialize_browser_window()

        # Download the current page
        response = await window.dispatch_request(
            prompt='/Operator download the current page'
        )

        print("Download completed!")
        print("Response:", response["response"]["text"])

if __name__ == "__main__":
    asyncio.run(main())
The SDK automatically handles file organization and download management for you.
2

Download with GIF Recording

Optionally record the download process as a GIF for debugging:
import asyncio
from narada import Narada

async def main() -> None:
    async with Narada() as narada:
        window = await narada.open_and_initialize_browser_window()

        # Download with GIF recording
        response = await window.dispatch_request(
            prompt='/Operator navigate to the research paper and download the PDF',
            generate_gif=True  # Record the download process
        )

        print("Download completed with GIF recording!")
        print("Response:", response["response"]["text"])

if __name__ == "__main__":
    asyncio.run(main())
The GIF recording helps you see exactly how the download process worked.
3

Automatic Directory Creation

Narada automatically creates a directory structure for your downloads:
  1. Main Directory: Narada Downloads in your machine’s Downloads folder
  2. Request Directory: Directory named after your request_id from the SDK response
  3. File: Downloaded content saved as a .pdf file
If the Narada Downloads directory doesn’t exist, it will be created automatically.
4

Find Your Downloaded File

Navigate to your Downloads folder and look for:
Downloads/
└── Narada Downloads/
    └── req_abc123def456/
        └── downloaded_page.pdf
Each download request gets its own directory named after the request_id for easy correlation with your SDK calls.

Download Organization

PDF Format

All downloaded pages and documents are saved as PDF files for universal compatibility.

Request Correlation

Each download directory is named after the request_id from the SDK response, allowing you to easily track which SDK request generated which files.

Automatic Naming

Files are automatically named based on the page title or content type.

Example Use Cases

  • Research: Download academic papers or articles for offline reading
  • Documentation: Save important web pages for reference
  • Archiving: Create local copies of web content for backup
  • Processing: Download files for further automated processing
You can download any page that’s currently visible in your browser. Just make sure the page has fully loaded before sending the download command.

Next Steps

Learn about other Narada SDK capabilities: