Takes everything the agents have gathered and analysed and turns it into a polished report with clear sections and citations. Usually the final step of a workflow — the deliverable a human actually reads.
Takes raw findings plus a 'reportType' template ('executive_summary', 'due_diligence', 'research_report', …) and produces a structured document with sections, headings, and preserved citations from upstream tools. Output format can be markdown, HTML, or PDF.
When a user asks:
Turn this analysis into a polished executive summary.
the agent calls the tool:
report_generator(content="…", reportType="executive_summary", format="markdown")and gets back: a formatted markdown report with sections, headings, and citations.
Wire this tool into a SwarmAI crew. Use the YAML DSL for declarative workflows, or the Java builder API when you want full programmatic control.
YAML DSL
# executive-writing.yaml
name: executive-writing-crew
process: SEQUENTIAL
agents:
- id: editor
role: Executive Editor
goal: Turn raw findings into polished reports
tools:
- report_generator
tasks:
- id: executive-writing-task
agent: editor
description: Assemble a one-page executive summary from the supplied analysis output.Java
import ai.intelliswarm.swarmai.agent.Agent;
import ai.intelliswarm.swarmai.task.Task;
import ai.intelliswarm.swarmai.swarm.Swarm;
import ai.intelliswarm.swarmai.swarm.SwarmOutput;
import ai.intelliswarm.swarmai.process.ProcessType;
import ai.intelliswarm.swarmai.tool.common.ReportGeneratorTool;
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.beans.factory.annotation.Autowired;
@Autowired ChatClient chatClient;
@Autowired ReportGeneratorTool reportGeneratorTool;
Agent editor = Agent.builder()
.role("Executive Editor")
.goal("Turn raw findings into polished reports")
.chatClient(chatClient)
.tool(reportGeneratorTool)
.build();
Task editorTask = Task.builder()
.description("Assemble a one-page executive summary from the supplied analysis output.")
.agent(editor)
.build();
SwarmOutput result = Swarm.builder()
.agent(editor)
.task(editorTask)
.process(ProcessType.SEQUENTIAL)
.build()
.kickoff();Real scenarios where agents put this tool to work.
Implementation lives at swarmai-tools/src/main/java/ai/intelliswarm/swarmai/tool/common/ReportGeneratorTool.java in the swarm-ai repository.