aboutsummaryrefslogtreecommitdiff
path: root/apps/docs/concepts/user-profiles.mdx
blob: 211b4dda958718cbb9f0de1ada34233201612cae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
---
title: "User Profiles"
sidebarTitle: "User Profiles"
description: "Automatically maintained context about your users"
icon: "circle-user"
---

User profiles are **automatically maintained collections of facts about your users** that Supermemory builds from all their interactions. Think of it as a persistent "about me" document that's always up-to-date.

<CardGroup cols={2}>
  <Card title="Instant Context" icon="bolt">
    No search needed — comprehensive user info always ready
  </Card>
  <Card title="Auto-Updated" icon="rotate">
    Profiles update as users interact with your system
  </Card>
</CardGroup>

## Why Profiles?

Traditional memory systems rely entirely on search:

| Problem | Search Only | With Profiles |
|---------|------------|---------------|
| Context retrieval | 3-5 queries | 1 call |
| Response time | 200-500ms | 50-100ms |
| Basic user info | Requires specific queries | Always available |

**Search is too narrow**: When you search for "project updates", you miss that the user prefers bullet points, works in PST, and uses specific terminology.

**Profiles provide the foundation**: Instead of searching for basic context, profiles give your LLM a complete picture of who the user is.

---

## Static vs Dynamic

Profiles separate two types of information:

### Static Profile

Long-term, stable facts:

- "Sarah is a senior software engineer at TechCorp"
- "Sarah specializes in distributed systems"
- "Sarah prefers technical docs over video tutorials"

### Dynamic Profile

Recent context and temporary states:

- "Sarah is migrating the payment service to microservices"
- "Sarah is preparing for a conference talk next month"
- "Sarah is debugging a memory leak in auth service"

---

## How It Works

Profiles are built automatically through ingestion:

1. **Ingest content** — Users [add documents](/add-memories), chat, or any content
2. **Extract facts** — AI analyzes content for facts about the user
3. **Update profile** — System adds, updates, or removes facts
4. **Always current** — Profiles reflect the latest information

<Note>
You don't manually manage profiles — they build themselves as users interact. Start by [adding content](/add-memories) to see profiles in action.
</Note>

---

## Profiles + Search

Profiles don't replace search — they complement it:

- **Profile** = broad foundation (who the user is, preferences, background)
- **Search** = specific details (exact memories matching a query)

### Example

User asks: **"Can you help me debug this?"**

**Without profiles**: LLM has no context about expertise, projects, or preferences.

**With profiles**: LLM knows:
- Senior engineer (adjust technical level)
- Working on payment service (likely context)
- Prefers CLI tools (tool suggestions)
- Recent memory leak issues (possible connection)

---

## Use Cases

### Personalized AI Assistants

Profiles provide: expertise level, communication preferences, tools used, current projects.

```typescript
const systemPrompt = `You are assisting ${userName}.

Background: ${profile.static.join('\n')}
Current focus: ${profile.dynamic.join('\n')}

Adjust responses to their expertise and preferences.`;
```

### Customer Support

Profiles provide: product usage, previous issues, tech proficiency.

- No more "let me look up your account"
- Agents immediately understand context
- AI support references past interactions naturally

### Educational Platforms

Profiles provide: learning style, completed courses, strengths/weaknesses.

### Development Tools

Profiles provide: preferred languages, coding style, current project context.

---

## Next Steps

<CardGroup cols={2}>
  <Card title="User Profiles API" icon="code" href="/user-profiles">
    Fetch and use profiles via the API
  </Card>
  <Card title="Graph Memory" icon="network" href="/concepts/graph-memory">
    How the underlying knowledge graph works
  </Card>
  <Card title="AI SDK Integration" icon="triangle" href="/integrations/ai-sdk">
    Automatic profile injection with AI SDK
  </Card>
  <Card title="Add Memories" icon="plus" href="/add-memories">
    Build profiles by adding content
  </Card>
</CardGroup>