Most AI memory remembers the user. It stores your preferences, your tastes, and your role. Perplexity is taking a different path. Today, Perplexity launched Brain, a self-improving memory system for its agent product, Computer. Brain does not focus on remembering you. It remembers what the agent did. That reframes what memory in AI is for.
What is Perplexity‘s Brain
Brain is a self-improving memory system. It builds a context graph of the work Computer performs. At set intervals, such as overnight, Brain reviews that graph. It then teaches itself how to do the work better. The idea is straightforward. The more work you do, the more efficient Brain makes your Computer. Brain is rolling out today to Perplexity Max and Enterprise Max subscribers in Research Preview.
Two Axes of AI Memory
Perplexity frames memory along two axes. The first is what the memory is about. The second is what the memory is for.
Traditionally, AI memory has been about the user. It stores preferences, tastes, working styles, contacts, and role. Its purpose is engagement. It helps you feel more engaged with the agent. Brain takes the other path. Its memory is about the agent’s work. It remembers what worked, what failed, and what corrections got made. Its purpose is performance. Perplexity calls helping the agent get better the most important purpose of memory.
| Dimension | Traditional user memory | Brain (work memory) |
|---|---|---|
| What it is about | The user | The agent’s work |
| What it remembers | Preferences, tastes, working styles, contacts, role | What the agent did, what worked, what failed, corrections |
| What it is for | Feeling more engaged with the agent | Helping the agent get better at the job |
| What it produces | A profile of the user | A traceable context graph of the work |
How the Context Graph Works
Brain forms a living context graph for Computer. The graph is traceable. It helps Computer understand the user’s world and learn from their work. The context layer takes the form of an LLM wiki. That wiki is automatically loaded onto the agent sandbox. Its pages reflect the ideas, people, projects, and other elements in a user’s world. Computer can traverse this web of personal information.
The Brain system updates the wiki incrementally overnight. It synthesizes the user’s sessions, connector results, changes in source documents, and corrections made. That refreshing context gives Computer a stronger signal on what to do and where to look.
Brain also shows its work. Every memory entry links back to the session, file, or source it came from. That traceability matters for debugging and trust.
Recursive Self-Improvement
Brain gets better as you use Computer. Agents learn the projects, connectors, artifacts, and other sources that lead to the best outputs. They also learn from their mistakes. They remember when a user has made a correction. They remember when a source was a dead end. That results in fewer turns, fewer model calls, and better outputs. This feedback loop is what makes Brain continuously self-improving. Perplexity team frames current token usage as an investment in more efficient token usage later.
The Performance Numbers
Perplexity shared early measurement results from its own testing.
| Metric | Reported change | Condition |
|---|---|---|
| Answer correctness | +25% | On tasks Computer has seen before |
| Recall | +16% | Same early results |
| Cost | −13% | On tasks that require historical context |
Perplexity also states results improve the longer someone uses Brain. The agents learn the user’s world over time. These are early, first-party numbers.
Use Cases With Examples
Where does work memory help? Consider three concrete cases.
- A data scientist runs a weekly pipeline audit. Brain remembers the reliable sources and the past corrections. The next audit starts from a better map. Fewer dead ends follow.
- A support team triages tickets through connectors. Brain learns which sources resolved past tickets. It routes future tickets faster.
- A developer debugs across repositories. Brain remembers which files mattered last time. Computer reaches the root cause with fewer model calls.
In each case, the saving comes from history. The agent does not relearn the same context twice.
A Conceptual Implementation
Perplexity has not published a Brain API. The pattern, however, is easy to model. The self-contained Python below is illustrative, not Perplexity’s code. It runs on its own and prints day 1: needs review then day 2: correct.
# Illustrative, self-contained model of Brain's loop — NOT Perplexity's API.
class ContextGraph:
def __init__(self):
self.entries = [] # every logged item keeps a source link
self.lessons = {} # task -> reusable lesson learned overnight
self.pending = [] # corrections waiting for the next sync
def retrieve(self, task):
return self.lessons.get(task) # load relevant memory
def log(self, task, result, source):
self.entries.append((task, result, source))
def log_correction(self, task, fix, source):
self.entries.append((task, "correction", source))
self.pending.append((task, fix)) # learn from a dead end
def synthesize(self): # the overnight step
for task, fix in self.pending:
self.lessons[task] = fix # teach itself to improve
self.pending = []
def agent_execute(task, lesson):
# with a learned lesson, the agent avoids the known dead end
return "correct" if lesson else "needs review"
brain = ContextGraph()
# Day 1: no memory yet, so the task needs review
lesson = brain.retrieve("debug repo")
print("day 1:", agent_execute("debug repo", lesson))
brain.log_correction("debug repo", "ignore cached build", source="file:notes.md")
brain.synthesize() # overnight Brain sync
# Day 2: same task, now informed by memory
lesson = brain.retrieve("debug repo")
print("day 2:", agent_execute("debug repo", lesson))The key step is synthesize. That is where the overnight self-improvement happens.
Try It: Interactive Demo
The embeddable demo below simulates the loop. Run tasks to grow the context graph. Log a correction to mark a dead end. Then trigger an overnight Brain sync. Correctness and recall climb, and cost falls, toward Perplexity’s reported figures. It illustrates the concept and is not the product.
// —- actions —-
document.getElementById(‘btnTask’).onclick=function(){
sessions++;
var t=TASKS[Math.floor(Math.random()*TASKS.length)];
addNode(‘task’,t);
if(Math.random()<0.7) addNode(‘source’,SRCS[Math.floor(Math.random()*SRCS.length)]);
// new work adds to pending learning but not yet committed
pendingLearning=Math.min(1,pendingLearning+0.14);
log(‘task’,t,’session#’+sessions);
flashSync();
};
document.getElementById(‘btnFix’).onclick=function(){
corrections++;
var n=addNode(‘fix’,’correction #’+corrections);
pendingFixNodes.push(n);
pendingLearning=Math.min(1,pendingLearning+0.10);
log(‘fix’,’dead-end corrected’,’file:notes.md’);
flashSync();
};
document.getElementById(‘btnSync’).onclick=function(){
if(pendingLearning<=0 && committed>=1) return;
syncs++;
// commit a portion of pending learning into the metrics
committed=Math.min(1, committed + pendingLearning*0.6);
pendingLearning=Math.max(0,pendingLearning*0.4);
// mark pending corrections as learned (red -> green)
pendingFixNodes.forEach(function(n){n.learned=true;});
pendingFixNodes=[];
recompute();
log(‘learn’,’overnight synthesis committed’,’context-graph’);
pulse();
document.getElementById(‘btnSync’).classList.remove(‘flash’);
};
document.getElementById(‘btnReset’).onclick=function(){
sessions=0;corrections=0;syncs=0;pendingLearning=0;committed=0;
nodes=[{id:’brain’,x:cx,y:cy,vx:0,vy:0,type:’brain’,r:18,label:’Brain’}];
links=[];pendingFixNodes=[];
document.getElementById(‘logItems’).innerHTML=”;
recompute();postHeight();
};
function flashSync(){
if(pendingLearning>0.2) document.getElementById(‘btnSync’).classList.add(‘flash’);
}
function pulse(){
var b=byId(‘brain’); if(!b)return;
// brief radius pulse via attribute animation
var big=document.createElementNS(SVG_NS,’circle’);
big.setAttribute(‘cx’,b.x);big.setAttribute(‘cy’,b.y);big.setAttribute(‘r’,18);
big.setAttribute(‘fill’,’none’);big.setAttribute(‘stroke’,’#76B900′);big.setAttribute(‘stroke-width’,’2′);
graph.appendChild(big);
var r=18,op=1;
(function grow(){r+=4;op-=0.06;big.setAttribute(‘r’,r);big.setAttribute(‘stroke-opacity’,op.toFixed(2));
if(op>0)requestAnimationFrame(grow);else if(big.parentNode)big.parentNode.removeChild(big);})();
}
// flash style for sync button
var st=document.createElement(‘style’);
st.textContent=”.bd-btn.sync.flash{animation:bdpulse 1.1s infinite}@keyframes bdpulse{0%,100%{box-shadow:0 0 0 0 rgba(118,185,0,.5)}50%{box-shadow:0 0 0 8px rgba(118,185,0,0)}}”;
document.head.appendChild(st);
// —- resize messaging for WordPress —-
function postHeight(){
try{
var h=document.getElementById(‘app’).offsetHeight+40;
parent.postMessage({brainDemoHeight:h},’*’);
}catch(e){}
}
window.addEventListener(‘load’,function(){postHeight();setTimeout(postHeight,400);});
window.addEventListener(‘resize’,postHeight);
recompute();render();step();
})();



