Architecture
Scope Model
Memories flow upward through promotion:| Scope | Created by | Visible to | Promotion |
|---|---|---|---|
workspace | Any team member via commit | Team members | Submit → manager approves |
org | Manager/admin promotes | All teams in org | Final scope |
- Developer commits a memory to their team workspace (“Our auth tokens expire after 24h”)
- Team lead submits it for promotion
- Org admin approves — now all teams can search for it
Vector Storage
Each scope maps to a separate Qdrant collection:team_{team_id}— workspace and team-scoped memoriesorg_{org_id}— promoted org-wide memories
/retrieve, all collections you have access to are queried in parallel. Results are merged, deduplicated, and ranked by cosine similarity.
Embeddings use OpenAI text-embedding-3-small (1536 dimensions) and are generated automatically when memories are committed or promoted.
Database Schema
The org memory system uses 6 tables in Supabase:| Table | Purpose |
|---|---|
organizations | Org metadata, owner, plan |
teams | Teams within an org |
org_workspaces | Workspaces within teams |
memberships | User ↔ org/team/workspace mapping + role |
org_memories | The memories themselves (content, scope, tags, qdrant_point_id) |
promotion_queue | Pending promotion requests |
org_audit_log | Immutable audit trail of all org memory operations |
Audit Trail
Every org memory operation is automatically logged:- memory.commit — logged by Postgres trigger on insert
- memory.delete — logged by Postgres trigger on delete
- promotion.approve / promotion.reject — logged by trigger on queue status change
- member.invite / member.remove — logged by the dashboard
Usage Limits
Org memory counts toward your plan’s memory limits:| Plan | Org Memory Limit |
|---|---|
| Free | 100 total |
| Pro | 10,000 |
| Power | 250,000 |
| Team | 5,000 per seat |