PulbotDocumentation

KV Store


The KV Store is a session key-value store. It allows saving data between executions of the same user on the same channel. Useful for session state, tokens, funnel step.

Steps

  1. 1To save: use the «KV Save» tool in a flow node. Configure the key and value (can be a flow variable).
  2. 2To read: use «KV Get» with the same key. The value is available in {{KV.value}}.
  3. 3To delete: use «KV Delete» with the key.
  4. 4To gate on existence: check {{KV.found}} == true before using {{KV.value}}. If found is false, value is null.

Reference

Scope
Per (user, channel). The same user on WhatsApp and Telegram has separate KVs.
TTL
KV values don't have automatic expiration by default. Delete them explicitly when no longer needed.
{{KV.found}}
Boolean. true if the key exists. Always gate on found, never directly on value.
{{KV.value}}
The stored value. null if found is false.
KV tool IDs
Get current IDs with list_tools(category='global/all') — look for «KV Save», «KV Get», «KV Delete».

Common errors

{{KV.value}} is null when it should have a value
The {{KV.found}}==true gate isn't configured. Without the gate, if the key doesn't exist, the unresolved variable aborts execution.
KV doesn't persist between different user sessions
The scope is per (user, channel). Different users have separate KVs.

Next step

Read common MCP gotchas to avoid frequent mistakes.

¿Necesitas ayuda?