ThreadStatus

org.llm4s.agent.graph.ThreadStatus
See theThreadStatus companion object
@Experimental

Where a thread is, as the thread registry reports it (Checkpointer.threads, design 4.52). It is derived, when the store is read, from the thread's latest checkpoint and its claim, judged by the store's clock:

  • Deleted: a cascade delete of the thread has begun (Checkpoint.deleting) and not finished: the thread refuses every admission until a deleteThread finishes it. A thread deleteThread removed is not listed at all: its tombstone holds nothing of it, not even its tenant.
  • Running: a live claim holds the thread - a run, or a change such as updateState, fork or a delete, is under way on some machine - whatever its latest checkpoint says.
  • Idle: no live claim holds the thread and its latest checkpoint is incomplete (CheckpointStatus.Running): a run stopped before it finished - it crashed, was cancelled or was drained, which look alike here - and recover would continue it. Checkpointer.incompleteThreads lists these, oldest first.
  • Suspended, Completed, Failed: no live claim holds the thread, and its latest checkpoint has that status.

Attributes

Companion
object
Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Type members

Enum entries

case Completed extends ThreadStatus
case Deleted extends ThreadStatus
case Failed extends ThreadStatus
case Idle extends ThreadStatus
case Running extends ThreadStatus
case Suspended extends ThreadStatus