[EPIC] Maintain context/session state between runs #98

Closed
opened 2026-02-16 01:15:45 -05:00 by yindo · 2 comments
Owner

Originally created by @logan-markewich on GitHub (Sep 26, 2024).

Originally assigned to: @logan-markewich on GitHub.

Currently, the code that was supposed to maintain context/state between runs is all commented out.

We need to bring back this feature, by figuring out how to serialize the context. That means, we need to serialize

  • the globals dict
  • the queues
  • etc.

In this case, I don't think it's enough to maintain just the global dict. We need it all, especially to support future use-cases where runs of a workflow can be stepwise, take days, have undo/rewind, etc.

This will require figuring out how to do this in llama-index itself first of course

Originally created by @logan-markewich on GitHub (Sep 26, 2024). Originally assigned to: @logan-markewich on GitHub. Currently, the code that was supposed to maintain context/state between runs is all commented out. We need to bring back this feature, by figuring out how to serialize the context. That means, we need to serialize - the globals dict - the queues - etc. In this case, I don't think it's enough to maintain just the global dict. We need it all, especially to support future use-cases where runs of a workflow can be stepwise, take days, have undo/rewind, etc. This will require figuring out how to do this in `llama-index` itself first of course
yindo closed this issue 2026-02-16 01:15:45 -05:00
Author
Owner

@jonpspri commented on GitHub (Oct 6, 2024):

I'm looking first to a simple case of managing a session-level context in the WorkflowService. I see a framework is in place but not yet implemented. The basic idea is easy, create a context for each session and persist it (in-memory initially, eventually on storage).

The simple approach is to wire that in to the existing Workflow Service or a subclass, but I wondering if the notion of a separate ContextManager class is appropriate? I'll probably hold that in store as a refactoring.

@jonpspri commented on GitHub (Oct 6, 2024): I'm looking first to a simple case of managing a session-level context in the WorkflowService. I see a framework is in place but not yet implemented. The basic idea is easy, create a context for each session and persist it (in-memory initially, eventually on storage). The simple approach is to wire that in to the existing Workflow Service or a subclass, but I wondering if the notion of a separate ContextManager class is appropriate? I'll probably hold that in store as a refactoring.
Author
Owner

@logan-markewich commented on GitHub (Apr 1, 2025):

This should actually be supported now. Going to close this out.

@logan-markewich commented on GitHub (Apr 1, 2025): This should actually be supported now. Going to close this out.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/llama_deploy#98