POST /agent/chat. GridOS uses a two-step preview-then-apply model: the chat endpoint shows you what the agent would write, and this endpoint makes it permanent. You should pass the agent_id, target_cell, values, and chart_spec fields directly from the chat response — do not modify them, as the kernel uses them to resolve any cell collisions consistently with what was previewed.
If the requested
target_cell is already occupied, GridOS shifts the write in the direction specified by shift_direction and reports the actual destination in actual_target. A status of "Collision Resolved" means the write landed somewhere other than the cell originally requested.Request
The agent ID from the chat response. Pass the
agent_id field through unchanged.The top-left cell where the write should begin, in A1 notation. Use the
target_cell value from the chat response — not original_request.A 2-D array of cell values to write, in row-major order. This is the
values field from the chat response. Each inner array represents one row; values can be strings, numbers, booleans, or null.Name of the sheet to write to. Defaults to the active sheet when omitted. Use the
sheet value from the chat response to ensure consistency.Direction to shift data when the target region is already occupied.
"right"— shift data to the right by the required number of columns (default)"down"— shift data downward by the required number of rows
The chart specification from the chat response. Pass this through unchanged if the agent proposed a chart; omit or set to
null if it did not. When provided, GridOS creates or updates the chart after writing the cell data.Response
The outcome of the write operation.
"Success"— data was written to the exact cell requested"Collision Resolved"— the target was occupied; data was shifted and written atactual_target"Partial"— cell data was written successfully but chart creation failed; seechart_error
The name of the sheet that was written to.
The cell address where data was actually written, in A1 notation. When
status is "Success" this matches the requested target_cell. When status is "Collision Resolved" this will differ.The created or updated chart object when a
chart_spec was provided and chart creation succeeded. Contains the full chart metadata including its assigned id. null when no chart was requested.An error message describing why chart creation failed, when
status is "Partial". The cell data was still written; only the chart was skipped. null on success.Example
The typical pattern is to take the fields from aPOST /agent/chat response and forward them directly to this endpoint.