- Updated: July 13, 2026
- 7 min read
Workflow as Knowledge: Semantic Persistence for LLM-Mediated Workflows
Direct Answer
The paper “Workflow as Knowledge: Semantic Persistence for LLM‑Mediated Workflows” introduces a language‑agnostic conceptual model that treats workflow definitions, executions, and their artefacts as first‑class knowledge objects stored in a persistent semantic substrate. By distinguishing deterministic “derive” steps from LLM‑driven “infer” steps, the model enables workflows to be inspected, resumed, and audited as reusable knowledge, opening a path toward more reliable, transparent, and composable AI agents.
Background: Why This Problem Is Hard
LLM‑powered applications increasingly rely on multi‑step pipelines that combine tool use, data retrieval, conditional branching, and human approval. In practice, developers stitch together prompts, API calls, and checkpoint logic using ad‑hoc scripts or proprietary orchestration platforms. This approach creates several pain points:
- Ephemeral state: Execution traces are often logged in flat files or temporary databases, making it difficult to reconstruct the exact reasoning path that led to a decision.
- Opaque inference: When an LLM makes a judgment, the underlying prompt, temperature, and context are rarely captured alongside the result, limiting reproducibility.
- Tool integration friction: Existing workflow engines (e.g., Airflow, Prefect) excel at deterministic tasks but lack native support for LLM‑mediated steps that require policy‑controlled execution.
- Versioning and branching: Modifying a workflow often requires duplicating scripts, leading to divergent code bases and hidden dependencies.
Current solutions either treat LLM calls as black‑box functions or embed them in custom DSLs that tie the workflow to a specific language runtime. Neither approach offers a unified knowledge representation that survives beyond a single run, nor does it provide a principled way to separate deterministic computation from probabilistic inference.
What the Researchers Propose
The authors present a Lisp‑inspired, language‑independent framework built around three core ideas:
- Symbolic Forms as Knowledge Objects: Every workflow component—definition, instance, inference record, or context snapshot—is encoded as a persistent object with a unique identity.
- Derive vs. Infer Distinction: Derive denotes pure, deterministic transformations over the current knowledge base (e.g., data cleaning, arithmetic). Infer represents LLM‑mediated judgments that respect a declared execution context and a policy governing which capabilities (search, tool use, human approval) the model may invoke.
- Live‑Image Thinking: The system maintains a continuously evolving “image” of the knowledge substrate, allowing agents to query, modify, and resume workflows without restarting from scratch.
In this view, a workflow is no longer a transient script but a first‑class knowledge artifact that can be inspected, versioned, and shared across teams.
How It Works in Practice
At a high level, the framework consists of four interacting layers:
1. Knowledge Substrate
A graph‑based store (e.g., a triple store or a vector‑augmented database) holds all objects: workflow definitions, execution instances, inference records, and context snapshots. Each object carries metadata such as creator, timestamp, and policy tags.
2. Executor Engine
The engine reads a workflow definition, resolves dependencies, and decides for each node whether to derive (run a deterministic function) or infer (invoke an LLM). Policy rules attached to the workflow dictate which LLM capabilities are permissible at each step.
3. LLM Mediator
When an infer node is reached, the mediator constructs a prompt that includes the current knowledge context, the policy constraints, and any tool‑use specifications. The LLM’s response, together with the prompt and policy, is stored as an inference record linked to the originating node.
4. Inspector & Resumer
Developers or autonomous agents can query the knowledge substrate to retrieve any past inference, replay deterministic steps, or branch the workflow from a saved snapshot. Because every step is a knowledge object, the system can generate a complete audit trail without external logging.
The following diagram illustrates the data flow:

What sets this approach apart is the explicit, policy‑driven separation of deterministic and probabilistic computation, and the treatment of the entire execution history as a mutable knowledge graph rather than a series of side‑effects.
Evaluation & Results
The authors built a prototype on top of an open‑source vector store and evaluated three scenarios that mirror real‑world LLM‑mediated pipelines:
- Document‑Driven Q&A: A workflow that retrieves relevant sections from a knowledge base, asks an LLM to synthesize an answer, and then validates the response via a rule‑based checker.
- Multi‑Tool Orchestration: A pipeline that chains a code‑generation LLM, a sandbox executor, and a post‑processing formatter, with human approval required before deployment.
- Branch‑And‑Resume Debugging: A scenario where a failed inference is inspected, the policy is tightened, and the workflow is resumed from the last successful snapshot.
Key findings include:
- Auditability: Every inference record was automatically linked to its originating prompt and policy, enabling a one‑click reconstruction of the reasoning path.
- Resumability: In the branch‑and‑resume test, the system recovered from failure in under 2 seconds, compared to a manual re‑run that took >30 seconds.
- Policy Enforcement: When a policy prohibited external web searches, the LLM mediator respected the constraint, and the system flagged any attempt to breach it.
- Overhead: The additional metadata storage added less than 5 % latency to each LLM call, a trade‑off many enterprises consider acceptable for the gain in transparency.
These results demonstrate that semantic persistence can be layered onto existing LLM workflows without prohibitive performance penalties while delivering tangible benefits in traceability and control.
Why This Matters for AI Systems and Agents
For practitioners building production‑grade AI agents, the paper’s contributions address three critical gaps:
- Reliability through Replayability: Agents can resume from a known good state after a mis‑prediction, reducing downtime and manual debugging.
- Governance and Compliance: By encoding policy constraints directly into the knowledge graph, organizations can enforce data‑usage rules, audit LLM decisions, and meet regulatory requirements.
- Composable Knowledge Sharing: Teams can publish workflow definitions as reusable knowledge objects, fostering a marketplace of vetted AI pipelines.
These capabilities align closely with the needs of modern AI orchestration platforms. For example, the Workflow automation studio can ingest the persistent knowledge objects described in the paper, allowing developers to visualize, edit, and version LLM‑mediated pipelines without leaving the UI. Similarly, the Enterprise AI platform by UBOS can leverage the derive/infer distinction to enforce enterprise‑wide policies on tool usage and data access.
What Comes Next
While the prototype validates the core ideas, several open challenges remain:
- Formal Semantics: The paper outlines a high‑level model but does not provide a rigorous operational semantics for derive/infer transitions. Future work should formalize these rules to enable automated verification.
- Scalability of the Knowledge Substrate: Storing every inference record at scale may require sharding strategies and efficient indexing, especially for high‑throughput LLM services.
- Policy Language Design: A declarative, expressive policy language is needed to capture nuanced compliance requirements (e.g., GDPR, HIPAA) without over‑constraining the LLM.
- User‑Facing Tooling: Building intuitive editors that surface the knowledge graph, allow drag‑and‑drop workflow composition, and surface inference provenance will be essential for adoption.
Potential applications extend beyond traditional AI agents. For instance, AI marketing agents could store campaign‑generation workflows as knowledge objects, enabling marketers to audit how an LLM crafted copy and to resume campaigns after regulatory review. Start‑ups can accelerate prototyping by leveraging UBOS for startups, which already integrates a knowledge‑centric workflow engine with popular LLM providers.
In the longer term, the concept of “semantic persistence” could become a foundational layer for a new generation of AI operating systems, where every action—whether a deterministic script or a probabilistic inference—is recorded as reusable knowledge, ready to be queried, recombined, and governed.
Conclusion
The “Workflow as Knowledge” paper reframes LLM‑mediated pipelines from fragile scripts into durable knowledge artifacts. By cleanly separating deterministic derivations from LLM‑driven inferences and persisting every step in a shared semantic substrate, the model offers a path toward more transparent, controllable, and reusable AI workflows. Early prototypes show modest overhead and significant gains in auditability and resumability, suggesting that semantic persistence could become a cornerstone of enterprise‑grade AI orchestration. As the community builds formal semantics, scalable storage, and user‑friendly tooling, we can expect to see this approach power the next wave of trustworthy, composable AI agents.
Andrii Bidochko
CTO UBOS
Andrii Bidochko is an AI entrepreneur and researcher focused on AI agents, reinforcement learning, and autonomous systems. He writes about the technologies shaping the future of machine intelligence, from frontier models and agent architectures to real-world AI applications.