问题根源Root Problem
文件适合起步,不适合作为企业控制面Files Are Fine to Start, Not to Govern an Enterprise
随着记忆和知识文件增多,定位与修改变得困难,重复加载增加 Token,且容易污染上下文。多人、多 Agent 并发写入还缺少事务、冲突控制、行级权限、统一审计和可靠恢复。As memory and knowledge files grow, retrieval and mutation become difficult, repeated loading consumes tokens, and irrelevant context contaminates prompts. Concurrent human and Agent writes also lack transactions, conflict handling, row-level access, unified audit, and reliable recovery.
| 问题Problem | 文件方式File Approach | 数据库方式Database Approach |
|---|
| 检索Retrieval | 遍历、全量加载或额外索引Scanning, full loading, or extra indexes | 结构化过滤、全文、向量与图关系共同检索Structured filters, full-text, vectors, and graph relationships retrieved together |
| 并发Concurrency | 覆盖、锁文件和冲突难处理Overwrite and lock-file conflicts | 事务、约束、锁和幂等Transactions, constraints, locks, and idempotency |
| 安全Security | 目录和进程边界粗粒度Coarse directory and process boundaries | 身份、角色、行级策略和服务端授权Identity, roles, row policies, and server authorization |
统一核心Unified Core
四层架构,数据库适配隐藏在共同契约之后Four Layers With Database Adapters Behind One Contract
体验与接入层Experience and Access
Portal · Dashboard · Wallboard · Skill · Model Gateway
管理与治理层Management and Governance
Principal · Enrollment · Policy · Channel · Usage · Audit
持久执行层Durable Execution
任务计划 · 分支 · 循环 · 编译计划 · 图运行 · 租约Task Plan · Branch · Loop · Compiler Plan · Graph Run · Lease
数据库能力层Database Capability
SQL · JSON · 全文检索 · 向量 · 图 · 事务 · 调度器 · 高可用SQL · JSON · FTS · Vector · Graph · Transaction · Scheduler · HA
模型网关是可选观测路径而不是强制入口;直连和网关可以并行,数据库只把经可信路径获得的 Token、成本与运行证据纳入管理投影。The model gateway is an optional observation path, not a mandatory choke point. Direct and gateway access may coexist, and the database projects only Token, cost, and runtime evidence obtained through trusted paths.
组织权威事实Authoritative Organization Facts
关系表负责正确性,图形负责理解与配置Relational Facts Enforce Correctness; Graphs Support Understanding
普通平台账号、Human Principal 与组织人员一一对应,注册审批在同一事务中建立账号和主组织。组织、主/兼职归属、直属/虚线/项目汇报、Agent 责任和有效期由关系表、约束、闭包表与历史表共同记录;受保护 bootstrap admin 是唯一不映射自然人的系统例外。画布按这些语义事实确定性排布,Property Graph 只能作为可重建投影,不能成为授权前置条件或越权来源。Each ordinary platform account maps one-to-one to a Human Principal and organization person, while registration approval creates the account and primary membership in one transaction. Relational tables, constraints, closure, and history record organizations, primary/secondary membership, direct/dotted/project reporting, Agent accountability, and validity; the protected bootstrap admin is the sole non-person system exception. The canvas deterministically lays out these facts, while Property Graph remains a rebuildable projection that cannot grant authority.
主组织闭包 ∩ 直属汇报 ∩ 安全域 ∩ 当前授权 ∩ 显式拒绝 ∩ 有效期primary organization closure ∩ direct reporting ∩ security domain ∩ current grant ∩ explicit deny ∩ validity
多模数据混合检索Multimodal Data Hybrid Retrieval
只把相关上下文送入模型Send Only Relevant Context to the Model
多模数据混合检索组合结构化过滤、全文、向量、标签和图关系,在授权范围内共同排序,仅 Top-N 结果进入 Prompt。这里的“多模”指数据与检索模态的组合,不等同于图像或音频模型。最新 Oracle AI Database 26ai 实测在五类文档、五个问题和 Top-3 条件下,将输入 Token 从 170,569 降至 5,901,减少 96.54%;向量、Oracle Text、结构化元数据、标签和图关系均参与排序。此前 SQLite FTS5 基线为 141,454 降至 4,601,减少 96.75%。两项结果都只代表特定数据集下的 Prompt 输入规模变化,不代表延迟、答案质量、总体成本或三种数据库的生产收益。Multimodal Data Hybrid Retrieval combines structured filters, full-text, vector, tag, and graph-relation retrieval modes, ranks them within authorized scope, and sends only Top-N results into the prompt. Here, “multimodal” describes a combination of data and retrieval modes, not image or audio models. In the latest Oracle AI Database 26ai run, five document domains, five questions, and Top-3 retrieval reduced input tokens from 170,569 to 5,901, or 96.54%; vector, Oracle Text, structured metadata, tags, and graph relations all contributed to ranking. The earlier SQLite FTS5 baseline reduced 141,454 to 4,601, or 96.75%. Both results describe prompt-input size under specific datasets only; neither claims latency, answer quality, total cost, or production gains across all three databases.
structured_filter + full_text + vector + tags + graph_edges → ranked Top-N context
工程范式演进Engineering Evolution
提示词 → 上下文 → 执行框架 → 循环 → 图Prompt → Context → Harness → Loop → Graph
Loop Engineering 先建立目标、执行、评估、调整和继续的闭环。Graph Engineering 位于 Loop 之上,使用版本化 Graph Definition、不可变 Graph Version、确定性 Compiler Plan、持久 Graph Run、Node Run、Checkpoint、Worker Lease、Event 和 Artifact 协调多个 Loop 与外部能力。Loop Engineering establishes a goal, execute, evaluate, adjust, and continue cycle. Graph Engineering sits above Loop, coordinating multiple Loops and external capabilities through versioned Graph Definitions, immutable Graph Versions, deterministic Compiler Plans, durable Graph Runs, Node Runs, Checkpoints, Worker Leases, Events, and Artifacts.
生产配置PRODUCTION PROFILE稳定核心Stable Core
身份、任务、Loop、频道、审批、审计、Graph Runtime 核心和授权检查等当前生产建议能力。Identity, tasks, Loops, channels, approval, audit, Graph Runtime core, and authorized inspection are production-recommended capabilities.
GRAPH CAPABILITY MATRIX受控与禁用能力Controlled and Disabled Capabilities
Manifest Draft Import、SLO 只读和 Checkpoint Fork 为 CONTROLLED;Replay、Dynamic Graph Migration、Framework Adapter Execution、A2A 与 OTLP 为 DISABLED。Manifest Draft Import, read-only SLO views, and Checkpoint Fork are CONTROLLED; Replay, Dynamic Graph migration, framework-adapter execution, A2A, and OTLP are DISABLED.
连续性Continuity
Agent 恢复与数据库高可用共同保护运行状态Agent Recovery and Database HA Protect Runtime State Together
Agent 核心状态在数据库中,进程或节点异常后,替代实例可以恢复身份并重建会话、工作区、任务和 Loop 上下文。数据库层再通过实际部署的主备、集群、故障转移、备份和时间点恢复保护状态底座。Core Agent state lives in the database. After process or node failure, a replacement instance can recover identity and rebuild sessions, workspaces, tasks, and Loop context. The database tier protects that state through the replication, clustering, failover, backup, and point-in-time recovery actually deployed.
边界Boundary
平台不承诺数据库永不不可用,也不替代数据库高可用设计。RPO/RTO、故障切换和恢复能力必须按客户所选数据库与实际拓扑验证。The platform does not promise the database is never unavailable and does not replace database HA design. RPO/RTO, failover, and recovery must be validated against the selected database and actual topology.