Skills.

The worst persistence failure is not the error: it is the write that never happens and returns success. The agent keeps believing it has memory, and the context evaporates next session.

How a write dies silently

The rule: read it back

A write is only proven when the data comes back. Run the write, then the read, and compare the content — in the same execution:

python3 scripts/memory_save.py --save "state + next step" python3 scripts/memory_save.py --chat <id> --top 3 # the text must be here

Without the second command you have an exit code, not a memory.

The three fallback rungs

  1. Normal pathWrite through the store's API, with the gateway's own interpreter.
  2. Direct pathWrite to the vector database when the API fails.
  3. Plan on diskWhen there is no write path at all, the state goes into a versioned plan file — which survives the service going down. And the blocker is reported in one line instead of pretending it saved.

Separate the layers before blaming

“Memory is down” is usually three different things: (a) the infrastructure (does the database answer?), (b) the interpreter running the plugin (does it have the module?), (c) the tool. Each fails for a different reason and the messages look alike. Test all three, in that order.

See the AI Test Loop skill See all skills

Want this wired into your project? Guided setup from R$ 1.500, with the first cycle run together.

← all skills

Get the next article

Sent when I publish, together with the free skill used here. No spam, one-click unsubscribe.

Payment processed by Stripe — no card data touches this server. Instant delivery once confirmed. Prices in BRL (Brazilian real) — you are charged in BRL. Terms, delivery and refund.