Blame
|
1 | # KAEL Memory |
||||||
| 2 | ||||||||
| 3 | KAEL supports recent conversation history and persistent keyed memory. They are separate systems with different behavior. |
|||||||
| 4 | ||||||||
| 5 | | Field | Value | |
|||||||
| 6 | |---|---| |
|||||||
| 7 | | Product maturity | Live / evolving | |
|||||||
| 8 | | Documentation status | Active | |
|||||||
| 9 | | Data plane | Supabase-backed KAEL tables | |
|||||||
| 10 | | Last source review | 2026-06-26 | |
|||||||
| 11 | ||||||||
| 12 | ## Conversation history |
|||||||
| 13 | ||||||||
| 14 | History stores ordered user and assistant messages associated with a session. Signed-in histories can be associated with a Passport subject. Anonymous histories depend on the session identifier supplied by the client. |
|||||||
| 15 | ||||||||
| 16 | Public history operations include: |
|||||||
| 17 | ||||||||
| 18 | - Save a conversation. |
|||||||
| 19 | - List available sessions. |
|||||||
| 20 | - Load a session. |
|||||||
| 21 | - Delete a signed-in user’s session. |
|||||||
| 22 | ||||||||
| 23 | The streaming runtime also keeps a bounded recent context window rather than sending unlimited prior history to the model. |
|||||||
| 24 | ||||||||
| 25 | ## Persistent memory |
|||||||
| 26 | ||||||||
| 27 | Memory stores key/value facts associated with either: |
|||||||
| 28 | ||||||||
| 29 | - A signed-in Passport subject. |
|||||||
| 30 | - A visitor or session identifier when no Passport identity is available. |
|||||||
| 31 | ||||||||
| 32 | Public memory operations include: |
|||||||
| 33 | ||||||||
| 34 | - List memory. |
|||||||
| 35 | - Save or replace a key. |
|||||||
| 36 | - Delete one key. |
|||||||
| 37 | - Clear the current identity or session scope. |
|||||||
| 38 | ||||||||
| 39 | ## Identity precedence |
|||||||
| 40 | ||||||||
| 41 | When a signed-in Passport subject is available, it becomes the primary memory scope. Otherwise KAEL uses the visitor or session identifier supplied by the client. |
|||||||
| 42 | ||||||||
| 43 | Do not reuse one anonymous session identifier across unrelated users. |
|||||||
| 44 | ||||||||
| 45 | ## What belongs in memory |
|||||||
| 46 | ||||||||
| 47 | Appropriate examples: |
|||||||
| 48 | ||||||||
| 49 | - Preferred name. |
|||||||
| 50 | - Communication preference. |
|||||||
| 51 | - Active project context. |
|||||||
| 52 | - A user-approved long-running goal. |
|||||||
| 53 | ||||||||
| 54 | Do not intentionally store: |
|||||||
| 55 | ||||||||
| 56 | - Passwords or authentication codes. |
|||||||
| 57 | - API keys, tenant keys, operator tokens, or cookies. |
|||||||
| 58 | - Payment details. |
|||||||
| 59 | - Government identity documents. |
|||||||
| 60 | - Private information about another person without a legitimate purpose. |
|||||||
| 61 | ||||||||
| 62 | ## User controls |
|||||||
| 63 | ||||||||
| 64 | Clients should expose: |
|||||||
| 65 | ||||||||
| 66 | - A visible indication when persistent memory is active. |
|||||||
| 67 | - A list of stored keys. |
|||||||
| 68 | - Delete controls. |
|||||||
| 69 | - A clear-all action. |
|||||||
| 70 | - An explanation of whether the user is signed in or using visitor-scoped memory. |
|||||||
| 71 | ||||||||
| 72 | ## API |
|||||||
| 73 | ||||||||
| 74 | See [[KAEL API]] for request contracts and [[KAEL Safety]] for privacy and authorization requirements. |
|||||||