Manuscript Offprint

arXiv:2610.22061

FAOPs: Normal Forms and an Algebra for AI Agent Workflows

Ali Mohammadi Shanghooshabad

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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.

1 Introduction

AI agents are entering the operational core of organizations, most visibly in regulated industries. A bank runs an agent to onboard a client through KYC, an insurer to investigate a claim for fraud, a hospital to secure prior authorization for a procedure, a law firm to review a contract for non-standard clauses, and so on. In each case a decision is acceptable only when the institution can show exactly how it was reached: which steps ran, in what order, on which data, under which permissions, and with what result, reproducibly and open to audit by a regulator. Any production agent workflow must therefore be traceable, auditable, reproducible, access-controlled, and bounded in time and cost; in regulated industries these are not optional qualities but conditions of deployment. None of them is supplied by the language model itself; each is a property of the multi-step workflow built around it.

The reusable unit of agent behavior is the skill: an artifact stored outside the model's weights that tells an agent how to perform a task, and that can be versioned, retrieved, and executed without retraining [1, 2]. Skills range from a single wrapped tool call to a composite procedure with its own control flow [1]. This paper concerns the composite, operational kind: the multi-step procedure an institution would otherwise write as a Standard Operating Procedure (SOP) for a person to follow. We call its agent-executable form an Agent Operating Procedure (AOP). 1^{1} An AOP is thus a workflow-shaped skill, and its steps are themselves skills: primitive actions, or calls to other AOPs.

Every AOP has the same shape:

AOP=⟨name,description,inputs,outputs,body⟩.\begin{aligned}AOP&=\langle name,description,inputs,\\&\quad outputs,body\rangle.\end{aligned}

The name and description make it discoverable; the inputs and outputs type its interface; the body holds the ordered steps.

Because an AOP lives outside the model’s weights, proprietary procedures stay confidential rather than baked into external weights, a procedure survives model upgrades and provider changes, and shared sub-procedures are reused across workflows rather than reimplemented. These properties are why organizations build libraries of reusable AOPs that agents draw on at runtime, increasingly populated not only by hand but by generators that emit many from natural-language descriptions or existing operational knowledge (Section 6.2). How an AOP is discovered, retrieved, or activated over such a library is a separate lifecycle concern we do not address [3]; our

1^{1}AOP denotes Agent Operating Procedure, unrelated to aspect-oriented programming.

Figure

Figure 1: The AOP executor pattern. A single generic agent executes any workflow; only the AOP body and the tool list change per use case. Separating what the workflow does from how it runs makes the executor a single point at which typing and tool access can be enforced.

subject is the body: its structure, its composition, and the guarantees a compiler can establish over it before the workflow runs.

The high-level architecture is simple (Figure 1). A single generic agent executor (commonly a loop of reason, act, and observe [4], though the exact implementation varies by team) takes two inputs that change per workflow: an AOP describing the steps, and a list of tools the agent may call. A deployed system usually adds a user or agent interface and a gateway that mediates access to external agents and tools. The executor itself does not change: to deploy a new workflow, one writes a new AOP and configures a new tool list, and the same agent code runs onboarding, compliance checks, payment processing, and more. This separation of what from how is also what makes development fast: because the executor is fixed and runs any AOP, shipping a new agent collapses to authoring one AOP, with no bespoke orchestration code to write, test, or deploy.

This design works in the small but strains at scale. A bank may run thousands of AOPs that share sub-procedures (client lookup, compliance checks, document validation) copy-pasted as text, so a single change such as a new compliance rule must be re-applied by hand in many places while the copies drift silently and nothing records which AOP depends on which. Access control is often equally unstructured: tools are commonly granted to the AOP as a whole rather than to individual steps, so a single prompt injection can reach any of them, and the only “boundary” is a comment the model may or may not honor.

References (41)