One HTTP step before the action step
Copilot Studio agents act through agent flows and connectors. Add one HTTP action as the first step of any flow that writes, pays, grants or sends: it posts the action to Veridect, and a condition lets the work step run only when the verdict is greenlight. The flow’s own run history then shows the verdict and the record id for every action — the agent sees why, and so does the ledger.
Fail-closed by construction: a failed, timed-out or malformed HTTP step never satisfies the condition, so the work step does not run. The key, the agent id and the agent’s authority are environment variables or a connection reference — set when the flow is built, never trigger inputs the agent fills in; the key never sits in the flow. The same two steps fit a Power Automate flow called from a Microsoft 365 Copilot or Dynamics 365 agent.
# agent flow — "Veridect pre-action" is step 1; the work step runs only on greenlight steps: - name: Veridect pre-action # HTTP action method: POST uri: https://<your-veridect-host>/api/ai/consensus/pre-action headers: { Authorization: "Bearer @{parameters('veridect_key')}", Content-Type: application/json } body: action: "@{triggerBody()?['action']}" # e.g. "reassign_case" target: "dynamics365:@{triggerBody()?['entity']}" parameters: "@{triggerBody()?['fields']}" callingAgent: "@{parameters('agent_id')}" # environment variable: the Entra Agent ID this flow belongs to — set by the maker, not an input callingAgentScope: "@{parameters('agent_scope')}" # environment variable: its configured authority, in words — never a trigger input timeout: PT60S - name: Condition — proceed? expression: "@equals(body('Veridect_pre-action')?['verdict'], 'greenlight')" # a failed step never reaches 'true' if_yes: - Update a row (Dataverse) # the work step — the record id goes into the note if_no: - Respond to the agent: "Not executed — Veridect @{body('Veridect_pre-action')?['verdict']} · record @{body('Veridect_pre-action')?['auditBundleId']}"