Skip to main content
Version: 0.13.0

Report tool

Introduced 0.13.0

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

ParameterRequiredDescription
titleYesThe report title.
sectionsNoJSON 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.
imagesNoJSON array of objects with caption and uri.
classificationNoHandling marking printed at the head and foot.
prepared_forNoWho the report is for.
prepared_byNoWho or what prepared it.
generated_atNoThe moment the report speaks about.
formatNomarkdown (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" }
}