Agent Harness vs. Ontology: Separating Execution Loops from Business Meaning
In software engineering, Agent = Model + Harness. In enterprise production, Enterprise Agent = Model + Harness + Ontology.
- 01The agent harness governs HOW an agent runs: tool loops, context compaction, retries, sub-agents, and streaming.
- 02The ontology governs WHAT your business means and WHAT is permitted: entity resolution, joins, status codes, RBAC, and write-gates.
- 03Embedding SQL rules and permission warnings inside harness system prompts creates multi-agent drift and security holes.
1. Why Coding Harnesses Look Self-Sufficient—Until They Hit ERP Data
Modern agent harnesses navigate 100,000-line codebases impressively because source code carries explicit names and a compiler or test suite immediately flags mistakes. Enterprise databases offer neither: cryptic column names carry no inline explanation, and a wrong LEFT JOIN returns plausible-looking inflated revenue with zero errors.
2. Clean Architectural Separation Over MCP
Keeping business semantics out of harness prompts makes your entire stack model-agnostic and harness-agnostic:
// ANTI-PATTERN: Stuffing domain logic into harness prompts
systemPrompt = "Remember: STAT=9 is cancelled, never join ORD_HDR directly to PAYMENTS,
and hide UNIT_COST unless the user says they are in Finance..."
// CLEAN ARCHITECTURE: Harness runs loop; Ontology enforces semantics & RBAC
const observation = await mcpClient.callTool("ontology.sales_backlog", {
segment: "STRATEGIC",
}); // Principal identity, chasm-trap prevention & field masking enforced server-sideIf changing your company’s definition of "Active Customer" requires editing more than one prompt file, business semantics have leaked into your harness layer.
Glossary Concepts Referenced in This Guide
Agent = Model + Harness) responsible for tool-calling loops, context compaction, retries, sandboxing, and execution traces.UPDATE/INSERT statements on ERP/CRM databases, requiring typed action proposals validated against preconditions and approved by a named human role.Free to reference in engineering docs, ADRs, articles, and course syllabi with attribution.
[Agent Harness vs. Ontology: Separating Execution Loops from Business Meaning — Ontoloji.org](https://ontoloji.org/en/guides/agent-harness-vs-ontology-architecture)