csv_to_bundle
Convert raw CSV shift logs or production spreadsheets into the bundle shape run_agent expects, mapping headers to fields so you can run OEE or shift-report agents.
Instructions
The Spreadsheet-to-agent converter: turn a raw CSV export - a shift log, a production or downtime spreadsheet - into the bundle shape run_agent expects. Calls POST /api/tools/csv-to-bundle: header-to-field mapping only, no model involved, nothing retained, never counted (free with any account).
Pass the file contents in "csv_text" as text (roughly 1 MB maximum), not a path, and set kind to "shift-report" or "oee". Returns the bundle plus mapped_columns, unmapped_columns, and warnings. Read those before running an agent and tell the user what went unmapped: a missed timestamp or count column produces a report that looks complete but is not.
WHEN TO CALL: the user has a spreadsheet and no namespace yet. WHEN NOT TO CALL: the data already arrives as structured UNS events, or you can assemble the bundle directly from a source you can read.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| csv_text | Yes | ||
| site_profile | No |