Letting an agent write to SharePoint without letting it write anything

Instructions tell an agent what it should do. Only the tools you give it decide what it can do. For agents that update business records, put the rules in the tool, not in the prompt.

In short

Do not give an agent the generic Update item action. Give it a small flow that accepts only the inputs you allow, writes only the fields you allow, and applies the business rule itself. The agent decides; the flow enforces.

The risk in the generic action

The SharePoint Update item action can write any column on any item it is pointed at. Given to an agent as a tool, every column becomes a parameter the model may fill. Your instructions say "only change the notes field". The tool says otherwise, and on a bad day the tool wins.

The same applies to raw HTTP actions, which can do anything the connection's account can do, including deleting items and changing permissions.

Decide in the agent, enforce in the flow

Split the responsibility. The agent reads, reasons and decides. A purpose-built flow, exposed to the agent as its only write tool, performs the change.

The agent sendsThe flow does
Item IDReads the item itself, so the agent cannot invent its current state
Complete: yes or noMoves the stage forward only if the answer is yes and the item is still at the first stage
Note textAppends it to the notes column with a timestamp; never overwrites
Nothing elseSends every other column back unchanged

The best place for a business rule is somewhere the model cannot argue with it.

Details that bite

Required columns on update

Update item may insist on required columns such as Title. Pass back the value you just read, so the update is a no-op for that field.

Empty person fields

Writing an empty value into a person column can fail with "the specified user could not be found", which stops the whole run, including the note you wanted to record. Put the assignment in its own branch that runs only when there is someone to assign, and write the note first.

Idempotence

Agents get retried. Make the flow safe to run twice: append notes rather than replace, and check whether a marker (such as a breach note already present) exists before writing it again.

Whose account writes

The flow writes with its connection's account. Use an account scoped to the test site while the agent is at the lowest autonomy level, and record that account in the agent's registration.

Prove it before you trust it

  1. Write the acceptance tests first. For example: a complete item moves forward; an incomplete one does not and raises an escalation; no other column changes; nothing is deleted.
  2. Run each test on purpose-made items. One complete, one incomplete, one high priority with no owner. Read every column afterwards, not just the one you expected to change.
  3. Register the agent and its limits. A list of agents with what each reads, writes and decides, and its autonomy level, is what lets someone else review it.
  4. Count correct decisions before raising autonomy. We require at least twenty correct triages, recorded, before an agent may act with less supervision.

Checklist

  • The agent has no generic update, delete or HTTP tool.
  • Its only write tool is a flow that takes the minimum inputs.
  • The flow re-reads the item and applies the business rule itself.
  • Notes are appended, never overwritten.
  • Person fields are written only when a person exists.
  • Every column was checked after each test.

Sources