You should check out secai [0], its a state machine in Golang for long lived agents with structured memory. Its a prerelease and the abstraction of more complex Stories which can intermix will land soon. You can fork the deepreaserch demo and experiment.