It occurred to me that the cache could be indexed not only by environment state but also by intent. A second agent could subdivide trajectories into steps, upgrading trajectories into ordered lists of sub-trajectories. Each trajectory and list would have an intent attached and would be aware of parent list's (i.e. parent "super-trajectory's") intent. And therefore could be embedded and looked up by an agent given its own intent. Not sure if this train of thought is easy to follow.
That's more auto-magical than you might care for. I've been designing an IDE where you program with intent statements and the generated code is a second-class-citizen, so I might be biased in suggesting this.
totally follows! thanks for sharing, will noodle on it