◎

Plexus

AI agents that run inside your database, and get better from their own history.

A typical agent touches five systems

Every arrow is a place where a run can half-finish, disagree with the others, or leave nothing behind to explain it.

App serverthe agent loop
Vector storeretrieval
Memory servicewhat it learned
Eval notebookhow it improves
Databasethe actual data

Plexus puts all of it in one Postgres

Postgres
pg_synapseThe agent runtime. SELECT synapse.execute(...) runs the whole tool-calling loop in one transaction.
pg-raggraphVersioned retrieval. Documents carry effective dates, so you can ask what was true on a given day.
steleMemory with receipts. Every belief points at its evidence; a correction supersedes, it never erases.
chunkshopIngest for policy documents and for the agent's own past runs.
The modelThe only thing outside. Here, Qwen3.6 35B on a DGX Spark. It is a row in a table; swapping it is an UPDATE.

Hold the model fixed. Improve everything around it.

Google Research's harness2 calls the prompt, rules, tools and hints around a model its harness, and tunes that instead of the weights.

System prompt
Guardrails
Memory
Skills
Tool hints
Lessons
  1. ProposeAn improver reads past runs and suggests edits: how the agent works, and what an expert in the domain would know.
  2. ProbeEach edit runs once against the real task, in its own throwaway copy of the database.
  3. ComposeThe best ideas are combined; the cheapest version that still passes every check is adopted.
  4. ReflectOne lesson is written down for the next round, citing the run it came from.

In Plexus the harness is rows, and every row has a price

Context is the cost. Each component says when it is paid for.

ComponentWhen it costs contextIn this agent
System prompt, guardrails, memory, lessonsAlways, capped by the database…
SkillsA one-line trigger until the agent loads the full playbook…
Tool hintsOnly when a tool call fails, appended to the error…
LessonsWritten by the tuner, each citing its source run…
…
Live

The policy changed. The next refund obeyed it.

Legal shortens the refund window from 30 days to 21 from 1 October by publishing one document. No prompt edit, no redeploy.

v1 14 days
v2 30 days
v3 21 days
ticket 103
20 Jul
ticket 109
10 Oct
JanAprJulOctDec
  1. Refund ticket 109$39, charged 15 Sep, opened 10 Oct: 25 days
  2. Publish refund policy v3one document into pg-raggraph, superseding v2 from 1 Oct
  3. The same refund, againand a July ticket, still judged by the rules of its day

Any decision, explained from one query

Ticket 104, end to end, out of the same database the agent wrote to.

    The tuner made the same agent 37% cheaper

    Measured on Qwen3.6 35B, eight tickets per run. Every rollout passed every check.

    Input tokens per ticket, base harness…
    After tuning…
    Rollouts that passed…

    harness2 is the method. Plexus is where it runs.

    Typical agent stackharness2 on its ownPlexus
    A run that dies halfwayPartial writes to clean upOffline, not its jobOne transaction, all or nothing
    Policy on a given dateThe newest document winsNot its jobRetrieval as of the ticket date
    Stopping a bad writeCode review and hopeNot its jobA trigger agent vetoes it in the transaction
    What tuning learns fromNothing, or a separate eval productBenchmark rolloutsYour agent's own trajectories
    Adopting a changeA redeployCopy files into your appAn UPDATE, with the evidence attached
    Systems to run and secureFour to sixOne, plus all of the abovePostgres and a model endpoint

    What it does not do yet

    • Model choice still matters. A 4B model tops out at 3 of 5 checks on this task. The 35B model passes; the tuner makes it cheaper.
    • The veto is an LLM call per insert. 5 to 10 seconds. Right for refunds, too slow for a hot write path.
    • Long runs sometimes quit early. The agent occasionally stops before every ticket is done. The checks catch it; the harness does not prevent it yet.
    • The dollar figures are assumptions. The wrong-policy rate in the business case is an input, not a measurement.

    What we would build next

    Rules fast path in front of the vetoClear-cut refunds decided in milliseconds; the model only sees the borderline ones
    Harness version historyEvery adopted change reversible with one call
    Replay measurementRe-run old tickets with and without the date check, so the wrong-policy rate is measured
    Human approval queueBorderline refunds wait for a person, in the same transaction model
    Finish-the-job guardA run cannot end while a ticket it read is still undecided

    Go try to break it

    git clone https://github.com/TheYonk/plexus && cd plexus
    make deps venv up ingest seed ui
    open http://127.0.0.1:8766/deck

    github.com/TheYonk/plexus, Apache-2.0. Built on pg_synapse, pg-raggraph, stele and chunkshop.