{"slug": "sql-memory-for-agents-the-third-facet-of-the-memory-primitive-v1-2-0", "title": "SQL Memory for agents. The third facet of the Memory primitive (v1.2.0)", "summary": "Loomcycle v1.2.0 introduces SQL Memory, a third facet of the Memory primitive, enabling authorized agents to run arbitrary SQL against per-scope databases. The update includes two new ops (sql_exec, sql_query) and three transaction ops (sql_begin, sql_commit, sql_rollback), supporting SQLite and PostgreSQL with scoped access, audit, and vector column integration. This release is additive and off-by-default, with no breaking changes.", "body_md": "loomcycle v1.2.0 ships RFC AA Phases 1 through 3g: SQL Memory. A third facet of the Memory primitive. Authorized agents run arbitrary SQL against a per-scope database the runtime hosts, isolated from the main loomcycle store. Two new ops (sql_exec, sql_query) plus three for transactions (sql_begin, sql_commit, sql_rollback) on the existing Memory tool. Two tiers: sqlite (file-per-scope, statement-allowlist hardened — the default modernc.org/sqlite driver has no authorizer, so the primary defense is a Go-layer parsed-statement validator) and postgres (schema-per-scope, per-scope least-privilege LOGIN role with search_path pinned). Three scopes: durable agent/user (tenant-keyed, persist across runs) plus ephemeral run (one DB per spawn tree, dropped at completion). Default-deny sql_scopes ACL per agent. Per-statement timeout, per-scope byte quota, row cap, full audit (redacted via RFC Z). Phase 3a explicit transactions with runtime-managed cleanup (TTL reaper for abandoned transactions). Phase 3b nested via SAVEPOINT (LIFO, depth-16 cap). Phase 3c vector columns inside agents' own tables on postgres — semantic KNN AND structured filters in one query, with server-side $embed substitution so multi-KB vectors never round-trip through the LLM. Phase 3d + 3f.3 durable-scope GC (TTL + size-budget variants, off by default + lossy by contract). Phase 3e + 3f.2 snapshot integration with per-scope cap. Phase 3g read-only shared schemas — operator-blessed reference data on every scope role's search_path. exp9 demonstrates the shape: prime-stream → SQL table in user scope → channel ping → validator agent on a different run reads the same table, validates each prime, writes verdicts to a second table. Additive + off-by-default — no breaking changes, no new wire RPCs; TS + Python adapters unchanged at 1.1.1.", "url": "https://wpnews.pro/news/sql-memory-for-agents-the-third-facet-of-the-memory-primitive-v1-2-0", "canonical_source": "https://loomcycle.dev/blog/sql-memory-for-agents.html", "published_at": "2026-06-30 12:00:00+00:00", "updated_at": "2026-06-30 17:33:59.281111+00:00", "lang": "en", "topics": ["ai-agents", "ai-infrastructure", "developer-tools"], "entities": ["Loomcycle", "SQLite", "PostgreSQL", "RFC AA"], "alternates": {"html": "https://wpnews.pro/news/sql-memory-for-agents-the-third-facet-of-the-memory-primitive-v1-2-0", "markdown": "https://wpnews.pro/news/sql-memory-for-agents-the-third-facet-of-the-memory-primitive-v1-2-0.md", "text": "https://wpnews.pro/news/sql-memory-for-agents-the-third-facet-of-the-memory-primitive-v1-2-0.txt", "jsonld": "https://wpnews.pro/news/sql-memory-for-agents-the-third-facet-of-the-memory-primitive-v1-2-0.jsonld"}}