Office Documents
Author .xlsx workbooks from a structured spec the LLM can emit as JSON.
xlsx_authorPOI-backed XLSX writer. Keeps the LLM's surface narrow — it emits a spec; the tool turns that spec into a real file.
WORKSPACE_WRITE. ConditionalOnClass on Apache POI — gracefully absent when POI isn't on the classpath.
When a user asks:
Write a 3-year revenue forecast workbook for ACME.
the agent calls the tool:
xlsx_author(path="ACME_forecast.xlsx", spec={sheets:[{name:"Forecast", headers:["Year","Revenue"], rows:[...] }]})and gets back: wrote ACME_forecast.xlsx (1 sheet, 4 rows)
Real scenarios where agents put this tool to work.
Implementation lives at swarmai-tools/src/main/java/ai/intelliswarm/swarmai/tool/office/XlsxAuthorTool.java in the swarm-ai repository.