agentune icon indicating copy to clipboard operation
agentune copied to clipboard

Implement session-level progress tracking

Open leonidb opened this issue 1 year ago • 3 comments

Add progress tracking to simulation sessions so users can monitor simulation progress and access completed conversations before the session finishes.

Suggested Requirements (not final)

Progress Object on Session

  • Track completed/failed conversations during simulation
  • Store current stage and counts
  • Accessible from session object for querying

Failed Conversations

  • Store failed conversations (just the conversation object for now)
  • Separate collection from successful ones

Logging

  • Periodic progress logging (max every 30 seconds)
  • Log at start/end of each stage (intent extraction, conversations, adversarial test)
  • No progress bars (due to intermitten text output)

Integration

  • Use existing ProgressHandler callbacks to update progress object
  • Single-threaded async flow (no thread safety needed)
  • Compatible with future parallel execution (or even better, implement after the flow is already parallel)

Implementation Notes

  • Progress object lives on SimulationSession
  • Runners update via callbacks
  • Simple logging, no fancy progress bars

leonidb avatar Jun 22 '25 09:06 leonidb

@leonidb what exactly is missing?

  • We need to add the ProgressCallback parameter to SimulationSession/Builder
  • We should add a convenient method on_conversation_started, instead of forcing the caller to detect it by remembering what conversations were reported on

Other than that, doesn't the callback work already? All the callback methods are passed the Conversation as an argument, so the same callback can be used with multiple conversations.

danarmak avatar Jun 24 '25 17:06 danarmak

The callback is at conversation level. I'd like to have an aggregated progress logging, of each stage start/stop, and number of finished/in progress/not started conversations

leonidb avatar Jun 25 '25 11:06 leonidb

The callback is at conversation level. I'd like to have an aggregated progress logging, of each stage start/stop, and number of finished/in progress/not started conversations

Yes, that makes sense. I'll add that.

danarmak avatar Jun 25 '25 12:06 danarmak