Why AI Agents Need a Database-Backed Control Plane: Inside Chuanxu's Architecture
DBA Yin Haiwen details how Chuanxu evolved from an Agent memory system into a database-backed control plane enforcing identity, permissions, and audit trails across Oracle, PostgreSQL, and YashanDB, using a seven-layer dependency chain and fail-closed zero-trust model.
A DBA's Reverse Journey: From Memory to Governance
In March 2026, Yin Haiwen — a veteran DBA with over a decade of Oracle and domestic database experience — started writing code not for an Agent management platform, but for a memory system. He targeted Oracle 26ai's native VECTOR type for semantic search, SQL/PGQ for knowledge graphs, and JSON Relational Duality to join documents with relational tables. The project oracle-memory-by-yhw hit GitHub on April 3 as v0.1.0. By v0.2.0 it integrated Hermes Agent; v0.4.0 unified JRD, property graphs, and Oracle Text. A PostgreSQL 18 + Apache AGE fork memory-pg18-by-yhw followed on April 19.
v1.0.0 (May 9) was deemed the first production-ready release; the PG version aligned two days later. But Oracle v1.0 exposed hard problems: fragmented schemas, SQLcl subprocess bottlenecks, scattered deployment scripts, and an unmaintained 934-line SKILL.md. On May 17 and 19, both codebases were rewritten from scratch — schema, Python API, deployment, docs — with no upgrade path from v1.x.
Post-rewrite, the system grew beyond memory. By v2.3, Agent, task, workspace, spec, collaboration, and knowledge had all entered the UI. The repo renamed from "Oracle AI Database Memory System" to "AI Agent Infra with OracleDB" at v3.0.0 (May 31), adopting Apache 2.0 for community and BSL 1.1 for enterprise. YashanDB 23.5.4+ joined as a third backend on July 17 (v3.10.2). v4.0.0 (July 19) merged six independent codebases (three databases × two editions) into one shared core plus database adapters. The name "Chuanxu" (川序) first appeared in release notes at v4.1.0 (July 24).
From March to October 18 (v5.0.0), the main repo cut 68 releases (one retracted); PG and Yashan community repos had 53 and 31 respectively. Post-v4.0.0, all three lines share a single version number and release simultaneously. Yin emphasizes: "Most versions do one thing — fix a link, add Chinese docs, turn 'looks like it works' into 'fails clearly'." Two disciplines govern cadence: one change per release, and triple-database regression where the same authorization decision and task flow must yield identical results on Oracle, PostgreSQL, and Yashan.
Why Push the Control Plane into the Database
Most Agent platforms live at the application layer: orchestration, tool calling, prompt management, plus a dashboard. Chuanxu pushes identity, task, permission, and audit state into the database. Yin's rationale: "When an Agent breaks, people want facts, not logs." Logs show tool calls and returns but cannot answer: who approved this call? Was permission valid at that moment? Can we revoke in time? Those questions demand transactions, constraints, row-level security, leases, audit, and recovery — all native to databases.
He illustrates a concrete failure mode: state write and audit write in separate transactions; power loss yields "task done, evidence missing." Permission checks scattered in app code are easily forgotten. Three common fallbacks — files/process memory, vector store + RAG, framework-native orchestration — each solve a slice but share the same gap: authorization via prompt, state in process, accountability by memory. None are enforceable or auditable.
Chuanxu's contract: model reasons, runtime executes, database accounts and blocks. The litmus test for persistence: "Will this data later explain an event or deny access?" If yes, it lands in the database. Mandatory tables include identity/responsibility chains, credential versions, tasks/steps, leases/fence tokens, checkpoints, authorization evidence, approval gates, audit records, token/cost facts, and knowledge/memory versions and scopes. Model request/response bodies are explicitly excluded; the optional model gateway logs only caller, model, tokens, cost, latency, and status — "observable but not crossing the line."
Seven Layers Are a Dependency Chain, Not a Menu
Chuanxu structures capabilities as seven layers: Identity, Context, Knowledge, Execution, Security, Collaboration, Operations. Yin insists they are not a feature checklist: "The next layer exists because the previous one couldn't answer its question." Knowledge couldn't answer "who's asking" → Identity. Identity couldn't answer "what to give right now" → Context. Context couldn't answer "where did the task break" → Execution. Execution couldn't answer "who approved this step" → Collaboration. The first four couldn't answer "why is this allowed" → Security (cross-cutting, placed fifth because it needs the prior layers' subjects, scopes, and purposes). All couldn't answer "what's the current state" → Operations. The number seven isn't sacred; a cost-governance layer may split out later. The criterion: does the layer own independent facts and boundaries?
Three Databases, One Contract, No Performance Parity Guarantee
Chuanxu supports Oracle AI Database 26ai, PostgreSQL 18 + AGE + pgvector, and YashanDB 23.5.4+. They are alternatives, not simultaneous; each process binds to one backend. PG started in April, Yashan in July; adaptation depth and validation time differ. "Product semantics consistent, physical implementations separate." Same capability, three distinct paths: vectors via native type (Oracle), pgvector (PG), Yashan's own; graphs via AGE (PG), native graph or recursive SQL (others); JSON, full-text, spatial each have per-database implementations.
The adapter layer doesn't "translate SQL" — it implements a shared contract. Every new capability gets three adapter implementations, run through the same regression suite, results compared. Differences aren't hidden in code; they're published in a capability matrix marking per-database production-ready, controlled-beta, or default-off. Concrete example: identical JSON path extraction returns NULL on one engine, errors on another — divergent authorization branches. Yashan became the first domestic database to pass the full chain because its 23.5.4 vector, graph, JSON, full-text, and spatial coverage let the multi-modal path complete in one go, and because "docs-compatible" isn't enough — real-load validation is mandatory.
The hard part isn't SQL syntax but semantics: null ordering, JSON path expressions, full-text tokenization, vector distance functions, transaction-isolation visibility, lock-wait behavior. One mismatch means the same authorization query returns different results on two backends. Regression criterion: "results identical," not "runs through." Yin adds bluntly: one contract ≠ identical performance. Concurrency latency and throughput differences are objective; Chuanxu guarantees semantic and boundary consistency, not matching numbers.
The Cost of Fail-Closed
Zero-trust in Chuanxu isn't a toggle; it's a rule that causes pain: identity service down, credential expired, authorization data unreadable → system denies, no guessing, no fallback, no admin backdoor. "Yes, that's the price." Business feels it directly: previously runnable tasks stop. Engineering compensations: (1) explain the exact failing condition — credential expiry, security-domain mismatch, explicit deny — not a generic 403; (2) make degradation and bypass explicit config with audit; (3) shorten recovery — credential rotation, re-registration in minutes. Example response: "Credential expired, last valid 14:32, re-registration required" — ops knows the next step; a bare 403 leaves only guessing.
Early on, expired business identities fell back to schema owner; tasks completed but identity governance was bypassed — approvals, ownership, revocation all voided. Changed to "expired = denied." Tasks now stall on identity loss; that cost is accepted. "It's a bottom line, not negotiable for completion."
Isolation Without Requiring Kubernetes
Once Agents run, the question: what identity, which files, which network? Chuanxu adds a Linux runtime isolation layer: bubblewrap + dedicated UID/GID, namespaces, read-only rootfs, private IPC, default-deny network, resource limits. Host admission passes a pre-check; failure = fail-closed. "This Agent runs only under this UID" — controls what the process sees, writes, connects.
Why not containers? Reality: many customer environments lack K8s, only a few Linux boxes. Platform can't demand a container platform first. Containers excel at packaging/orchestration but can't enforce "this process cannot read /etc on that machine." Boundaries clarified: this is single-host runtime isolation, not network isolation, not database-cluster HA. "Three different layers, don't conflate them."
What's Controllable and What Isn't
Yin answers boundary questions faster than capability questions. Controllable: block subsequent access, revoke credentials, isolate managed instances, recover state from database, turn every authorization decision and side-effect into evidence. Uncontrollable: data already exported/copied/cached outside the platform — can't claw back; processes not on the managed execution plane — can't stop; management-plane multi-Agent coordination ≠ database-cluster HA; gateway only sees calls routed through it — direct connections are UNOBSERVED.
"People ask if the platform can recall a report an Agent already sent. No. All we can do is revoke its credentials so the next read fails." These boundaries are published on the official site not for honesty's sake but because "if not written clearly, customers hit them day one; trust is gone by the time we explain." Same boundaries apply to collaboration: standard cross-org A2A defaults off, requires explicit verification; internal DB4A2A uses database-mediated reference collaboration — dispatch passes governed context references, no data copy; receiver reads only current authorized scope; work branches carry provenance, parent branch, full lineage; idempotency, leases, fences, unknown send results all land on the same task root. "Messages can be lost; tasks cannot."
Open Source, Commercial, and One Person's Limit
Community edition: Apache 2.0; Enterprise: BSL 1.1. v5.0.0 bundles community into one installer (choose Oracle/PG/Yashan at deploy); enterprise remains three separate packages. Delivery differs; capability matrix is public. "Value isn't lines of code; it's 'do you dare trust identity, permission, audit to it'." So community must genuinely run: installable, verifiable, hackable. Enterprise sells delivery, adaptation, support, accountability — not locking the same code.
"I don't agree with 'free-riding.' If others can run the code, the contract is clear — that's good for the product. The real risk isn't use; it's use without accountability when things break." Yin currently develops and maintains solo. Three lines share core and contract; adapters separate. Adding a capability: core once, three adapters, three regression runs. "Doable now, but boundary is clear. Next step — adaptation, delivery, on-site support — one person can't." Next hire isn't "more coders" but someone who can own a database line end-to-end. "Sounds harsh, but more honest than 'building a team soon.' Missing isn't coders; it's people who can carry a line from start to finish."
Target customers split: (1) enterprises running dozens of Agents, asked by leadership "who governs these"; (2) regulated industries — finance, telco, government — needing Agents in audited workflows. "First paid scenario isn't 'govern all Agents'; it's 'govern one high-risk Agent': give it identity, boundary, approval, evidence. One scenario working, then replicate." Selling "full-domain Agent governance" upfront fails — customers don't understand, can't land. Real enterprise motion often starts from an Agent that already caused an incident.
Next Two Years: Runnable, Governable, Accountable
Yin outlines three industry phases: runnable, governable, accountable. "Runnable mostly solved; governable just starting; accountable only a few enterprises doing." Not synchronized — some hit governance walls while others still run POCs. Vendors will diverge: some toward model layer, some platform, some observability-only. Database vendors sit uniquely — at the base and closest to governance. He predicts: "Agent registry will become as routine as database instance inventory. Most enterprises can't even count them." That's why Chuanxu puts five questions on its homepage: how many, who owns, doing what, how to block, how to trace. Simple questions; few enterprises answer all.
Closing: Don't Treat Agents as a New Species
Advice to DBAs: "Don't treat Agents as a new species. It's just a new client — one that changes its own mind." DBA toolkit hasn't expired: identity, permission, audit, backup, recovery, capacity. Two gaps to fill: (1) understand what the Agent accesses — schemas, vectors, graphs, full-text all count; (2) turn governance rules into executable policies, not documents. "And one more: don't chase new frameworks. Frameworks rotate every three months; transactions, isolation levels, indexes, locks don't." Chuanxu's own lane is narrow: no Agent framework, no model, only the database-layer control plane. "Enterprises don't lack Agents that call models; they lack infrastructure that keeps those Agents running orderly long-term."
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.
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.
