Yandex Disk recipes for your AI agent
Whole Yandex Disk tasks for an agent: find a contract, file invoices, edit a spreadsheet, 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:
- Find a contract and quote its terms
- Answer from a file outside the chosen folders
- Tidy last year's invoices into an archive
- Share a file and close the link later
- Put a report the agent wrote on the Disk
- Edit a file with your agent
- Undo a delete
- Keep the copy current every morning
Find a contract and quote its terms
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 --jsonThe 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
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 --jsonfiles download without --output answers the file's text, so nothing is saved on your computer. A text longer than
200,000 characters is cut and says truncated: true. For the cells themselves, with their formulas,
ydisk personal files sheets show /Work/Q3/report.xlsx answers them by address.
Tidy last year's invoices into an archive
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.
Share a file and close the link later
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.pdfAnyone 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
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 /ReportsAn upload refuses credential files, browser profiles and the WireCat folders, so an agent cannot send them to the Disk by mistake.
Edit a file with your agent
The agent reads the file, edits it, and writes it back with the sha256 it read. If someone changed the file in the
meantime, the write is refused and nothing is uploaded: the agent reads it again and redoes the edit. What each edit
replaced is kept on this computer.
A Markdown note:
Use ydisk CLI with profile personal. In /Notes/plan.md on my Disk, tick "send the invoice" and add
"call the bank" under Friday. Keep everything else as it is.ydisk personal files download /Notes/plan.md --json
ydisk personal files update /Notes/plan.md --expected-fingerprint <sha256 from the download> < plan.mdThe download answers the whole text and its sha256. A text cut at 200,000 characters has no sha256, so it can
never be written back.
A spreadsheet:
Use ydisk CLI with profile personal. In /Work/budget.xlsx, set the March rent to 1300 and mark it paid.ydisk personal files sheets show /Work/budget.xlsx "Sheet1!A1:D20" --json
ydisk personal files sheets update /Work/budget.xlsx "Sheet1!B3:C3" --values '[[1300, "paid"]]' --expected-fingerprint <sha256>Only those cells change; the formatting, the other sheets and the formulas stay. A formula cell is refused unless the
agent adds --replace.
A Word document:
Use ydisk CLI with profile personal. In /Work/letter.docx, replace the second paragraph with
"The pond opens on Monday." and add "Kind regards, Anna" at the end.ydisk personal files documents show /Work/letter.docx --json
ydisk personal files documents update /Work/letter.docx --payload '[{"index": 1, "text": "The pond opens on Monday."}, {"insert_after": 5, "text": "Kind regards, Anna"}]' --expected-fingerprint <sha256>The paragraphs keep their style. A paragraph with a tracked change, an image, a comment or a link is refused with the reason, so the agent can tell you instead.
To undo an edit:
ydisk personal files history /Work/letter.docx
ydisk personal files restore /Work/letter.docx <version> --expected-fingerprint <sha256 the file has now>Undo a delete
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.pdffiles 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 --quietThe 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.