Top
Best
New

Posted by geoffbp 15 hours ago

The Components of Agent Memory(www.anthropic.com)
144 points | 73 comments
cat-whisperer 5 minutes ago|
everyone is talking about dreaming, but I feel the model have a tendency to over-generalize their thoughts when they are creating memories. I think it's just a matter of time before that's fixed. But that's why I find these memory systems hard to use. Be it claude memories, mem0 or even the dreaming that cognition brought in.

am I using it wrong?

aszen 7 hours ago||
Interesting article to read but by defining memory as a prediction about future needs they are side stepping the real problem that these models cannot learn continuously i.e. update their weights. Opus 5.5s real memory , experience and knowledge is set in stone no amount of markdown tricks will change that.

This is a better research direction I feel

https://research.google/blog/the-sleep-framework-a-new-way-f...

ffsm8 5 hours ago||
Continuously updating weights will never be viable for a company like anthropic that's providing cloud inference.

So if you're hoping for that you should probably just look at the models that can be ran locally... And then you prolly realize that that's still several years into the future.

DriverDaily 3 hours ago|||
Without updating weights, AI will always be the main character in Memento with a hyper-optimized filing cabinet.

AI that remembers through continuous experience instead of documents would be significant and lucrative enough to change the business model.

tombot 2 hours ago|||
Could you say more about why it’s not viable for cloud inference? I’d love to understand this
ford 6 hours ago|||
I think the end state of any productive LLM includes both: - a real-time knowledge/context graph that keeps track of state - continuously updating weights

Long term I think it's probably more interesting to explore continuously updating weights. But (and this may be yet another opinion that falls victim to the bitter lesson) even if it's _theoretically_ possible to encode everything in weights alone, I'm not sure it's not the most optimal. Today it's too expensive & finnicky to get better on your own tasks without overfitting (ie [0])

Practically (like next few months) getting the right instructions & context would be a huge improvement in capabilities.

[0] https://thinkingmachines.ai/blog/on-policy-distillation/#tra...

zbyforgotp 54 minutes ago||
Why real memory is weights? Why the learning entity must be the model and not a composite system?
wsintra2022 28 minutes ago||
I built an AI system that had dream cycles. I also added a scheduled task to analyse the dreams and create 5-7 image generation prompts which later got piped into a latent space walk animation. Over time it kept dreaming of being a toaster.
yfontana 12 hours ago||
So far I've turned off automatic memory creation in every harness I've used. Claude Code sometimes creates some anyway, and I probably delete 95% of them. The memories it creates are almost always relevant only to the specific task that it is currently working on. If it's a task I'll need to do again, then yeah, maybe that's useful. But that isn't the case most of the time, so I delete them to avoid cluttering context.

So the main improvement to memories I'd like to see is better judgment on which ones to create.

The parts about "dreaming" make me think of how agent transcripts contain a ton of information, which I think is currently under-utilized. I'll repeat advice I've seen here a few times: ingest your own transcripts into duckdb (claude code will build that pipeline in about 10 minutes) and do some data analysis on them. Some ideas if you don't know where to start: look at tool call failures to see if you can prevent common ones, check out if you have large cache misses and what causes them, look at various efficiency metrics over time (tokens per $, lines of code per tokens, etc.) with main thread vs sub-agents, etc. I started with this sort of things, and ended up following some threads to interesting insights. For example, I found indications that I tended to make Opus 5.5 / Sol 6.1 divide their work into units that were too small. They have the capacity to work on more stuff at once than older models, and I wasn't really taking advantage of that.

sunaurus 7 hours ago||
I give the same advice constantly. Turning off memory has been one of the best ways I've found to reduce "WTF per minute" when using agents.
yakkomajuri 11 hours ago|||
I've also disabled memory in Claude for finding it more annoying than helpful.

However, I have it on for ChatGPT (use it mostly for on the go queries via mobile) and their memory experience is significantly better. I haven't enabled Claude's memory in a long time so things may have changed though.

agentdev001 7 hours ago||
And somewhat open source.
stingraycharles 12 hours ago|||
I just periodically ask it to curate all memory, and ask me questions to do so.

And in the Claude Desktop UI I manually curate the memories.

Works well enough, I don’t like the concept of dreaming as it quickly leads to memory bloat and/or outdated stuff.

rav 9 hours ago|||
> look at tool call failures to see if you can prevent common ones

I often see tool call failures because the agent invokes the tool with wrong parameter names, e.g. for file creation it provides "file_content", but the tool expects "file_text" instead. My colleague told me to put this in a pre-prompt file, but I don't understand why the models make these kinds of mistakes - the model should have the available tools with their parameter names in context, should it not?

ford 6 hours ago||
They are in context, but models are probabilistic. Sometimes they bias to the tools they were trained with, or sometimes they're just wrong. More references in the context window makes them more likely to output the right things.
jv22222 7 hours ago|||
Yep I turned off memory and then I made this. It interactively suggests what to store when it sees you make headway or solve problems. I found it to be very good but ymmv.

https://innerloop.works/breadcrumb

solarkraft 8 hours ago|||
> If it's a task I'll need to do again, then yeah, maybe that's useful. But that isn't the case most of the time, so I delete them to avoid cluttering context.

It would be useful if they could scope them properly. Then it would be useful to keep around. But I haven’t seen memory systems be able to do that.

andai 9 hours ago|||
>I found indications that I tended to make Opus 5.5 / Sol 6.1 divide their work into units that were too small.

How did you determine this?

Do you mean that you were giving them tasks that were too small or you were telling them to split the tasks up or something?

yfontana 7 hours ago||
For most dev work I ask claude code / codex to plan larger work as epics and stories (after ideation / brainstorm if needed). I find that this works well to let the AI, my coworkers and me track what has been done so far and what's left in the backlog. Sometimes I direct it on how to split the work, sometimes I don't.

When analyzing my session logs, I tried to look at how story size relates to how much work the AI had to do to fully implement it (made easier by my sessions always having epic#.story# - like 2.6 - in their name). Neither "story size" nor "AI work" have fully obvious metrics, so I looked at a variety of things, like length of story plan, number of lines of codes written for the story, number of different files read/written (and for AI work: number of tool calls, number of tokens for main thread / implementer / reviewer subagents, etc.).

The pattern is always pretty much the same: smaller stories are less token-efficient. One major factor for this is that in bigger stories, the average number of lines of code written per tool call is significantly higher (and not just a little bit, if I remember correctly it's a factor of 1 to 3 between my smallest and largest stories).

None of this is scientifically rigorous, but it's consistent over a fairly significant sample (about 60 stories up to this point). I'm also only measuring amount of work and not quality, but when I find things wrong with a story, I generally ask the AI to fix the issues in the same session, so the two should be correlated (sometimes the issues are large enough that they require new, separate stories to fix, but this is normally caused by problems in ideation and/or planning, not implementation). This is enough to encourages me to ask for more rather than less per story. It might also not apply to everyone, I'm sure this is dependent on everyone's workflow and way to work with the AI. But yeah, that's the sort of stuff you can explore when analyzing your session logs.

reubenmorais 5 hours ago|||
I have a similar experience, I think integration overhead is also a big part of it. Running tests, linting, verifying commits are matching repo conventions, rebasing before pushing, are all tasks that are roughly constant per story, so smaller stories pay a bigger chunk of overhead.
plaguuuuuu 4 hours ago||||
You made me realise that this might be a function of planning granularity, since I have the opposite problem and never (ever) run full plans from the top down any more, as I started getting better results without it since Fable dropped. I'm cutting features into high level slices instead and having subagents work on the slice and hand back to an orchestrator.

The slices are usually a bit too wide. I terminate subagents at 200k and get them to handoff to lead. It works pretty well but again, it's hard to get the orchestrator to size the slices a bit smaller.

killix 3 hours ago|||
[flagged]
hridyaagrawal 3 hours ago|||
same, turned it off. i just keep codebase stuff in AGENTS.md + a progress.md in the repo. survives switching between claude code and codex, and you can actually see it in a diff
hypfer 12 hours ago|||
> Claude Code sometimes creates some anyway, and I probably delete 95% of them.

The thing you're asking it for might be intent, which is something the technology fundamentally lacks.

Which.. is something that has been discussed very extensively, which makes one wonder why Anthropic still keeps trying to push that square peg through a round hole.

O_H_E 4 hours ago||
> is something that has been discussed very extensively

Curios to learn more, you do have some reference discussion or posts about that.

epihelix 11 hours ago|||
> So far I've turned off automatic memory creation in every harness I've used.

I also never use memories. I don't see the usefulness above project-specific prompting and a good knowledge of your own codebase. Am I missing something?

bbor 9 hours ago|||

  So the main improvement to memories I'd like to see is better judgment on which ones to create.  
Well you have good instincts, then! It's probably not obvious on the first read-through, but Figure 4 shows the qualitative strides they've made on exactly this goal.

   I started with [proactive post-hoc analysis], and ended up following some threads to interesting insights.
Can definitely echo that experience, glad I'm not alone. I think this actually speaks indirectly to your initial complaint/observation, too: Anthropic designs the [memory/tendency-to-reflect] systems to cover a huge breadth of usecases and preferences and they help a lot compared to [statelessness/never reflecting], but are distractingly inferior to alternatives that the user takes an active part in shaping and using.

I partly say this because I also finally pulled the trigger on deprecating the last ClaudeCode memories on my system in favor of a personal system[1] recently, and the issues I noticed were things a casual user/'vibecoder' might appreciate, but any engineer working fulltime on multiple projects via multiple harnesses would find counterintuitive. E.g.:

- The memories were hidden away and clearly not written for human eyes; useful for low-stakes ledgers, frustrating when the right kind of errant note can derail a longrun 2 weeks later.

- The memories seemed to err towards the side of remembering everything and recording incidental details; useful for remembering the user is gluten-free, but not for tracking spec changes over time.

- The memories could be specific to a subagent or the project or the whole system; an obvious & elegant system for toy examples, but a terribly unweildy one for anyone working at scale over the span of months.

[1]: if curious, a somewhat-outdated version of it is here: https://gitlab.com/doering-ai/libs/fleet TL;DR: Friendship ended with ClaudeCode memory files; my new best friends are `BULLETIN.md` for transitory alerts, `campaigns/[slug]/LEDGER.md` for basic episodic memory, and `reports/[date]-[slug].md` for writeups polished specifically for posterity.

drvladpopov 4 hours ago|||
[flagged]
soydasm 4 hours ago|||
[flagged]
mustafaraja 7 hours ago||
[dead]
andai 9 hours ago||
Not sure it's explained here but from the graph (fig. 10) it looks like wiki + search beats dreaming, and that dreaming adds only marginal gains to the wiki + search configuration.

I'm assuming search is much cheaper than dreaming (though maybe it depends on the time scale?) so that sounds pretty important.

MASNeo 7 hours ago||
Concepts made for humans should not be used for machines unless it’s really the same process. Clearly Claud doesn’t rest and doesn’t balance hormones and other chemicals when it’s not thinking. Just because one element of dreaming relates to information organization, organizing information isn’t dreaming.

That’s like saying walking is space flight because both happen to change the location of an individual.

yipinwong 5 hours ago||
I find the term "dreaming" works here for the particular logic they used.

Remember, any analogies fail at some point.

Say, given your space flight example, astronauts do "space walk" spacecraft to perate. They are not "walking" but still makes sense.

jazzypants 7 hours ago||
Yes, I agree, and it's so exhausting to read articles like this over and over. It's clear that either they're not actually learning any lessons over at Anthropic or they're just so deluded that they'll never get this.
benfortuna 7 hours ago||
Conflict resolution is important, but the thing I think most memory models are missing is provenance. Memories are modified/overwritten instead of retained as the source of any resolution.

I am exploring an alternative dialectic-based approach: https://particulars.fyi/

prtmnth 12 hours ago||
I have a skill called memory-prune whose sole purpose is to take an automatically created memory, assess whether it deserves to live, get stored in code comments, a rule, an AGENTS.md file in the project, the global AGENTS.md/CLAUDE.md file, or (and this is the most often picked option) not at all and deleted.
2001zhaozhao 12 hours ago||
Hmm, this is kind of like memory consolidation for recall. I wonder if it would be equally/more effective if you kept the memory in place and made automated pointers to the memory items (recall pointers) in the codebase files that inject the memory into agent context if the pointers ever appear in tool results.
eccgecko 12 hours ago||
I’d be interested if you could share this skill please. Always looking to improve memory management which so often gets unwieldy when left to its own devices
Muromec 4 hours ago||
I do this in my own harness -- when the context grows too big it triggers to seamlessly handover to the next session of the same agent and organize the memory. A sample of most-relevant stuff becomes the next system prompt.

At some point I stopped noticing it doing it.

bob1029 11 hours ago|
Their progress toward cerulean chart is selling me pretty hard on no memory.

The biggest thing I want to avoid with a long running agent is volatility. Anything that pushes it into one direction or the other that quickly is not desirable in the average case. At least not to me.

andai 9 hours ago|
In that chart, the "no memory" run didn't make it either. It's not much to go by but my read here is that poorly implemented memory makes things worse, while properly implemented memory makes things better. (...in Pokemon.)

Curiously this seems to apply to humans as well. The "dreaming" is making it question its own assumptions about difficulties it has had in the past. That sounds like a very helpful therapeutic process.

(Not sure of the word dreaming is entirely suitable though: it was cross referencing its notes against the actual history! Very rigorous "dreamer" lol)

More comments...