Appearance
Memory + Vector Explorer Demo Script
Six demos. Fifteen minutes. Persistent knowledge that respects privacy and org boundaries.
This script walks through GhostAI's memory stack: automatic extraction from chat, semantic recall across sessions, organization-wide knowledge, group-scoped collaboration with tags, the Vector Memory Explorer for embedding visualization, and portable JSON export plus bulk import. GhostAI merges memories from every applicable scope, deduplicates and ranks results, runs embeddings locally with Sentence Transformers (all-MiniLM-L6-v2, 384 dimensions), and keeps memory content on the same PII-safe path as chat.
Pre-Demo Checklist
- [ ] GhostAI instance is running and reachable (backend on
:8000, frontend as deployed) - [ ] Feature flag
memoryis enabled for the demo tenant - [ ] Demo user is on a tier that includes memory (non-zero
memory_limitwhere billing applies) - [ ] For org knowledge demo: feature
memory_org_knowledgeenabled; logged-in user is an org admin - [ ] For groups/tags demo: feature
memory_groupsenabled; user belongs to an organization - [ ] For export/import demo: feature
memory_apienabled (export/import endpoints) - [ ] Browser open to GhostAI chat; Settings or Memory entry opens MemoryManager
- [ ] Auto-extract is ON in memory settings (or enable during Demo 1)
- [ ] At least a handful of memories exist (or you will create them in Demos 1–4) so the Vector Explorer scatter plot is interesting
- [ ] Screen resolution large enough to show the Explorer tab comfortably (1080p minimum recommended)
Quick config check (optional)
bash
curl -s -H "Authorization: Bearer $GHOSTAI_API_KEY" \
http://localhost:8000/api/memory/config | python3 -m json.toolConfirm "memory_enabled": true and note allowed_categories, memory_recall_threshold, and usage counters.
The Story
Jordan is a solutions architect who chats with GhostAI daily. The product should remember facts and preferences without Jordan retyping them, blend personal memories with org and group knowledge, and give compliance-friendly visibility into what is stored. Vector Memory Explorer makes abstract embeddings tangible: clusters, neighbors, and similarity links—without sending vectors to a third-party API.
Demo 1: Auto Memory Extraction
Duration: 2 minutes
Story: Chat naturally; GhostAI proposes or stores memories from the conversation when auto-extract is enabled.
Input (Chat)
I'm Jordan Chen, Staff Solutions Architect at Northwind Logistics. I prefer concise bullet answers with a short summary line first. We're standardizing on EU data residency for new pilots. Remember that for future chats.Expected Output
- Assistant acknowledges preferences and facts
- After the exchange, open Memory (MemoryManager) → My Memories tab
- New rows appear (categories such as
preference,fact, orinstructiondepending on extraction) - Content shown in the UI is sanitized (PII-like segments appear as tokens or labels, not raw secrets)
Talking Points
"Nothing special in the prompt—Jordan just talked. With auto-extract on, GhostAI turns stable facts and preferences into persistent memories. Content is processed through the same PII pipeline as chat: we store safe, tokenized-friendly text for recall and embeddings."
"Embeddings are computed locally with
all-MiniLM-L6-v2—384 dimensions. No customer memory vectors are sent to OpenAI or another embedding API for this path."
Demo 2: Memory Recall in Context
Duration: 2 minutes
Story: Start a new thread. Ask something that should pull Jordan's stored facts without naming every detail.
Input (Chat — new conversation)
Draft a one-paragraph intro I can send to a prospect explaining how I run architecture reviews. Keep it aligned with how I like answers formatted.Expected Output
- Assistant uses Jordan's name/role and EU residency context if recalled
- Response structure reflects concise bullets + summary line preference
- Optionally mention that recall used semantic search across scopes (you can reference MemoryManager or internal logs in technical audiences)
Talking Points
"Recall is not 'last chat only.' We run
GET /api/memory/recall?q=...under the hood: semantic search across every scope Jordan is allowed to see, then merge, deduplicate, rank, and trim to a token budget."
"Ranking is explicit: mandatory memories first, then scope priority (see hierarchy below), then confidence. That is how we avoid noisy or duplicate snippets."
Seven-scope hierarchy (priority high → low): cloud → tenant → group → user → tags (cross-cutting labels that participate in filtering and shared pools) → conversation → subject.
API scope enum (storage): cloud, tenant, group, user, agent, conversation, subject. Tags are attached to memories and used for organization and shared recall—not a separate scope value on POST /api/memory.
Demo 3: Org Knowledge
Duration: 3 minutes
Story: An org admin adds tenant-wide memories; a standard user sees them merge with personal recall.
Steps (UI)
- Log in as org admin → open MemoryManager → Org Knowledge tab
- Add a memory such as:
- Content: "Northwind customer-facing name for SKU format is NW-SKU-{region}-{year}."
- Category:
org_knowledge(ororg_terminology)
- Save. Open audit-friendly wording if asked: org KB is admin-governed.
- Log in as a member user (or stay on same user if admin is also member) → new chat:
Input (Chat)
What is our official SKU format label for customer docs?Expected Output
- Answer reflects the org memory
GET /api/memory/recall?q=SKU%20formatreturnsmemoriesplusscope_countsshowing contributions fromtenantanduserwhen both applytotal_recalledreflects merged set size before token budget trimming
Talking Points
"Org knowledge is stored at tenant scope via
POST /api/memory/admin. Every eligible user in the org gets it in recall—without copying the text into each user's notebook."
"Personal memories still win for private preferences; org memories anchor terminology, compliance lines, and 'how we work here.' Admins can inspect usage with
GET /api/memory/admin/stats."
Demo 4: Groups and Tags
Duration: 2 minutes
Story: Create a group, attach shared memories, label with tags, show filtered views and recall.
Steps (UI)
- MemoryManager → Groups → create group Field Solutions
- Add a group memory (e.g. RFP boilerplate or vertical-specific disclaimer) via group memory flow
- Tags tab → create tag
rfp(optionally mark shared) - Assign tag to the group memory and a personal memory from My Memories
- Filter My Memories by tag
rfpto show only tagged rows
API touchpoint (for technical buyers)
POST /api/memory/groupswithGroupCreatebody (name, optionaldescription,group_type,parent_id)POST /api/memory/groups/{group_id}/memorieswith the same shape as user create:{ "content", "category", "is_pinned", "tags", ... }POST /api/memory/tagswith{ "name", "is_shared", "shared_with_group_id" }POST /api/memory/{memory_id}/tags/{tag_id}to assign
Talking Points
"Groups are for team-scoped knowledge—smaller than the whole tenant, bigger than one user. Tags cut across the UI for filtering and for shared tag pools when
is_sharedis enabled."
"Recall still merges scopes; tags help humans and policies organize what gets promoted to group or org level."
Demo 5: Vector Memory Explorer
Duration: 3 minutes
Story: Visualize embeddings in 2D, inspect neighbors, toggle similarity edges, filter by scope/category/source.
Steps (UI)
- MemoryManager → Explorer tab
- Choose projection PCA (fast, stable default) or t-SNE (richer separation; slower)
- Point out color by scope and legend
- Click a point → neighbors panel lists nearest items by cosine similarity on raw 384-d vectors
- Toggle connections / edge overlay — force-graph style links above similarity threshold
- Apply filters: scope, category, optional sources string e.g.
memory,file_chunk,content_libraryfor multi-source embeddings
API touchpoint
GET /api/memory/explorer/projections?method=pca|tsne&scope=&category=&limit=&sources=GET /api/memory/explorer/neighbors/{point_id}?k=GET /api/memory/explorer/edges?threshold=&max_edges=GET /api/memory/explorer/statsfor header stats (counts, embedding coverage)
Talking Points
"This is the same embedding space the model uses for recall—projected for humans. PCA is O(chill) for demos; t-SNE when you want cluster drama."
"We can blend memory, file_chunk, and content_library sources so analysts see one map of 'what the system knows'—still subject to auth and org boundaries."
"Platform admins can request broader projections with
admin=truewhere policy allows; default users only see their permitted slice."
Demo 6: Export and Import
Duration: 2 minutes
Story: Portable JSON for backup, migration, or onboarding a new user with a curated starter pack.
Steps (UI or API)
- Export:
GET /api/memory/exportreturns{ "memories": [...], "count", "exported_at" }— each memory includesid,content,category,created_at,is_pinned,tags - Show downloading or copying JSON for governance review (redact if sharing externally)
- Import:
POST /api/memory/importwith body{ "memories": [ { "content", "category", "is_pinned", "tags", "scope", "scope_id" }, ... ], "is_mandatory": false } - Show response:
{ "imported", "skipped_duplicate", "errors" }— duplicates skipped by content hash
Talking Points
"Bulk import is built for onboarding: load 50–500 memories in one call, PII-scanned and deduplicated. Mandatory flag sets org policy-style pinning behavior on import when you need it."
"Export/import sits behind the
memory_apifeature so tenants can lock down programmatic access while keeping UI memory on."
Recovery Steps
Memory endpoints return 403
- Verify feature flag
memoryis on for the deployment - Confirm the user's tier allows memory (
memory_limitnot zero)
Auto-extract shows nothing new
PUT /api/memory/configwith{ "auto_extract": true }- Check
allowed_categories— extraction may ignore disallowed categories - Ensure prompts contain stable, factual statements (not one-off jokes you do not want stored)
Org Knowledge tab missing or 403 on POST /api/memory/admin
- Enable
memory_org_knowledge - User must be org admin (
require_admin)
Groups or tags fail
- Enable
memory_groups - User must have an
organization_idresolved (org membership)
Export/import returns 403
- Enable feature
memory_api
Explorer empty or 503
- Add more memories; embeddings need material to plot
- Lower
limitonGET /api/memory/explorer/projectionsif the host runs out of RAM (503 with guidance) - Try
method=pcabeforetsnefor large sets
Recall feels "noisy" or empty
- Tune
memory_recall_thresholdviaPUT /api/memory/config(0.0–1.0) - Pin critical facts with pin flow or
is_pinnedon create
Demo Flow Cheat Sheet
| # | Demo | Duration | Key Moment |
|---|---|---|---|
| 1 | Auto Memory Extraction | 2 min | Memories appear after natural chat |
| 2 | Memory Recall in Context | 2 min | New thread uses prior facts + style |
| 3 | Org Knowledge | 3 min | Tenant memory visible to all members |
| 4 | Groups and Tags | 2 min | Group KB + tag filter in MemoryManager |
| 5 | Vector Memory Explorer | 3 min | PCA/t-SNE, neighbors, edges, scope colors |
| 6 | Export and Import | 2 min | JSON portability and bulk onboarding |
| Total | ~14 min |
Frequently Asked Questions (From Demos)
"Who can see my memories?"
User-scope memories are tied to your account. Tenant-scope org memories are visible to members per org policy. Group memories are visible to members of that group. Recall only merges scopes you are authorized to read. Cloud/platform scope is controlled by platform admins and product policy.
"Does GhostAI store PII in memories?"
Memories go through the same PII pipeline as chat. Stored
contentis sanitized; sensitive segments are handled with tokenization and vault patterns where applicable. API responses run validators that strip PII token artifacts for safer display. You should still avoid intentionally storing regulated payloads as plain text.
"How does scope hierarchy affect what wins?"
Conceptually, broader policy layers (cloud, tenant) anchor org-wide truth; group and user layers add team and personal context; conversation and subject hold session- and topic-local facts. Tags organize and can participate in shared pools. At recall time, results are merged, deduplicated, and ranked by mandatory flag, scope priority, and confidence—not by "last edited wins" alone.
"How long are memories kept?"
GET /api/memory/configreturnsretention_daysand usage limits for the resolved tier. Admins and product settings can constrain max memories. Users can delete individual memories or bulk-delete their user scope via the API where offered.
"How is this different from ChatGPT memory?"
GhostAI gives explicit scopes (user, group, tenant, conversation, etc.), org-governed knowledge bases, semantic recall with ranked merging and token budgets, local embeddings, Vector Explorer for audit and analytics, and export/import for portability—within an enterprise feature-flag and tiering model. ChatGPT's consumer memory is a single-account black box without your org hierarchy or deployment-side control.
"Can we use only the API without the UI?"
Yes.
POST /api/memory,GET /api/memory/recall, explorer routes, and export/import are all HTTP-accessible with standard auth. The MemoryManager tabs (memories, org, groups, tags, explorer) are a convenience layer on the same contracts.
For a hands-on API walkthrough, see the Memory Full Lab. For interactive canvases, see the Canvas Demo Script. For federated analytics, see the Clean Room Demo Script. For app publishing, see the GhostForge Demo Script.