Skip to content

Governance

RBAC, the audit log, lineage tracking, and how to demonstrate agentic workflow governance to a COO or auditor.

Last updated: 2026-04-30

Governance

Agentic automation introduces a new governance challenge: automated systems make decisions and take actions. Those decisions and actions must be auditable, attributable, and reversible where possible. This page covers the governance primitives Flexor provides and how to use them.

The audit log

Every agent run produces an audit log entry. The entry records:

FieldValue
run_idUnique identifier for this agent run
agent_nameName of the agent
trigger_typeschedule, event, webhook, or manual
trigger_atUTC timestamp when the trigger fired
tasks_executedOrdered list of skills invoked
outputsSummary of agent outputs (configurable redaction for PII)
decisionsConditional branches taken and the values that drove each decision
duration_msTotal execution time
statussuccess, partial, failed
errorsArray of errors encountered (if any)

Querying the audit log:

# Last 50 runs for an agent
flexor audit --agent feed-monitor --limit 50

# All runs between two dates
flexor audit --from 2026-04-01 --to 2026-04-30

# Failed runs only
flexor audit --status failed

# Export to CSV for reporting
flexor audit --from 2026-04-01 --to 2026-04-30 --format csv > audit-april.csv

RBAC - role-based access control

Flexor uses four built-in roles:

RoleCan view agentsCan deploy agentsCan edit L2 vaultCan manage API keys
viewerYesNoNoNo
operatorYesSandbox onlyNoNo
adminYesYes (all envs)YesNo
ownerYesYesYesYes

Assigning roles:

flexor access grant --user alice@fund.com --role operator --vault company
flexor access grant --user bob@fund.com --role viewer

Roles are scoped to a vault. A user can be an operator on the company vault and a viewer on a project vault simultaneously.

Data lineage

Flexor records lineage for every data access: which agent, which skill, which data source, and which record was read or written.

Query lineage for a specific data record:

flexor lineage --record "plexifact://prod/catalog/equity-prices/2026-04-30"

Output:

Record: equity-prices / 2026-04-30
├── Read by: feed-monitor [run: a1b2c3] at 2026-04-30 14:00 UTC
├── Read by: weekly-nav-report [run: d4e5f6] at 2026-04-28 08:05 UTC
└── Included in: recon-summary [run: g7h8i9] at 2026-04-28 08:10 UTC

Lineage is retained for the period defined in vault.json (audit.retention_days). For compliance-sensitive environments, set this to at least 365.

Demonstrating governance to an auditor

The three questions an auditor or COO typically asks about automated workflows:

1. “What decisions did this system make and why?”

Answer with the audit log. Each run entry includes the decisions field - a record of every conditional branch taken and the input values that triggered it.

2. “Who authorized this automation to run?”

Answer with the deployment log. Every flexor deploy command is attributed to the authenticated user who ran it, with timestamp. Access to deploy production agents is controlled by RBAC and requires the admin or owner role.

3. “Can this be stopped if something goes wrong?”

Answer with the pause/kill controls. Pausing an agent prevents future triggers without removing its configuration:

flexor agents pause --agent feed-monitor --env production

Stopping a running agent immediately:

flexor agents kill --run <run_id>

Compliance configuration

For regulated environments, enable enhanced logging in vault.json:

{
  "audit": {
    "enabled": true,
    "retention_days": 365,
    "include_inputs": true,
    "include_outputs": true,
    "pii_redaction": true,
    "destination": "vault://audit-log/",
    "secondary_destination": "s3://your-compliance-bucket/flexor-audit/"
  }
}

pii_redaction: true applies the configured PII patterns to audit log entries before writing. Configure patterns under vault.json > audit.pii_patterns.

Was this page helpful?

Edit on GitHub