AI operations
    Contract

    Agent runtime contract

    A practical contract for running agent actions in production: identifiers, approvals, audit trails, and safe reruns. This is the model used across Gestio AI workflows.

    Non-negotiables

    If an AI action cannot meet these, it must fail closed or route to manual review.

    • Traceable: every action has an identifier (e.g. ai_task_id) and an audit trail.
    • Reviewable: outputs include evidence/inputs; uncertainty is explicit and routes to review.
    • Overrideable: humans can approve/reject and re-run safely without “hidden state”.
    • Tenant-safe: actions are scoped by tenant isolation and never cross workspaces.

    Inputs and evidence

    Make reviews fast by attaching evidence where decisions happen.

    • Store source references (documents, entity IDs, request payloads).
    • Persist extracted/derived values as drafts, not final truth.
    • Keep a “what changed” story from draft → reviewed → approved.

    Approvals and policies

    Commitments and money-impacting actions require explicit approvals.

    • Approval gating for commitments (award decisions, PO issuance, payments).
    • Fail closed on missing permissions or missing evidence.
    • Keep approvals linked to the action identifier for auditability.

    Deterministic fallback + safe reruns

    Plan for failures and retries. Reruns must be safe and explainable.

    • Retry only fetch-level failures; don’t loop on logical errors.
    • Use idempotent patterns so reruns do not create duplicates.
    • Record status history so operators can understand the run timeline.

    Security boundaries

    AI actions are permissioned operations, not “chatbot suggestions”.

    • Least-privilege permissions (deny by default).
    • Explicit tenant isolation (platform_user_id scoping).
    • Audit logs for approvals, writes, and edge function invocation failures.

    Related docs

    Follow the model into workflows and product pages.

    Chat with us on WhatsApp