Formal system improves management and trust of AI agent workflows

FAOPs: Normal Forms and an Algebra for AI Agent Workflows

Artificial IntelligenceDatabasesProgramming Languages

Summary

Many organizations use AI agents to do complex multi-step tasks, but the current way of writing these procedures is messy and hard to maintain. The authors introduced a formal approach called FAOP that breaks down workflows into smaller, well-defined steps with clear data and access rules. This makes AI workflows easier to check, update, control, and audit, especially important for regulated industries. They also built a system called SkillBase that applies these ideas to manage and safely run these AI workflows.

What this means in practice

  • For enterprise software teams: Structure AI-driven operational workflows with strict typing, access, and cost controls to meet regulatory audit requirements.
  • For cloud platform architects: Design workflow management systems that guarantee safe refactoring, enforce least privilege, and enable compile-time verification of AI task sequences.

Authors

Ali Mohammadi Shanghooshabad

Abstract

Organizations increasingly encode operational procedures as multi-step agent skills, here called Agent Operating Procedures (AOPs), that must be traceable, auditable, reproducible, access-controlled, and bounded in time and cost, requirements that regulated sectors make mandatory. Yet AOPs are typically kept as coarse-grained files, in which steps bundle actions, copied procedures drift apart, any step may reach any tool, and refactoring goes unchecked. We present Functional Agent Operating Procedures (FAOP), a formal theory that brings database-grade discipline to AI agent workflows. FAOP recasts each workflow as a typed function over scoped state and subjects an entire library to four progressive normal forms: Decomposed (FNF-1) splits a workflow into atomic steps, Typed (FNF-2) makes its data flow explicit and type-checked, Factored (FNF-3) gives each shared procedure a single canonical definition so a change propagates instead of drifting, and Scoped (FNF-4) confines every step to least-privilege tool access. Once normalized, every atomic step is a separate entity with a declared contract and can be type-checked, scope-confined, bounded, tested, traced, and audited on its own. A FAOP algebra of provably sound equalities turns refactoring and parallelization into compiler rewrites; orthogonal extensions add verified termination (+V), optimization (+O), and time and cost bounds (+B); and an architectural-level classifier (0-3) determines whether a workflow needs AI at all. Together, these make integrity, isolation, typing, termination, cost, and optimization compile-time concerns across the whole library, not runtime hopes. We implement the theory in SkillBase, an AOP management system (what PostgreSQL is to data, SkillBase is to AOPs), together with a separate executor that enforces these guarantees at run time. A worked financial workflow illustrates the approach end to end.