// CONTENTS Part 03 · Core engine

// PART 03

User memory, consent, and secrets

Chapter 14 / 56 3 min read English Part 03 of 14

Three state systems decide what the assistant may remember, what it may do on your behalf, and what it may read: user memory, the consent gate, and Vault secrets.

User memory

Per-user durable memory lives behind two surfaces:

  • BASIC keywords — SET USER MEMORY "key", value / GET USER MEMORY "key" (per user) and SET BOT MEMORY / GET BOT MEMORY (shared across sessions for the bot). The host implementation is botserver/src/core/user_memory.rs plus the botmemory crate for the durable per-user/per-branch store with extraction and recall hooks.
  • The Memory app — lists, edits, pins, merges and deletes entries; export and import are JSON with a dry-run report. Forgetting is deliberate: an explicit “forget …” turn deletes only the rows the request names, and a subject-bearing request never deletes every row.

Legacy REMEMBER/RECALL keywords continue to operate unchanged; extraction after assistant turns proposes durable facts, deduplicated on write (skip or supersede), and recall injects relevant memories before generation with a token budget, pinned first.

Agent-initiated actions on suite applications are gated by a per-user permission matrix (user × app × action class). Destructive and payment classes are deny-by-default; payment grants expire at month end even when granted “always”.

Flow: the planner requests an action → no grant exists → a pending request is created and an interactive card is rendered in the conversation (or serialized to remote channels). Decisions are Allow once, Always allow or Deny; every decision is audited (consent_audit). Grants can be reviewed and revoked in Settings.

Allow once is a one-shot handoff, not a stored grant. The decision lands in an in-memory approved map, and the gate consumes the matching approval (take_approved_match) before it looks for a grant, so the assistant’s retry runs exactly once and the next identical request prompts again. A destructive class always prompts, even when a broader grant exists.

Enforcement points: the chat command path (__api_call__) and the api/ui loopback executor (classified by HTTP method). Manual use of the applications is never gated. The gate crate is botconsent; only the owner may resolve a card, a card lives as long as its turn, and a new message while a card waits replaces the turn.

Secrets

Credentials never live in scripts, config.csv (beyond non-sensitive keys) or the database in plaintext:

What Where it lives Read by
LLM endpoint, model, key, system prompt Vault secret/gbo/{org}/{branch}/{bot}, global fallback secret/gbo/llm ConfigManager::get_config at boot
Infrastructure credentials (tables, drive, cache, directory, vectordb, meet, email, alm) Vault secret/gbo/<service> installer writes, botserver reads at boot
Channel credentials (WhatsApp, Teams, Instagram) Vault per-bot paths; dashed config.csv keys are the fallback for non-sensitive values channel adapters
VAULT_* variables .env at the repository root bootstrap only

Two related rules keep this honest: sensitive keys are dropped from config.csv by the Drive monitor (the file is not the home of secrets), and the only plaintext-encrypted fields are the narrow set handled by encrypt_field (for example attendance content and session content) — the database is not encrypted at rest as a whole, and the platform does not claim otherwise.

Practical checks

Question How to answer
Which memory keys does a bot use? grep the bot’s .gbdialog for MEMORY keywords
Why did the agent skip a prompt? an existing grant matched — check Settings › permissions and consent_audit
Where is a credential resolved from? Vault path first, env fallback second — botcore/src/config/from_vault.rs

Found a mistake? Open an issue · All books

// SEARCH ESC
Pagefind · 236 pages · 4 books Enter to open ↑ ↓ to move