P211 — AIEP — Tool Synthesis and Workflow Construction Engine
Applicant: Neil Grassby Classification: Patent Application — Confidential Priority: Claims priority from GB2519711.2 filed 20 November 2025 Architecture Layer: AIEP AGI Cognition Layer — Phase 2
Framework Context
[0001] This specification operates within an AIEP environment as defined in GB2519711.2 and GB2519798.9. The present specification defines the tool synthesis and workflow construction mechanism of the Phase-2 AIEP cognition architecture, enabling reasoning agents to dynamically compose workflows from registered tool capabilities in response to goal-directed task requirements.
Field of the Invention
[0002] The present invention relates to tool composition and workflow generation architectures for evidence-bound artificial intelligence systems.
[0003] More particularly, the invention relates to a system for synthesising task-specific workflows by composing registered tool capabilities into sequenced execution plans, governed by safety constraints and evidence-bound execution records.
Background
[0004] AI reasoning systems that interact with external tools or subsystems must plan sequences of tool invocations to achieve multi-step goals. Static tool invocation sequences hardcoded at design time cannot adapt to changing task requirements. Dynamic tool composition requires: a registry of available tool capabilities; a planning mechanism for sequencing tool invocations; safety constraints preventing unsafe tool compositions; and execution records for audit.
Summary of the Invention
[0005] The invention provides a Tool Synthesis and Workflow Construction Engine (TSWCE) that: maintains a registry of registered tool capabilities with their preconditions, postconditions, and safety classifications; accepts a goal specification from the Goal Formation Engine (P210); synthesises a workflow as an ordered sequence of tool invocations; validates the workflow against safety constraints (P215) and the Governance Constrained Workflow Synthesis Engine (P238); and executes the workflow through the Action Execution Engine (P206).
[0006] Workflow construction applies a planning algorithm over the tool registry, searching for sequences that transform the current world state to the goal target state. The planner is constrained by tool preconditions, resource budgets (P213), and the active governance policy.
ASCII Architecture
Goal Specification (from P210)
|
v
+------------------------------------------+
| Tool Synthesis and Workflow Construction |
| |
| Tool Registry: |
| Tool_A: pre=X, post=Y |
| Tool_B: pre=Y, post=Z |
| Tool_C: pre=Z, post=GOAL |
| |
| Planner: Sequence [A -> B -> C] |
+-------------------+----------------------+
|
v
Safety & Governance Check (P215 / P238)
|
APPROVED REJECTED
| |
v v
Workflow Execution Workflow Revision
(P206: Action Engine) / Goal Escalation
|
v
Execution Record (evidence artefact
admitted to ledger per step)
Definitions
[0007] Tool Synthesis and Workflow Construction Engine (TSWCE): The subsystem that accepts a goal specification, searches the tool registry for capability sequences that transform the current world state to the goal target state, and emits a validated workflow for execution.
[0008] Tool Registry: A structured catalogue of registered tool capabilities, each record comprising a tool identifier, precondition assertions, postcondition assertions, resource cost estimate, and safety classification.
[0009] Workflow: An ordered sequence of tool invocations derived by the planner, where each invocation’s postconditions satisfy the preconditions of the next invocation, terminating when the goal target state is achieved.
[0010] Precondition: A state assertion that must hold in the current world state before a tool invocation may be executed.
[0011] Postcondition: A state assertion that is guaranteed to hold in the world state after a tool invocation completes successfully.
Detailed Description
Tool Registry Management. [0012] The TSWCE maintains a persistent tool registry containing records for every tool available to the reasoning system. Each registry entry is signed by the tool provider and includes: a capability descriptor; precondition assertions expressed as CWSG node predicates; postcondition assertions expressed as CWSG node transitions; an estimated compute cost for resource planning (P213); and a safety classification for governance evaluation (P215). Registry updates are version-controlled, and the registry version hash is embedded in all workflow artefacts produced during a given registry version.
Workflow Planning Algorithm. [0013] On receipt of a goal specification from the Goal Formation Engine (P210), the TSWCE invokes a forward-chaining planning algorithm over the tool registry. The planner begins with the current world state (obtained from CWSG, P200) and iterates over applicable tools — those whose preconditions are satisfied by the current state — selecting the tool whose postconditions most advance the state toward the goal target. This process repeats until the goal state is reached or the planner determines no applicable sequence exists. Where multiple valid sequences exist, the planner selects the sequence with minimum total resource cost.
Safety and Governance Validation. [0014] Before a workflow is authorised for execution, it is submitted to the Safety Constraint and Governance Enforcement Engine (P215) and the Governance-Constrained Workflow Synthesis Engine (P238). The evaluation considers the full tool sequence as a unit, not only individual steps. If any step or combination of steps violates governance policy, the workflow is rejected and the planner is invoked with the offending tool excluded from the registry candidate set. If no compliant sequence can be found, the TSWCE returns a planning failure record to the GFORE (P210) for goal escalation.
Workflow Execution Dispatch. [0015] Approved workflows are dispatched step-by-step to the Action Execution Engine (P206). The TSWCE monitors each step’s execution receipt and compares the resulting world state postconditions to the expected postconditions from the plan. If a step’s actual outcome diverges from the planned postcondition, the TSWCE suspends execution, records a workflow divergence artefact, and either re-plans from the new world state or escalates to the goal formation layer.
Execution Record Admission. [0016] Each tool invocation produces an execution receipt from the Action Execution Engine (P206). The TSWCE aggregates these receipts into a workflow execution record comprising: the workflow identifier; tool registry version hash; ordered step receipts; final world state postconditions; and governance approval artefact reference. The workflow execution record is admitted to the AIEP evidence ledger as a single compound evidence artefact.
Technical Effect
[0017] The invention provides governed, auditable tool composition for multi-step AI task execution. By grounding the planner in registry-declared preconditions and postconditions, workflow correctness is verifiable by inspection. By submitting workflows to governance validation as complete sequences rather than individual steps, the engine prevents unsafe tool compositions that pass per-step evaluation but are hazardous in combination. By recording workflow execution as compound evidence artefacts, the engine provides full audit coverage for every AI-directed action.
Claims
-
A computer-implemented method for tool synthesis and workflow construction, the method comprising: (a) maintaining a tool registry comprising capability records each specifying a tool identifier, precondition assertions, postcondition assertions, a resource cost estimate, and a safety classification; (b) receiving a goal specification and invoking a forward-chaining planning algorithm over the tool registry to derive an ordered workflow of tool invocations whose postcondition chain transforms the current world state to the goal target state; (c) submitting the derived workflow as a complete sequence to a Safety Constraint and Governance Enforcement Engine for policy compliance evaluation; (d) dispatching approved workflows step-by-step to an Action Execution Engine, monitoring execution receipts, and comparing actual postconditions to planned postconditions at each step; (e) on postcondition divergence, suspending execution, recording a workflow divergence artefact, and re-planning from the updated world state; and (f) aggregating step receipts and governance approval artefacts into a workflow execution record and admitting the record to the AIEP evidence ledger.
-
The method of claim 1, wherein the planning algorithm selects among valid tool sequences by minimum total resource cost as estimated from registry cost records.
-
The method of claim 1, wherein, if no policy-compliant workflow sequence exists, the engine returns a planning failure record to the Goal Formation Engine for goal escalation.
-
The method of claim 1, wherein the tool registry version hash is embedded in all workflow execution records, enabling deterministic re-evaluation against the registry version in force at execution time.
-
The method of claim 1, wherein tool registry entries are version-controlled and entry updates invalidate all active workflows that depend on the updated tool.
-
A Tool Synthesis and Workflow Construction Engine comprising: one or more processors; memory storing a tool registry, a workflow store, and an execution record buffer; wherein the processors are configured to execute the method of claim 1.
-
A non-transitory computer-readable medium storing instructions that, when executed by a processor, implement the method of claim 1.
Abstract
A tool synthesis and workflow construction engine for evidence-bound artificial intelligence maintains a registry of tool capabilities with preconditions, postconditions, resource costs, and safety classifications. On receipt of a goal specification, the engine applies a forward-chaining planning algorithm to derive an ordered workflow, validates the complete sequence against governance policy, and dispatches it step-by-step to an action execution engine. Execution receipts and governance approvals are aggregated into compound workflow evidence artefacts admitted to the AIEP evidence ledger, providing full audit coverage for every AI-directed multi-step task. v Safety Governance Gate (P215) | v Workflow Execution (via P206)
---
## Detailed Description
[0007] **Tool Registry.** Each registered tool has: `tool_id`; `capability_description`; `input_schema`; `output_schema`; `preconditions` (world state conditions that must hold for the tool to be applicable); `postconditions` (world state changes produced by tool invocation); `resource_cost` (compute estimate); and `safety_class` (unrestricted / supervised / restricted / forbidden).
[0008] **Planning Algorithm.** The planner uses precondition-postcondition chaining to identify tool sequences that transform the current world state to the goal target state. The planner respects tool ordering constraints, avoids forbidden tools, and minimises resource cost within the configured budget.
[0009] **Workflow Record.** Each synthesised workflow is recorded as an evidence artefact comprising: the goal specification; the tool sequence; the precondition and postcondition chain; and the governance approval record. Workflow execution proceeds step-by-step through the Action Execution Engine (P206).
[0010] **Partial Execution Recovery.** If a workflow step fails during execution, the TSWCE records the failure, updates the world state, and re-plans from the current state to the goal, producing an adapted workflow that avoids the failed tool.
---
## Claims
1. A tool synthesis and workflow construction engine for an evidence-bound reasoning architecture that composes registered tool capabilities into goal-directed execution workflows.
2. The system of claim 1 wherein tool composition is constrained by preconditions, postconditions, and safety classifications.
3. The system of claim 1 wherein synthesised workflows are admitted as evidence artefacts before execution.
4. The system of claim 1 wherein partial execution failures trigger adaptive re-planning from the current world state.
5. The system of claim 1 wherein tool safety classifications gate the inclusion of restricted tools in synthesised workflows.