Skip to content

Memory & Export Components

Memory Card

Expandable saved memories display with optional edit/delete actions.

html
<configure-memory-card id="my-memories" max-visible="4"></configure-memory-card>

<script>
document.getElementById('my-memories').memories = [
  { key: '1', value: 'Prefers window seats on flights' },
  { key: '2', value: 'Software engineer in San Francisco' },
];
</script>
tsx
<MemoryCard
  memories={[
    { key: '1', value: 'Prefers window seats on flights' },
    { key: '2', value: 'Software engineer in San Francisco' },
  ]}
  maxVisible={4}
  onSettingsPress={() => {}}
  onMemoryEdit={(key) => {}}
  onMemoryDelete={(key) => {}}
/>
Attribute / PropTypeDefaultDescription
memoriesMemoryData[][]Memory array (JS property)
max-visible / maxVisiblenumber4Items shown before "see more"
show-settings / showSettingsbooleantrueShow settings gear icon
show-actions / showActionsbooleanfalseShow edit/delete buttons
Event / CallbackDetailDescription
configure:settings-press / onSettingsPress{}User clicked settings gear
configure:memory-edit / onMemoryEdit{ key, value }User edited a memory
configure:memory-delete / onMemoryDelete{ key }User deleted a memory

Export Button

Single provider export button. Opens an AI service with a pre-filled prompt to export the user's memories.

html
<configure-export-button provider="chatgpt"></configure-export-button>
<configure-export-button provider="claude"></configure-export-button>
tsx
<ExportButton provider="chatgpt" onExportClick={(p) => console.log(p)} />
<ExportButton provider="claude" />
Attribute / PropTypeDefaultDescription
providerstringchatgpt, claude, gemini, grok
promptstringbuilt-inOverride the default export prompt
labelstringautoOverride the button label
Event / CallbackDetailDescription
configure:export-click / onExportClick{ provider }User clicked the button

Memory Import

Full memory import flow: export buttons → paste textarea → stage + auth + import.

html
<configure-memory-import api-key="pk_live_xxxxx" providers="chatgpt,claude,gemini,grok"></configure-memory-import>
tsx
<ConfigureProvider apiKey="pk_live_xxxxx">
  <MemoryImport
    providers="chatgpt,claude,gemini"
    agent="my-agent"
    onImportComplete={() => console.log('Done!')}
  />
</ConfigureProvider>
Attribute / PropTypeDefaultDescription
api-key / apiKeystringConfigure API key (required)
providersstring'chatgpt,gemini,claude,grok'Comma-separated providers
agentstring''Agent name for imported_by attribution
Event / CallbackDetailDescription
configure:export-click / onExportClick{ provider }User clicked an export button
configure:import-start / onImportStart{ provider, stageId }Paste submitted, staging begun
configure:import-complete / onImportComplete{ provider, source }Import fully processed
configure:import-error / onImportError{ message, phase }Error during stage, auth, or claim

Flow:

  1. User clicks an export button (opens AI service in new tab) or copies the prompt manually
  2. User pastes exported memories into the textarea and clicks "Import"
  3. If authenticated (via sessionStorage), stages and claims immediately
  4. If not authenticated, shows inline phone → OTP flow, then auto-claims on success

Export Prompt

Copy-prompt widget. Monospace box with the export prompt and a copy button.

html
<configure-export-prompt></configure-export-prompt>
tsx
<ExportPrompt onCopy={() => console.log('Copied!')} />
Attribute / PropTypeDefaultDescription
promptstringbuilt-inOverride the prompt text
Event / CallbackDetailDescription
configure:prompt-copied / onCopy{ prompt }User copied the prompt

Identity and memory infrastructure for AI agents