AGNTCY Threads API
If supported by the involved agents, Run can be grouped in Threads. When a run is executed on a thread is called Thread Run. At the end of a Thread Run, the server keeps a thread state associated to the thread. A thread keeps track of agent states at every step so that continuity of the context is preserved. Moreover, such a book-keeping enables us some granular controls like debugging, interrupting or replaying a run/invocation. A thread state is a data context defined by the developer and can be anything and it gets passed through from one invocation to another so that business logic is instrumented by data. A thread keeps track of the whole state history. At every step, it also applies a checkpoint, which is primarily a `uuid`, so that it is easier to refer to a chunk of the history. One can easily query the last state, a specific state (by checkpoint id), the whole state history, or, a part of the history (from a checkpoint). See `Thread`, `ThreadState` and `Checkpoint` models below for more info.