Report Agent
The Report Agent is a tool you can add to your Nappai dashboard to automatically create structured reports. You give it the information you want to include, tell it how you want the report to look, and the agent will produce a finished document ready for use or sharing.
How it Works
The agent uses a language model (LLM) to understand the content you provide and to write the report.
- Input gathering – You supply the data, instructions, and styling options.
- Processing – The agent calls the LLM to generate the text, format it, and split it into sections.
- Output – The finished report is returned as a message, and the agent can also be turned into a reusable tool or a compiled workflow for other agents.
No external APIs are required; everything runs locally within Nappai, so you can keep your data private.
Inputs
- Model: The language model that will write the report.
- Model formatter: The language model that will format and extract the final output.
- Tools: A list of helper tools the agent can use while generating the report.
- CSS Style: Custom CSS code to style the report’s appearance.
- Instructions: Extra guidance for the agent, such as key points to include or special formatting requests.
- Language: The language code for the report (e.g.,
en
,es
,fr
,de
). - Max Iterations: How many times the agent can loop while refining the report.
- Max Report Sections: The maximum number of sections the report can contain.
- Max Tasks per Section: The maximum number of tasks or items that can appear in each section.
- Output Format: The format you want the report in (e.g., Markdown, HTML, PDF).
- Request: The title or main topic of the report.
- Report Type: The type of report to generate (e.g., summary, analysis, audit).
- Stream Output: Whether the report should be streamed as it is generated.
- Tool Name: The name that will appear when this component is used as a tool.
- Tool Description: A detailed description of what the tool does, helping agents decide when to use it.
- Tools arguments metadata: Metadata that defines the arguments for each tool the agent can call.
Outputs
- Report: The finished report text or file, produced by the
generate_report
method. - Agent: A compiled graph that can be reused in other workflows, produced by
create_agent_runnable
. - Tool: A ready‑to‑use tool object that can be added to an agent’s toolkit, produced by
to_toolkit
.
Usage Example
- Add the component to your workflow.
- Configure the inputs:
- Model:
gpt-4o
- Instructions: “Include a summary, a detailed section on sales trends, and a conclusion.”
- Language:
en
- Output Format:
Markdown
- Report Type:
Monthly Sales Report
- Request: “Sales Report – March 2025”
- Model:
- Run the component.
- Use the Report output to display on a dashboard, email to stakeholders, or store in a document repository.
Related Components
- Data Fetcher – Pulls raw data from databases or APIs.
- Email Sender – Sends the generated report to recipients.
- Dashboard Viewer – Displays reports directly in the Nappai UI.
Tips and Best Practices
- Keep Instructions concise; too many details can confuse the model.
- Use CSS Style sparingly—simple styles usually look cleaner.
- If you need the report in PDF, set Output Format to
PDF
and ensure the model supports it. - For large reports, increase Max Report Sections and Max Tasks per Section to avoid truncation.
- Turn the component into a Tool if you want other agents to call it automatically.
Security Considerations
- All data stays within your Nappai instance; no external calls are made unless you explicitly add a tool that does.
- Choose a model that complies with your organization’s data‑handling policies.
- If the report contains sensitive information, consider adding encryption or access controls before sharing.