Creating and Editing Files
The Poly agent can write and edit files directly in your storage. When using a local agent to make desktop changes, the agent should be instructed to edit the files directly, rather than opening a browser window or using the MCP integration when possible. On the web, the agent must use the MCP integration to make changes.
Creating a new file
Ask the agent to create a document:
Create a meeting agenda for tomorrow's product review
Write a first draft of a proposal for the Henderson account
Create a template for weekly status updates
Draft a privacy policy for a B2B SaaS company
The agent writes the content, creates the file in your current folder (or a folder you specify), and shows you the result. You can ask it to revise, expand, or reformat before saving.
To specify where to save, just ask
Editing an existing file
Select a file in the browser, open the agent (⌘ / (Ctrl+/ on Windows and Linux)), and ask for edits:
Rewrite this in a more formal tone
Add an executive summary at the top of this document
Fix the grammar and punctuation throughout
Translate this to Spanish
Expand the third section with more detail
The agent modifies the file content and saves the changes. The original version is preserved in version history, so you can roll back if needed.
Direct editing with the built-in editor
For hands-on editing of text and code files, Poly includes a built-in Monaco editor. Open any text file and click Edit to switch to edit mode. The editor supports:
- Syntax highlighting for dozens of languages
- Find and replace
- Multiple cursors
- Vim keybindings (enable in Settings)
Use the built-in editor when you want fine-grained control; use the agent when you want to describe a change in words and have it applied automatically.
File types the agent can create and edit
The agent can create and edit:
- Text documents: Markdown, plain text, RTF
- Structured documents: DOCX, PPTX, XLSX (via content manipulation)
- Code files: any text-based programming or markup language
The agent cannot directly edit binary formats like images, audio, or video files.
Choosing an image model
The agent's image command sends the complete conversation transcript directly to the selected image provider:
poly generate image --prompt "A glass city at sunset" --model nb2
Available values for --model are:
gemini-nanobanana2— Gemini NanoBanana2.nb2anddefaultare aliases, and this is the default when--modelis omitted.chatgpt-image— ChatGPT Image.chatgptis an alias.
Use poly generate image --help to see the same list in the agent CLI.