Where should agent-written code run? Not in the Postgres backend. A per-call helper process, kernel-verified before it sees any input, and a WebAssembly guest for model-written Python.
Plexus wires five of my projects through a single Postgres: an agent runtime, evidence-backed memory, time-travel retrieval and a self-tuning harness. It handles refund tickets under a changing policy, rolls back a bad refund inside the transaction, and tunes itself from its own runs. It also failed its own test for most of the first day, and I kept the log.
Since July, pg_synapse picked up an app builder, agents that run as the calling role, secrets encrypted at rest, runs that outlive the session, and a tuner that improves an agent from its own history. Here’s what changed, and the security bug I had to fix on the way.
Postgres-native agent-loop runtime in Rust. Invoke an LLM agent and its tool dispatch from SQL like a stored procedure — the agent reads and writes your tables directly, with a small trait-based kernel and everything else as a plugin.
One Postgres that runs an LLM agent, stores its trajectories, holds versioned knowledge, keeps evidence-backed memory, and tunes the agent’s own harness from its own history. Five projects wired through a single database.
A working tutorial: install pg-synapse, write a tool, register an LLM profile, create an agent as a row, run it from SQL, attach a reactive trigger. All copy-pasteable.
pg-synapse is a Postgres-native agent loop runtime in Rust. Invoke LLM agents from SQL, with tools that read and write your database under the caller’s grants.
Guided spec conductor: an assertive interview that turns a fuzzy idea, or a pile of existing code, into one agent-ready SPEC.md — by interrogating why, researching what you don’t know, and pulling in other models to attack your reasoning.
TDD/spec planner that turns product intent into small, deterministic Bob campaigns — one observable behavior per slice, with the verify command and scope caps frozen up front.
Autonomous build → verify → judge loop. Bob drives a coding CLI in an isolated git worktree, gates the result on your own test command, and only applies the change once it converges.