Report tool
The ReportTool, which an agent sees as WriteReport, turns findings already gathered into a document you can export, print, and hand over.
It assembles. Given three findings it emits three findings. An empty section is left empty and labelled empty. Every section names the tool it came from, and the report carries the moment it was assembled. The document is the tool's return value (markdown or HTML in the execute response). Index it yourself if you want it stored.
If you pass classification, that marking appears at the head and foot of the document. If you omit it, the report states that no handling marking was supplied, in the same place.
generated_at is the moment the report speaks about. Pass it as ISO-8601 or a plain date.
Parameters
| Parameter | Required | Description |
|---|---|---|
title | Yes | The report title. |
sections | No | JSON array of objects with heading, body, and source (the tool that produced the finding). Omit it for an empty report that states no findings were supplied. |
images | No | JSON array of objects with caption and uri. |
classification | No | Handling marking printed at the head and foot. |
prepared_for | No | Who the report is for. |
prepared_by | No | Who or what prepared it. |
generated_at | No | The moment the report speaks about. |
format | No | markdown (default) or html. |
Register a flow agent that runs the ReportTool
POST /_plugins/_agent/agents/_register
{
"name": "Report_Agent",
"type": "flow",
"description": "assembles findings into a report",
"tools": [
{
"type": "ReportTool",
"name": "DemoWriteReport",
"parameters": {
"format": "markdown"
}
}
]
}
POST /_plugins/_ml/agents/<agent_id>/_execute
{
"parameters": { "title": "Weekly land-cover changes" }
}