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

# Egnyte

> Connect Egnyte to your Agent for file management and document access on your Egnyte tenant

## Overview

The Egnyte integration enables your agents to search, browse, read, upload, and manage files across your Egnyte tenant. Useful for deal rooms, portfolio document libraries, contracts, and any other content managed in Egnyte.

## Features

* **Cross-tenant Search**: Search across filenames, folder names, and indexed file content
* **Folder Browsing**: Navigate folder hierarchies by path with sorting and pagination
* **File Reading**: Read text-based files (txt, md, csv, json, code, etc.) directly
* **File Downloads**: Download any file as an attachment for processing with `execute_python` (PDF, DOCX, XLSX, images)
* **File Management**: Upload, move/rename, copy, create folders

## Prerequisites

* An Egnyte tenant (e.g. `yourcompany.egnyte.com`) with admin access
* A registered Egnyte API application (gives you an **API Key** and **Shared Secret**)
* A dedicated **Service Account** user with access to the folders you want the agent to read/write
  * Service Accounts in Egnyte are recommended because their passwords do not expire
* Egnyte only supports the *Resource Owner Password Credentials* grant — there is no client-credentials flow — so the service-account **username and password** are required

## Setup Guide

<Steps>
  <Step title="Register an Egnyte API application">
    Have your Egnyte admin register a new API application at the [Egnyte Developer Portal](https://developers.egnyte.com). When prompted for grant types, enable **Resource Owner Password Credentials (Internal Application)**. Egnyte will issue you an **API Key** (client\_id) and **Shared Secret** (client\_secret).
  </Step>

  <Step title="Create a Service Account">
    In the Egnyte admin console, create a dedicated Service Account user (e.g. `integrations@yourcompany.com`). Service accounts are designed for API use, are not subject to password expiry, and avoid downtime from interactive-user password resets. See Egnyte's docs on [Service Accounts](https://helpdesk.egnyte.com/hc/en-us/articles/360028824952-Service-Accounts).
  </Step>

  <Step title="Grant folder access">
    Share each folder your agent needs to access with the service account. Use Egnyte's permissions UI to assign **Viewer**, **Editor**, or **Full** access as appropriate. Permissions on the underlying file system are enforced — the agent only sees what the service account sees.
  </Step>

  <Step title="Connect Egnyte in Aster">
    In Aster Agents, navigate to **Control Hub > Integrations** and locate the Egnyte card. Click **Connect** and provide:

    * **Egnyte Domain** — e.g. `yourcompany.egnyte.com`
    * **API Key** — from your registered Egnyte API application
    * **Shared Secret** — from your registered Egnyte API application
    * **Service Account Username** — service account email
    * **Service Account Password** — service account password
  </Step>

  <Step title="Add Tools to Your Agent">
    Edit your agent and enable the Egnyte tools you need: search, list folder, read file, get file info, upload, create folder, move, copy, download.
  </Step>
</Steps>

## Path Conventions

Egnyte addresses everything by **path**, not opaque ID. Top-level content lives under `/Shared`:

* `/Shared` — the standard shared root
* `/Shared/Documents` — a top-level folder (whatever your tenant has named it)
* `/Shared/Documents/some-folder/some-file.pdf` — a file
* `/Private/<username>` — a user's private home folder

When calling tools, always pass full paths starting with `/`. The integration handles URL-encoding of path segments for you.

## Available Tools

### Search & Browse

* **Egnyte Search** — Full-text search across your tenant; filter by folder, type, and modified date
* **Egnyte List Folder** — Browse folder contents by path with pagination and sorting

### Read & Download

* **Egnyte Read File** — Inline-read text-based files (txt, md, csv, json, source code). For PDFs / DOCX / XLSX use `egnyte_download_file` + `execute_python`.
* **Egnyte Get File Info** — Metadata for a file or folder: size, entry\_id, last\_modified, uploader, version count, lock state
* **Egnyte Download File** — Fetch raw bytes and attach to the conversation for use in the Python sandbox

### Write & Organize

* **Egnyte Upload File** — Upload text content or a binary file (via `r2_path`) to a destination folder
* **Egnyte Create Folder** — Create a new folder under an existing parent
* **Egnyte Move Item** — Move/rename a file or folder (destination is the full new path)
* **Egnyte Copy Item** — Copy a file or folder to a new path

## Security Considerations

* **Always use a dedicated Service Account** — never personal credentials. Service Account passwords do not expire, eliminating integration downtime.
* **Restrict folder permissions** at the Egnyte level — the agent inherits exactly what the service account can see
* **Rotate the Shared Secret** periodically via the Egnyte Developer Portal
* **Use a strong, long Service Account password** and store it only in the Aster Control Hub
* **Audit activity** via the Egnyte admin console — all agent actions appear under the service account

## Troubleshooting

<AccordionGroup>
  <Accordion title="Authentication Failed">
    * Verify the domain is just the host (`yourcompany.egnyte.com`), not a URL
    * Confirm the API Key + Shared Secret are still active in the Developer Portal
    * Confirm the service account password is correct and the account is not locked
    * Egnyte access tokens last 30 days; if you change the service account password, reconnect Egnyte in Aster
  </Accordion>

  <Accordion title="403 Forbidden on a folder or file">
    * The service account user does not have permission for that path — share the folder with the service account in Egnyte
    * The path may be wrong — Egnyte is case-sensitive; double-check with `egnyte_list_folder` on the parent
  </Accordion>

  <Accordion title="429 Too Many Requests">
    * Egnyte rate limits per-token (default \~5–10 QPS for search, higher for other endpoints, configurable per plan)
    * Spread out parallel calls. Search API is limited to **5 requests per second**.
  </Accordion>

  <Accordion title="File Content Not Extracted">
    * `egnyte_read_file` only inlines plain-text formats (txt, md, csv, json, source code)
    * For PDFs / Word / Excel / images, use `egnyte_download_file` then `execute_python` with appropriate libraries (pdfminer, python-docx, openpyxl, etc.)
    * Files larger than 10 MB are not read inline even if text-based
  </Accordion>

  <Accordion title="Upload limited to 100 MB">
    * The single-shot upload tool tops out at 100 MB. Chunked upload is not yet implemented — split larger files at the source or contact us.
  </Accordion>
</AccordionGroup>

## Related Tools

* **Egnyte Search** (`egnyte_search`) - Search across your Egnyte tenant
* **Egnyte List Folder** (`egnyte_list_folder`) - Browse folder contents
* **Egnyte Read File** (`egnyte_read_file`) - Inline-read text files
