Reset Key value store


Hi guys i have a question about the kvs storage. Is it possible to clean the db, delete?

I use the kvs to save some data but i need to reset this data for every conversation an user has with the bot

Thanks in advance


Hi @Soufyanbreda, you can access to kvs table with event.bp.kvs


Hi thanks for your reply in the docs i see the only methods are get en set is it possible to delete?


kvs-records are stored in kvs table which you can manipulate via knex arbitrary.


@Soufyanbreda You can use it like this:

  return event.bp.db.get().then(knex => {
            return knex('kvs').where('key', 'like', "{something}").del().then(function(count) {
                console.log("Deleted " + count + " registers");
                return count;


thanks for the reply this works great