Documents & filesYandex Disk

Yandex Disk recipes for your AI agent

Whole Yandex Disk tasks for an agent: find a contract, file invoices, share a link.

Whole tasks you can hand to your agent, each with a request to copy and the commands the agent runs for it. They assume you have signed in, chosen folders and connected your agent. Change the profile, paths and names to yours. The ones here are examples.

On this page:

  1. Find a contract and quote its terms
  2. Answer from a file outside the chosen folders
  3. Tidy last year's invoices into an archive
  4. Share a file and close the link later
  5. Put a report the agent wrote on the Disk
  6. Undo a delete
  7. Keep the copy current every morning

Find a contract and quote its terms

Request
Use ydisk CLI with profile personal. Find the contract with Harbour Ltd in my Disk folders.
Quote the payment terms and the notice period, and give me the file's path on the Disk. Do not change any files.
ydisk personal search "Harbour Ltd contract" --json
ydisk personal documents show 1a2b3c --json

The agent searches the copy, then reads the whole text of the best hit. If the copy is old, it runs ydisk personal sync first.

Answer from a file outside the chosen folders

Request
Use ydisk CLI with profile personal. Open /Work/Q3/report.xlsx on my Disk and tell me the total for September.
ydisk personal files download /Work/Q3/report.xlsx --json

files download without --output answers the file's text, so nothing is saved on your computer.

Tidy last year's invoices into an archive

Request
Use ydisk CLI with profile personal. Move every invoice from 2025 in /Documents/Invoices to /Archive/Invoices-2025.
Show me the list before you move anything.
ydisk personal files list --folder /Documents/Invoices --json
ydisk personal files create /Archive/Invoices-2025
ydisk personal files move /Documents/Invoices/2025-03.pdf --folder /Archive/Invoices-2025 --dry-run
ydisk personal files move /Documents/Invoices/2025-03.pdf --folder /Archive/Invoices-2025

--dry-run shows what a move would do without doing it. A move keeps the file's tags and notes in the copy.

Request
Use ydisk CLI with profile personal. Make a public link to /Documents/Flat/lease-2026.pdf so I can send it to Bob.
ydisk personal files publish /Documents/Flat/lease-2026.pdf
ydisk personal files unpublish /Documents/Flat/lease-2026.pdf

Anyone who has a public link can open the file. At a terminal the tool asks first. Over MCP it follows the files.share permission, see connect your agent.

Put a report the agent wrote on the Disk

Request
Use ydisk CLI with profile personal. Save the summary you just wrote as summary.md in /Reports on my Disk.
ydisk personal files upload ./summary.md --folder /Reports

An upload refuses credential files, browser profiles and the WireCat folders, so an agent cannot send them to the Disk by mistake.

Undo a delete

Request
Use ydisk CLI with profile personal. I deleted old.pdf from my Disk by mistake. Bring it back.
ydisk personal api trash-resources-list --json
ydisk personal files restore trash:/old.pdf

files delete moves a file to the Disk's trash, so it can come back until the trash is emptied.

Keep the copy current every morning

Nothing syncs in the background. To have a fresh copy each morning, run sync from your system's scheduler, such as cron on Linux and macOS:

0 8 * * * ydisk personal sync --quiet

The line runs the sync at 8:00 every day. If cron cannot find ydisk, use the full path that which ydisk prints. Run ydisk personal status to see when the last sync finished.