How Ontology-Driven Agents Provide Secure, Controllable Execution in Harness Engineering

The article analyzes the current Agent hype, explains why autonomous agents often lack business‑level safety and control, and proposes an ontology‑driven Harness Engineering framework that embeds constraints, context management, and feedback loops directly into the business semantics, illustrated with the Knora implementation and real‑world case studies.

DataFunTalk
DataFunTalk
DataFunTalk
How Ontology-Driven Agents Provide Secure, Controllable Execution in Harness Engineering

1. From the Agent Hype to the "Uncontrollable" Problem

In 2024‑2025, agents become the main form of enterprise AI, capable of planning, tool use, and multi‑step execution. However, when deployed in real business, agents frequently misuse terminology, deviate in reasoning, and produce results that violate corporate rules, effectively "confidently doing the wrong thing".

The root cause is not model weakness but the absence of a "structure that knows the rules"—agents know how to act but lack awareness of industry boundaries and enterprise decision policies.

2. Redefining "Safe and Controllable" Execution

The article breaks down the safety‑controllability proposition into multiple independent yet related dimensions:

Permission & Isolation: Who can do what? Can data cross domains? (RBAC/ABAC, API gateways, data sandboxes)

Behavior Constraints: What are the reasoning and invocation limits of the agent? (Prompt constraints, tool whitelists, ontology modeling)

Audit & Traceability: What was done? Can the decision process be reproduced? (Operation logs, decision‑chain tracking, explainability frameworks)

Exception Handling: How to degrade or roll back on errors? (Circuit breakers, manual review nodes, idempotent design)

Result Validation: Does the output satisfy business rules? (Rule engines, formal verification, ontology‑based constraint checks)

Compliance Alignment: Does it meet regulatory requirements? (Compliance knowledge base, approval‑flow integration, auditable reports)

The ontology‑driven solution focuses on the "Behavior Constraints" and "Result Validation" dimensions, providing a semantic infrastructure layer rather than replacing other engineering measures.

3. Architecture Constraints: From External Fences to Built‑In Skeleton

Traditional engineering constraints work in simple scenarios but face three structural difficulties 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 changes this by defining the agent's action space within the business structure itself. Constraints become an intrinsic skeleton rather than an added fence. Rules are stored as queryable, verifiable structures instead of prompts, and tools are managed by the ontology layer.

During execution, the agent’s intent is compared against the ontology after generation; violations trigger immediate rejection instead of silent passage.

4. Context Engineering: From "Memory Augmentation" to "Memory Reconstruction"

Agents often lose context in long tasks, repeatedly asking for basic information or forgetting critical data. The underlying issue is linear text stacking without structure.

Ontology provides a structured business semantic network, enabling three concrete improvements:

Precise Retrieval Instead of Full Injection: Before the agent starts, the cognition engine extracts a relevant semantic sub‑graph from the ontology and injects only the necessary context, eliminating overflow and irrelevant information.

Consistency Assurance: A unified semantic network resolves outdated, conflicting, or redundant knowledge, ensuring the agent always reasons on the latest consistent data.

Cross‑Task Reuse: The same semantic structure serves multiple tasks, allowing agents to act on a continuously maintained "business map" rather than rebuilding context each time.

Additionally, the ontology bridges the gap between symbolic knowledge‑graph reasoning (deterministic but limited) and pure LLM reasoning (flexible but uncontrolled). Where the ontology covers a domain, it enforces deterministic constraints; where it does not, the LLM fills the gap with confidence‑annotated results.

5. Feedback Loop: From Subjective Evaluation to Traceable Verification

Current feedback mechanisms rely on a separate evaluator model, which can be fooled by superficially plausible outputs and lacks business‑level judgment.

The ontology‑driven approach replaces subjective assessment with objective, structure‑based verification. Business judgments that can be rule‑based (e.g., quota limits, prerequisite checks) are encoded in the ontology, allowing each agent output to be automatically compared against these constraints.

Hard constraints are verified directly; soft constraints that require nuance are handled by an LLM evaluator or human review, forming a complementary loop.

The loop also enables continuous ontology evolution: mismatches between agent decisions and ontology highlight uncovered concepts, prompting updates and improving the knowledge base over time.

Every verification result is traceable to specific ontology nodes, satisfying audit requirements in regulated industries.

6. From Technical Controllability to Business Controllability – The Knora Implementation Path

Knora, the platform built by 悦点科技, materializes the methodology into a layered collaborative system:

Ontology Layer (Knowledge Base): Stored in a label‑property graph (LPG) with five core concepts—Entity, Relation, Event, Action, Logic—defining business objects, their connections, state changes, executable operations, and workflow orchestration.

Cognition Engine (Translation & Arbitration): Before agent activation, it queries the ontology for relevant entities, relations, and rules, injecting them into the agent’s reasoning context. After generation, it validates the result against the ontology and forces re‑reasoning on violations.

Agent Execution Layer: Receives user tasks, invokes tools, and produces results, but all tool usage, triggers, and process flows are dictated by the ontology rather than ad‑hoc prompts.

The data flow is: User Task → Ontology‑driven Context Injection → Agent Reasoning → Ontology Validation → Approved Output.

A concrete example in a manufacturing scenario shows how a work‑order change request is intercepted, checked against approval thresholds defined in the ontology, blocked if missing required relationships, and routed to an automated approval task with full audit logging.

7. Automatic Modeling and Human‑in‑the‑Loop

Cold‑starting a large‑scale ontology is costly; manual construction can take weeks. Knora adopts a layered, confidence‑driven approach:

Highly structured, rule‑like tasks (e.g., field‑to‑property mapping, DAG generation) are fully automated.

Ambiguous semantic judgments receive confidence scores; high confidence executes automatically, medium confidence prompts human confirmation, low confidence queues for review.

Human corrections feed back into the system, gradually reducing manual effort as templates and domain samples accumulate.

8. Real‑World Deployments and Impact

Knora has been deployed in energy transport, electronics manufacturing, finance, and security:

In railway comprehensive inspection reporting, a process that previously required 30 person‑days was reduced to a single‑day review plus 30 minutes of automated generation—a >70× efficiency gain.

In electronics manufacturing, quality traceability and defect analysis have been transformed from experience‑driven manual flows to precise, knowledge‑driven automated pipelines.

9. Conclusion

Enterprise AI is at a crossroads: continue stacking tools and prompts, or first construct a semantic business skeleton that guides agents. The latter provides clear boundaries, auditable rules, and a continuously evolving knowledge base—forming a durable moat that outlasts any specific model or tool.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

AI agentsfeedback loopenterprise AIontologyKnorasemantic architecturecontrollable execution
DataFunTalk
Written by

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.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.