flowchart LR accTitle: Who can write to the ERP? accDescr: The model reads approved evidence and returns a typed proposal to a durable workflow. The workflow can request a decision from a named reviewer. A gateway checks the current mandate and record revision before a scoped connector can write to the ERP. The connector returns a receipt or reports an unknown result for reconciliation. %% org-runtime (en) %% https://www.thebsq.com/ai-organizations subgraph g1 ["Read-only investigation"] %% n_evidence — The evidence service filters by company, access and effective date. Its responses identify the source revision and the exact record or passage. n_evidence["Versioned evidence"] %% n_model — The agent uses approved reading tools and returns a proposal with evidence references and missing facts. Its workload identity grants access to that investigation. n_model["Investigating agent"] end subgraph g2 ["Company case management"] %% n_workflow — One workflow owns the case clock and records each transition. It can resume after a restart, await a human decision and retain an uncertain write for investigation. n_workflow["Durable workflow"] %% n_reviewer — For a case requiring individual review, the reviewer sees the proposed action and its evidence. An approval binds to that action and revision. A refusal blocks dispatch. n_reviewer["Named reviewer"] end subgraph g3 ["Authorized execution"] %% n_gate — Immediately before dispatch, check the authenticated workload, object, mandate, quota, record revision and any required approval. A refusal or an unavailable check blocks execution. n_gate["Policy gateway"] %% n_connector — The connector enforces the decision on the exact payload. It holds a credential restricted to that operation, reuses the operation key where supported and can look up the resulting record. n_connector["Scoped connector"] end subgraph g4 ["System of record"] %% n_erp — The receiving system creates the internal inquiry and owns its identifier and status. Those facts establish whether the requested action took effect. n_erp["Receiving ERP"] end n_evidence -->|"Read API or MCP over HTTPS"| n_model n_workflow -->|"Read task"| n_model n_model -->|"Typed proposal"| n_workflow n_workflow -->|"Case for review"| n_reviewer n_reviewer -->|"Decision with case version"| n_workflow n_workflow -->|"Requested action"| n_gate n_gate -->|"Permit"| n_connector n_connector -->|"HTTPS"| n_erp n_erp -->|"Record ID"| n_connector n_connector -->|"Receipt or unknown result"| n_workflow %% From evidence to a permitted action — n_evidence → n_model → n_workflow → n_gate → n_connector → n_erp %% A case requiring individual approval — n_workflow → n_reviewer → n_workflow → n_gate → n_connector → n_erp %% Return the outcome to the case — n_erp → n_connector → n_workflow