Agent tools

convert

convert({ path | url, to, save? })

Turn a file into another format and save it in the workspace. 244 pairs — a report into a PDF, a video into an MP3 to listen to it.

category: write1 creditsource read from the name
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

pathstring

A workspace file to convert.

urlstring

A remote file or page instead.

tostringrequired

The target format: pdf, mp3, png…

savestring

Where to write it. Next to the source by default, or under Agent/<date>/ for a URL.

What it covers

FamilyTargets
Documentsmarkdown docx pdf html text json
Imagespng jpg webp gif tiff avif pdf base64
Audio and videomp4 webm mov avi mkv · mp3 wav m4a aac ogg flac opus · gif

The source format comes from the name

There is no from: the extension decides. A file named for what it is converts; one named .dat does not.

An impossible target answers with the possible ones

One refusal instead of a series of attempts

Asking for a target that is not reachable from that source returns the list of the ones that are. The agent picks from it on the next turn rather than guessing again.

Where it earns its place

  • A deliverable in a named format — a report the user asked for as a PDF.
  • The sound out of a video, so read can listen to it.
  • A file too large for read, whose refusal proposes exactly this.

The system prompt says it plainly: never rebuild a PDF by hand.