Agentic ERP & Software · Live

AyoWork — Agentic ERP & Business Operating System

An agentic ERP and business operating system unifying double-entry ledgers, multi-tenant enterprise memory (AyoBrain), and permissioned tool gateways.

AyoWork Executive Reporting & Lakehouse Intelligence UI for Predator Cycling LLC
FIG. 01 — AyoWork Executive Reporting & Lakehouse Intelligence UI for Predator Cycling LLCAgentic ERP & Software
On this page13 sections

In custom manufacturing and physical engineering, operational friction is rarely caused by a shortage of data. Industrial data is abundant. The fatal breakdown occurs in the structural chasm between commercial transaction systems and shop floor execution: e-commerce channels, CAD/PLM databases, inventory stores, and CNC machine controllers live in mutually hostile silos.

When commercial ledgers and operational systems are disconnected, manufacturing defaults to reactive firefighting. Orders sit unfulfilled while administrators translate spreadsheets into production build sheets; composite pre-pregs exceed out-life limits while awaiting batch verification; and machines sit idle waiting on material allocations.

I architected AyoWork as an Agentic Business Operating System to solve this failure mode at its mathematical root. Rather than treating artificial intelligence as a conversational gimmick or an unconstrained script, AyoWork embeds multi-agent orchestration within an immutable double-entry ledger, a multi-tenant enterprise memory engine (AyoBrain), and a strict seven-boundary permissioned tool gateway. In this environment, software operates as an invisible workforce: agents continuously orchestrate bank reconciliations, inventory reservations, purchase orders, and bill-of-materials (BOM) lifecycles without ever obtaining unmediated write access to the underlying ledger.


The Architectural Imperative: Beyond Reactive ERP

Traditional enterprise resource planning (ERP) platforms are static databases wrapped in forms. They demand continuous human intervention to log line items, balance accounts, and verify supplier invoices. When organizations attempt to automate these workflows with contemporary language models, they quickly discover a catastrophic mismatch between model behavior and enterprise finance.

A double-entry general ledger is a deterministic machine governed by mathematical invariants: total debits must equal total credits for every transaction (∑Debits=∑Credits\sum \text{Debits} = \sum \text{Credits}). If debits and credits do not balance, the transaction must be rejected. Conversely, large language models are probabilistic reasoning engines. They are “usually right”—which is precisely why an unconstrained agent is dangerous in production finance. A probabilistic hallucination in marketing copy is an editorial annoyance; a probabilistic hallucination in a financial journal entry, lot-tracked inventory reservation, or CNC router setup is an audit crisis or scrapped production run.

┌────────────────────────────────────────────────────────────────────────┐
│                        AYOWORK ORCHESTRATION LOOP                      │
├─────────────────┐      ┌────────────────────┐      ┌───────────────────┤
│  PROBABILISTIC  │      │   DETERMINISTIC    │      │    IMMUTABLE      │
│  AGENT PROPOSAL │ ───► │  GATEWAY & SAFETY  │ ───► │  LEDGER MUTATION  │
│ (Typed Payload) │      │  VALIDATION LAYER  │      │  (Double-Entry)   │
└─────────────────┘      └────────────────────┘      └───────────────────┘
         ▲                         │                           │
         │                         ▼                           │
         │               ┌────────────────────┐                │
         └────────────── │  AYOBRAIN RETRIEVAL│ ◄──────────────┘
                         │ (HNSW + Telemetry) │
                         └────────────────────┘

The fundamental design principle of AyoWork is straightforward: agents propose; deterministic engines validate and execute. Agents are never granted direct SQL write privileges, raw shell access, or unrestricted API credentials. Every business state mutation must be expressed as a typed schema payload, submitted to a validation gateway, and cryptographically recorded.

KEY ARCHITECTURAL INVARIANT: Reliability in an agentic enterprise does not come from waiting for larger foundational models. It comes from the rigid boundaries engineered around the model. Treat models as talented junior engineers: capable of high-speed synthesis and schema generation, but never trusted to mutate production ledgers without deterministic verification.


AyoBrain Enterprise Memory: Hybrid HNSW & Analytical Telemetry

An autonomous agent operating without memory must rediscover your enterprise rules, customer histories, and vendor nuances on every cycle. Conversely, an agent operating on unstructured, unversioned memory inevitably hallucinates based on stale facts. To establish durable institutional knowledge across my companies, I developed AyoBrain as AyoWork’s multi-tenant hybrid enterprise memory engine.

Personal Developer Harness vs. Multi-Tenant Enterprise Architecture

It is critical to distinguish between development orchestration and production ERP storage:

  • GBrain & GStack (Developer & Engineering Harness): In my personal engineering workflow across IDEs, terminal copilot sessions, and autonomous server daemons, I utilize GBrain and GStack (acknowledging inspiration from Garry Tan’s work on structured cognitive loops and memory-augmented agent workflows). This architecture provides graph-linked associative memory, pre-flight invariant verification, and cross-session learning for codebase architecture.
  • AyoBrain (Production Multi-Tenant ERP Memory): Within the production AyoWork enterprise platform, I architected AyoBrain from the ground up for multi-tenant isolation, enterprise role-based access control (RBAC), cryptographic tenant partitioning, and immutable audit provenance. AyoBrain ensures that proprietary costing matrices, supplier contracts, and intellectual property remain strictly segmented across corporate entities.

The Hybrid Storage Topology

AyoBrain partitions cognitive state across two complementary storage engines optimized for distinct operational profiles:

┌─────────────────────────────────────────────────────────────────────────────┐
│                          AYOBRAIN STORAGE TOPOLOGY                          │
├──────────────────────────────────────┬──────────────────────────────────────┤
│    TRANSACTIONAL & SEMANTIC STATE    │          ANALYTICAL TELEMETRY        │
│          PostgreSQL + pgvector       │            Google BigQuery           │
├──────────────────────────────────────┼──────────────────────────────────────┤
│ • 3072-Dimension Vector Embeddings   │ • Multi-year Historical Event Logs   │
│ • HNSW (m=16, efConstruction=64)     │ • High-throughput Machine Heartbeats │
│ • Entity-Graph Topology & Taxonomies │ • Fleet Telemetry & Sensor Readings  │
│ • Sub-25ms Graph-Vector Traversal    │ • Long-horizon Financial Analytics   │
│ • Tenant-Isolated Row Level Security │ • Audit Replay & Anomaly Detection   │
└──────────────────────────────────────┴──────────────────────────────────────┘
  1. PostgreSQL with pgvector (Transactional & Semantic State): AyoBrain indexes enterprise documentation, standard operating procedures, supplier contracts, and ledger entries using 3072-dimension embeddings generated via high-density representation models. Using Hierarchical Navigable Small World (HNSW) indexing with tuned graph connectivity parameters (m=16, efConstruction=64), AyoBrain delivers sub-25ms approximate nearest-neighbor retrieval. Vector queries are strictly constrained by PostgreSQL Row Level Security (RLS) policies enforcing tenant boundary isolation.
  2. Google BigQuery (High-Throughput Analytical Telemetry): While transactional embeddings reside in PostgreSQL, time-series telemetry—machine spindle speeds, cure oven thermal thermocouple streams, inventory location pings, and high-frequency audit traces—streams into BigQuery. AyoBrain federates queries between PostgreSQL’s semantic graph and BigQuery’s analytical tables, allowing an agent to correlate high-level supplier invoice discrepancies with edge-level sensor logs recorded months prior.

The Five-Stage Memory Verification Protocol

To prevent hallucinated memories from poisoning the operating system, AyoBrain enforces a strict verification lifecycle:

  1. Retrieve: Query semantic vectors and entity graphs relevant to the pending proposal.
  2. Verify: Cross-reference state-sensitive claims directly against the authoritative ground truth—the general ledger, git commit hash, physical inventory bin, or deployment log. If memory disagrees with physical or financial state, the physical state prevails and memory is invalidated.
  3. Execute: Formulate typed payloads through the tool gateway.
  4. Record: Log the executed transaction, decision rationale, and model output with cryptographic provenance.
  5. Status Tagging: Classify every durable knowledge entry as Current, Historical, Superseded, or Needs-Revalidation.

The 7-Boundary Architecture & Permissioned Tool Gateway

To eliminate unmediated system access, AyoWork segments all agent interactions across seven isolated operational boundaries. Each boundary possesses an explicit remit and explicitly refuses to absorb the responsibilities of adjacent layers:

LayerResponsibility & OwnershipExplicit Operational Refusal
1. Orchestrator AgentTask decomposition, execution graphs, cross-system synthesis.Never performs direct ledger mutations or writes SQL.
2. Domain AgentsSpecialized business domains (Accounting, Catalog, Ops, Logistics).Cannot escalate permissions or access adjacent domain schemas.
3. Tool & Workflow GatewayThe single authenticated pipeline for business reads and writes.Rejects free-form queries, unstructured text, or untyped JSON.
4. RBAC & Approval LayerTenant identity, cryptographic API keys, human approval gates.Does not evaluate business reasoning or algorithmic feasibility.
5. Model Router & Schema CompilerDynamic model selection, prompt grounding, JSON schema output enforcement.Refuses business authorization or permission delegation.
6. Safety & Verification LayerDouble-entry balance checking, prompt injection filtering, physics checks.Never grants overrides or bypasses mathematical invariants.
7. Observability & Audit TrailOpenTelemetry traces, token attribution, latency analysis, failure logs.Does not modify workflow state or orchestrate retries.

Typed Actions & The Human Approval Gate

When an autonomous accounting agent processes an incoming vendor invoice, it cannot write directly to general_ledger_entries. Instead, it invokes the gateway method create_draft_journal_entry with a typed payload:

{
  "action": "create_draft_journal_entry",
  "payload": {
    "tenant_id": "tenant_pc_001",
    "posting_date": "2026-10-23",
    "reference": "INV-TORAY-88421",
    "currency": "USD",
    "lines": [
      {
        "account_code": "1310-RAW-MATERIALS",
        "debit": "14250.00",
        "credit": "0.00",
        "description": "Toray T700S 12K Unidirectional Pre-preg, Lot #TR-26-904"
      },
      {
        "account_code": "2010-ACCOUNTS-PAYABLE",
        "debit": "0.00",
        "credit": "14250.00",
        "description": "Toray Composite Materials America Inc."
      }
    ],
    "supporting_evidence": {
      "ayobrain_memory_id": "mem_claim_9824_v1",
      "purchase_order_id": "po_2026_0942",
      "receiving_slip_id": "rcv_2026_1102"
    }
  }
}

The gateway submits this payload to Layer 6 (Safety & Verification Layer). A deterministic engine validates that:

  1. Total debits exactly equal total credits (14,250.00==14,250.00 == 14,250.00).
  2. The target accounts exist and are currently open for posting.
  3. The associated purchase order matches the invoiced amount within configured unit price tolerances.
  4. Physical receiving slips confirm that the pre-preg was transferred to cold storage (-18°C) with valid freezer temperature logs.

If the transaction passes validation and falls below the tenant’s automated threshold, the gateway commits it to the ledger. If the transaction exceeds the automated approval ceiling or flags a tax discrepancy, the transaction transitions to a PENDING_HUMAN_APPROVAL queue. Human operators review the proposal, inspect the attached AyoBrain provenance documents in a single click, and cryptographically sign off on the commit.


The 2026 High-Performance Stack: Rust, GCP & Unified Commerce

A modern ERP must simultaneously handle high-velocity storefront transactions, compute complex multi-level BOM cost rollups, and manage high-concurrency Model Context Protocol (MCP) tool calls. To achieve deterministic reliability without runtime overhead, AyoWork operates on a modern polyglot architecture:

┌─────────────────────────────────────────────────────────────────────────────┐
│                           AYOWORK 2026 CLOUD STACK                          │
├─────────────────────────────────────────────────────────────────────────────┤
│  OPERATOR INTERFACE: Next.js (App Router, React Server Components, Tailwind)│
├─────────────────────────────────────────────────────────────────────────────┤
│  COMMERCE CORE: Medusa (Headless B2B/B2C, Dynamic Pricing, Cart Engines)    │
├─────────────────────────────────────────────────────────────────────────────┤
│  WORKFLOW ORCHESTRATION: FastAPI / Node.js (Async Task Graphs, MCP Gateways)│
├─────────────────────────────────────────────────────────────────────────────┤
│  HIGH-PERFORMANCE SERVICES: Rust Microservices (Cloud Run, Actix, Tokio)     │
│  • Sub-millisecond Double-Entry Ledger Engine                               │
│  • Multi-Level BOM Cost & Rollup Graph Solvers                              │
│  • Real-Time Plaid & Stripe Banking Reconciliation Pipelines                │
├─────────────────────────────────────────────────────────────────────────────┤
│  STORAGE PLANE: PostgreSQL (pgvector HNSW) + Google BigQuery + Google Cloud │
└─────────────────────────────────────────────────────────────────────────────┘
  • Operator Interface (Next.js): Server-rendered administrative dashboards, visual graph navigators, and interactive approval queues delivering sub-100ms page transitions and zero client-side bundle bloat.

  • Commerce Engine (Medusa): Decoupled headless commerce managing unified B2B wholesale tiers, multi-currency price lists, customer credit limits, and integrated checkouts.

  • Workflow Orchestration (FastAPI & Node.js): Asynchronous service fabrics managing long-running agent workflows, background cron polling, and external vendor API synchronizations.

  • Performance Core (Rust Microservices on Google Cloud Platform): Critical paths—including the continuous accounting ledger, the multi-level BOM graph solver, and the high-throughput banking reconciliation pipeline—are written in Rust and deployed on Google Cloud Run.

    Migrating ledger transaction processing from interpreted Node/Python runtimes to Rust delivered a ~4.8x throughput increase, eliminated memory allocation leaks, and reduced end-to-end ledger validation latency to sub-millisecond durations (<850μs<850\mu\text{s} at p99p99). Rust’s strict ownership model guarantees data-race freedom and memory safety during peak multi-agent concurrency.


Bridging Atoms and Bits: Physics-Grounded PLM Constraints

The core flaw in standard software ERPs is their ignorance of the physical universe. In digital systems, inventory is an integer in a row; in advanced composite and titanium fabrication, inventory is a living physical asset governed by thermodynamics, chemical shelf-life, and mechanical stress.

AyoWork bridges atoms and bits by integrating the 5D Manufacturing Methodology and my PLM Make vs. Buy taxonomy directly into the tool gateway’s constraint engine:

                  ┌─────────────────────────────────────────┐
                  │    5D MANUFACTURING METHODOLOGY LOOP    │
                  └─────────────────────────────────────────┘
                       │
       1. DESIGN       ▼   Parametric CAD (Fusion 360 / Rhino)
                       │   Algorithmic Geometry & Generative Lattices
                       │
       2. DEVELOP      ▼   Virtual CAE Simulation (Ansys Fluent CFD / FEA)
                       │   Aerodynamic & Structural Limit Verification
                       │
       3. DATA LOG     ▼   AyoBrain Digital Biography (GUID)
                       │   Timestamped Autoclave, Oven & Batch Telemetry
                       │
       4. DRIVE        ▼   Real-World Telemetry Validation
                       │   Instrumented Testing & Rider Ergonomics
                       │
       5. DELIVER      ▼   Deterministic Production Execution
                           BOM Hard Cards, Ledger Commit & Lot Tracking

Physical Constraints as Deterministic Code

When an autonomous scheduling agent optimizes production queues across 5-axis CNC machining centers and composite curing ovens, it cannot schedule operations based purely on calendar availability. The gateway enforces physical boundaries codified as deterministic software constraints:

  1. Thermodynamic Tooling Expansion: When designing tooling for trapped silicone compression molding, the gateway checks thermal expansion parameters. Silicone exhibits volumetric thermal expansion approximately twelve times greater than 6061-T6 aluminum (αsilicone≈12×αaluminum\alpha_{\text{silicone}} \approx 12 \times \alpha_{\text{aluminum}}). An agent proposing mold cavity geometry must adhere to compensatory scale ratios to prevent tool hydraulic locking or composite part crush during cure.
  2. Chemical Out-Life Monitoring: Toray pre-preg carbon fiber must be stored at −18∘C-18^\circ\text{C} to halt resin cross-linking. Once pulled from cold storage, a strict out-life timer (typically 30 days cumulative at room temperature) begins. AyoWork logs every ambient minute against the lot’s GUID. If an agent attempts to release a build sheet consuming a roll whose out-life exceeds safety limits, the gateway halts the transaction and flags the material for differential scanning calorimetry (DSC) testing.
  3. Machine Work Envelope Enforcement: Agents generating G-code or scheduling toolpaths verify machine tool limits (X/Y/Z travel, spindle torque curves, 5-axis clearance cones) prior to queue assignment, eliminating tool-head collisions before code reaches the machine controller.

Summary: The Autonomous Enterprise Operating System

AyoWork replaces fragmented enterprise software with a unified, self-reconciling nervous system:

  • Deterministic Integrity: Double-entry bookkeeping guarantees mathematical precision. Debits must equal credits, or transactions abort.
  • Controlled Autonomy: Agents never touch raw databases. Every operation is channeled through a seven-boundary typed gateway with human approval overrides for material actions.
  • AyoBrain Institutional Memory: Hybrid PostgreSQL (pgvector HNSW) and Google BigQuery storage provides sub-25ms semantic context paired with deep analytical telemetry.
  • High-Velocity Execution: Rust microservices on Google Cloud Platform deliver ~4.8x execution speedups and deterministic sub-millisecond ledger reconciliation.
  • Physics-Grounded Operations: Physical constraints—stoichiometry, thermal expansion, shelf life, and machine envelopes—are enforced as immutable code rules.

Technical Notes & Field Q&A

How does AyoBrain enforce multi-tenant isolation within pgvector embeddings?

Multi-tenancy in AyoBrain is enforced at both the storage and query layer. Every vector embedding and knowledge graph node is tagged with an immutable tenant_id. I utilize PostgreSQL Row Level Security (RLS) policies tied to session connection pools, ensuring that semantic similarity queries (ORDER BY embedding <=> query_vector) are mathematically isolated to the active tenant's partition. Cross-tenant leakage is strictly prevented at the database kernel level, eliminating reliance on probabilistic prompt instructions.

Why rewrite critical ledger reconciliation pipelines in Rust instead of keeping Node or Python?

During high-concurrency reconciliation events—such as syncing thousands of banking feed transactions or calculating deep multi-level BOM cost rollups with recursive graph dependencies—Node.js and Python suffer from garbage collection pauses and high memory footprints. Rust provides zero-cost abstractions, deterministic memory deallocation, and seamless multi-threaded parallelism via Tokio. Transitioning my accounting and BOM solver services to Rust reduced $p99$ response times from 340ms to under 12ms and eliminated memory exhaustion crashes under peak loads.

How does the Human Approval Layer prevent operational bottlenecks?

The approval engine operates on policy-driven risk thresholds rather than blanket human intervention. Routine, low-risk operations—such as reconciling matching automated bank transactions under $1,000, reserving in-stock raw material yardage, or logging sensor logs—are fully autonomous. Human review is triggered only when a proposal exceeds dollar value thresholds, introduces a variance between physical inventory counts and ledger balances, or modifies audited historical accounting periods. Approvers receive pre-computed diffs with direct links to AyoBrain evidence, enabling rapid one-click verification.

How does AyoWork handle out-of-order banking and Stripe webhooks?

AyoWork treats external webhooks and financial transactions as idempotent, append-only event streams. Inbound events are assigned global event sequence numbers and written to an immutable staging ledger before processing. If a settlement webhook arrives before its corresponding payment authorization, the reconciliation engine places the event into an unallocated suspense account. When the parent event arrives, a deterministic Rust reconciliation job re-sequences the transactions, validates the state transitions, and moves balances into active accounts.