# Architecture & Documentation

Canonical URL: https://naditu.com/docs

Naditu runs inside your own network boundary over live ERP, CRM, MES and relational databases without moving operational records into a new lakehouse. Use this reference to inspect how canonical objects, learned cross-system joins, directory-backed policies, human write gates and OpenTelemetry audit logs fit together.

## Summary

- **Deployment model:** Enterprise on-premises inside your network
- **Source reads:** Zero-copy over read replicas & scoped views
- **Agent interface:** Streamable HTTP MCP · search · get_record · lineage · explain_policy
- **Operational writes:** Human-approved official ERP APIs · zero raw SQL mutation

## Five specifications covering the whole stack.

- **01 · [Ontology Model: Objects, Links, Terms & Rules](https://naditu.com/docs/ontology-model):** Raw enterprise tables rarely declare foreign keys across modules and never declare links across separate vendors. Naditu records business objects, verified join paths, aggregation boundaries and local status-code meanings in one versioned layer.
- **02 · [MCP Server & Tool Reference](https://naditu.com/docs/mcp-tools):** Naditu exposes your governed ontology over the Model Context Protocol (MCP 2026-07-28 Streamable HTTP) from inside your network. Instead of dumping hundreds of raw database table schemas into an agent context window, Naditu serves four deterministic, caller-scoped tools.
- **03 · [Identity & Access Policies](https://naditu.com/docs/permissions-and-idp):** Prompt-based access instructions fail security audits because a model cannot safeguard records already loaded into its context. Naditu binds your existing identity provider groups to deterministic row predicates, column masks and actor rules evaluated before any database query runs.
- **04 · [Write Gates & Versioned Change Control](https://naditu.com/docs/write-gates):** Writing directly into ERP tables with INSERT or UPDATE statements bypasses tax calculation, stock reservation, credit-limit checks and statutory e-invoice numbering. Naditu blocks all SQL mutations and routes every operational or ontology change through typed API gates and versioned approvals.
- **05 · [On-Premises Deployment & Audit Log Schema](https://naditu.com/docs/deployment-and-audit):** Naditu is deployed on-premises on Linux servers or Kubernetes clusters you control. Operational databases, ontology definitions, credentials and audit logs stay inside your network boundary, with cloud LLM connectivity under your own provider agreement—or fully air-gapped with local models when required.

## Four deterministic stages inside your boundary.

Every assistant or agent tool call passes through the same four on-premises layers before a single field is returned or a single business action is staged.

01. **Live operational systems stay in place (`Read Replicas · Official APIs`):** ERP, CRM, MES, WMS and quality databases remain the system of record. Naditu connects to read-only replicas or tightly scoped views for queries, and routes approved actions exclusively through vendor-supported business-object APIs.
02. **Ontology resolves joins and local status codes (`Objects · Links · Terms`):** Cryptic schemas such as ORD_HDR, ORD_LIN and WO_HDR map to canonical business objects, evidence-backed cross-system links (account.erp_code = CUST.CODE) and process-confirmed status dictionaries (STAT = 4 -> shipped, not yet invoiced).
03. **Identity rules and masks execute in code (`SSO · OIDC · Write Gates`):** Okta, Microsoft Entra ID and OIDC group claims determine row predicates, column masks (unit_cost: masked), closed payroll table blocks and whether an action requires named human approval or is refused outright.
04. **Served over MCP with W3C audit telemetry (`MCP 2026-07-28 · OTel SIEM`):** Governed payloads travel over Streamable HTTP MCP directly to Claude, ChatGPT, internal harnesses or corporate gateways (LiteLLM, Archestra, Kong), while every call emits a structured OpenTelemetry / SIEM audit event.

## One operational question. Four caller identities.

Switch the caller below to inspect how Naditu evaluates directory groups, territory row filters, column-level masks, status-code translations and ERP write gates in code before any payload reaches an AI model.

**Sample Question:** "Which open orders for Halvorsen Freight and Mandel Tooling are running late in production, and what is our unit cost exposure?"

- **Sales · EMEA** (`role: sales.emea` · `okta:group:sales-emea`): Sees EMEA accounts and quoted prices, while manufacturing unit cost is masked and North America accounts are withheld at the row layer. — Write gate `propose_delivery_update(order_id: "ORD-10482")`: `approval_required`.
- **Finance** (`role: finance.global` · `entra:group:finance-global`): Sees both global accounts, quoted prices, unit cost exposure and overdue balances, while payroll and personnel tables remain permanently closed. — Write gate `release_credit_hold(account: "Mandel Tooling")`: `approval_required`.
- **Production Planner** (`role: plant.planning` · `entra:group:plant-planning`): Sees both shop-floor work orders, assigned machines, scrap rates and due dates across plants, while quoted prices, unit costs and credit limits are masked. — Write gate `reschedule_work_order(wo_id: "WO-8849", machine: "MILL-05")`: `approval_required`.
- **Scheduled Agent** (`actor: agent.nightly` · `spiffe://naditu.internal/agent/nightly-digest`): Unattended cron agent receives late-order operational summaries with buyer PII and unit costs masked, and any write-back attempt is deterministically refused (verdict: never). — Write gate `update_due_date(order_id: "ORD-10489", due_date: "2026-06-25")`: `verdict: never`.
