Document Editor Plugin
Lets the agent open, edit, and save Microsoft Word documents (.docx) in the conversation. Ask it to work on a document; editing tools appear once a file is open, and disappear when it is closed. Saved files show a download card in the transcript (served by the Files plugin).
The agent can open a document from a configured repo or from a Client Filesystem folder attached to the conversation. Documents opened from an attached folder are written back there on save.
Configuration
plugins:
- module: codumentor.plugins.doc_editor
class: DocEditorPlugin
args:
enabled: true
target_agents: "main" # "main", "subagent", or "all" (default: "main")
Keep Files enabled so download cards in the transcript resolve. Without it, save cards still render but their links 404.
Parameters
| Key | Type | Default | Description |
|---|---|---|---|
enabled | bool | true | Master switch. |
target_agents | string | "main" | Which agents get the tools: "main", "subagent", or "all". Any other value is treated as "all". |
Optional visual rendering
Editing does not require LibreOffice. Visual rendering requires soffice in the
server runtime, discovered when the editor loads; restart the service after
installation. Admin → Server reports cached discovery, not sandbox execution
verification. Standard distro installs work with the default overlay; /opt
installs and user fonts are not automatically exposed. In containers install in
the server image/container, not just its host. pdftoppm is optional.
See office prerequisites
for installation scope, fonts, confinement, and visual-validation limitations.
What the agent can do
doc_open is always available. After a document is open, the editing tools below appear; doc_close removes them.
The agent can open an existing .docx, copy it to a new path before editing, or create a blank document (create_new). Search returns at most 50 matches.
| Tool | When | Description |
|---|---|---|
doc_open | always | Open or create a .docx (repo or attached folder) |
doc_read_structure | open | Paragraph/heading outline |
doc_read_section | open | Content of a section |
doc_search | open | Search for text |
doc_replace_text | open | Replace text |
doc_insert_paragraph | open | Insert a paragraph |
doc_delete_paragraph | open | Delete a paragraph |
doc_list_tables | open | List tables |
doc_edit_table_cell | open | Edit a table cell |
doc_read_headers_footers | open | Read headers and footers |
doc_set_property | open | Set properties (title, author, …) |
doc_python | open | Advanced edits via python-docx |
doc_save | open | Save; transcript shows a download card |
doc_render | open, LibreOffice installed | Shows pages of the current state (unsaved edits included) as images, with the count; absent when soffice is not found at startup |
doc_close | open | Close the document |
See also
- XLSX Editor and PPTX Editor — the same open-then-edit pattern for spreadsheets and presentations
- Files — download cards and the repo browser
- Client Filesystem — open a Word file from an attached local folder