How Ontology‑Driven Agents Enable Controllable Execution in Harness Engineering
The article analyzes why the current wave of AI agents often “run out of control,” proposes a multi‑dimensional safety framework built on ontology‑driven semantic infrastructure, and demonstrates its practical impact through architecture constraints, context engineering, feedback loops, and the Knora platform’s real‑world deployments.
From Agent Hype to Uncontrollable Behavior
In 2024‑2025 agents become the main form of enterprise AI, capable of planning, tool use, and multi‑step execution. In demo environments they perform well, but in production they frequently misuse terminology, drift in reasoning, and violate business rules because they lack a structural understanding of the domain.
Redefining the Problem: "Safe and Controllable" Execution
The author breaks down safety and controllability into independent yet related dimensions:
Permission & Isolation : Who can do what? Can data cross boundaries? (RBAC/ABAC, API gateways, data sandboxes)
Behavior Constraints : What are the agent’s inference and tool‑calling limits? (Prompt constraints, whitelist, ontology modeling)
Audit & Traceability : What was done and can the decision path be reproduced? (Operation logs, decision‑chain tracking, explainability frameworks)
Exception Handling : How are errors degraded or rolled back? (Circuit‑breakers, manual review nodes, idempotent design)
Result Validation : Does the output satisfy business rules? (Rule engine, formal verification, ontology‑based checks)
Compliance Alignment : Does the process meet regulatory requirements? (Compliance knowledge base, approval flow integration, auditable reports)
The ontology‑driven approach focuses on the Behavior Constraints and Result Validation dimensions, providing a semantic foundation that turns constraints from external fences into an internal skeleton.
Architecture Constraints: From External Fences to Built‑In Skeleton
Traditional engineering constraints work for simple scenarios but face three structural challenges in complex business:
Rule count grows with business complexity, inflating maintenance cost.
Rules expressed in natural language are ambiguous and can be bypassed.
Semantic relationships between rules and business objects are implicit, preventing reuse.
Ontology solves these by defining the agent’s action space within the business structure itself. Constraints are no longer added on top of the agent; they are embedded in the ontology, making validation deterministic and traceable.
Context Engineering: From Memory Padding to Memory Reconstruction
Long‑running tasks cause agents to “forget” essential information, leading to repeated queries or loss of context. The root cause is linear text stacking without structure. By modeling business data, processes, and relationships as a graph, the ontology enables:
Precise Retrieval : Before execution, the cognition engine extracts a relevant semantic sub‑graph and injects only the needed context, avoiding overflow.
Consistency Assurance : A unified semantic network detects outdated, conflicting, or redundant information.
Cross‑Task Reuse : The same semantic structure serves multiple tasks, eliminating the need to rebuild context each time.
This also bridges the gap between symbolic knowledge‑graph reasoning (deterministic but limited) and LLM reasoning (flexible but opaque). The ontology provides deterministic constraints where coverage exists, while LLMs fill the gaps with confidence annotations.
Feedback Loop: From Subjective Evaluation to Traceable Verification
Current feedback mechanisms rely on a secondary evaluator model, which can be fooled by superficially plausible outputs. Ontology enables direct, objective verification: business rules are formalized and can be automatically checked against each agent output. Hard constraints (e.g., amount limits) are verified deterministically; soft constraints trigger LLM or human review, forming a complementary loop.
The loop also drives ontology evolution: mismatches between agent actions and ontology highlight uncovered concepts, prompting updates and improving future reasoning.
From Technical Controllability to Business Controllability – The Knora Implementation Path
1. Constraints Originate from Business, Not Engineering Glue
Traditional Harness solutions rely on manually written prompts and configuration; they become brittle as business complexity exceeds engineering capacity.
2. Knora System Architecture
Knora (by 悦点科技) materializes the methodology in a three‑layer stack:
Ontology Layer (Knowledge Base) : Stored as a labeled‑property graph (LPG) with five core concepts—Entity, Relation, Event, Action, Logic. Entities represent business objects (e.g., work orders); Relations capture semantic links; Actions define executable operations with preconditions and parameter constraints; Logic (a DAG) orchestrates workflows.
Cognition Engine (Translation & Arbitration) : Before an agent runs, it queries the ontology for the current scenario, extracts relevant entities, rules, and tools, and injects this structured context into the LLM. After generation, the engine validates the result against the ontology and either approves it or forces re‑reasoning.
Execution Layer (Agent Executor) : Receives the enriched context, performs tool calls, and produces results. All tool usage, triggers, and process flows are dictated by the ontology, not by ad‑hoc prompt engineering.
3. Concrete Work‑Order Change Example
Scenario: Change the planned production quantity of work order WO‑2026‑0312 from 500 to 800.
User intent is captured.
Cognition engine queries the ontology and finds the work order entity, its current state, and the applicable approval threshold (20%).
It discovers that the requested 60% increase exceeds the threshold, triggering the requiresApproval = true rule.
Constraint validation fails because the required approvedBy relation is missing.
System blocks the write, generates a structured error report, and creates an approval task routed to the BOM Engineer and Production Manager.
After approval, the approvedBy relation is added, the constraint passes, and the change is persisted.
4. Automated Modeling & Human‑in‑the‑Loop
Building an enterprise ontology from scratch is costly. Knora adopts a layered approach: highly structured, high‑confidence tasks (e.g., field‑to‑property mapping, DAG generation) are automated; ambiguous semantic judgments receive confidence scores, with medium confidence prompting human confirmation and low confidence entering a review queue. Human feedback is fed back to improve future automation.
5. Real‑World Deployments
Knora is already used in energy transport, electronics manufacturing, finance, and security:
In railway inspection, a digital agent reduced a 30‑person, 7‑day reporting process to a 3‑person, 30‑minute workflow—a >70× efficiency gain.
In electronics manufacturing, quality‑traceability and defect‑analysis pipelines have been fully automated, replacing experience‑driven manual steps.
Conclusion
The future of enterprise AI hinges on whether agents continue to be glued together with prompts or operate on a well‑defined semantic map. Ontology‑driven Harness Engineering provides that map, ensuring agents know their boundaries, the rules governing decisions, and the provenance of every action. This semantic foundation becomes a self‑evolving business intelligence base that outlasts any single model or tool.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
DataFunTalk
Dedicated to sharing and discussing big data and AI technology applications, aiming to empower a million data scientists. Regularly hosts live tech talks and curates articles on big data, recommendation/search algorithms, advertising algorithms, NLP, intelligent risk control, autonomous driving, and machine learning/deep learning.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
