ThreadId

org.llm4s.agent.graph.GraphIds$package.ThreadId
object ThreadId

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
ThreadId.type

Members list

Value members

Concrete methods

def apply(value: String): ThreadId
def child(parent: ThreadId, agent: AgentId, call: IdempotencyKey): ThreadId

The id of the child thread that the tool call call of a run on parent starts for agent agent (design 4.41): <parent>/~task/<agent>/<digest>, where the digest is the first 24 hex characters of the SHA-256 of ("llm4s-child-v1", parent, call, agent). The same call starting the same agent on the same thread always names the same child, so a replayed call finds the child its first run started; any other call, thread or agent names another. The id is hierarchical, so the nesting shows in it, and grows with depth.

The id of the child thread that the tool call call of a run on parent starts for agent agent (design 4.41): <parent>/~task/<agent>/<digest>, where the digest is the first 24 hex characters of the SHA-256 of ("llm4s-child-v1", parent, call, agent). The same call starting the same agent on the same thread always names the same child, so a replayed call finds the child its first run started; any other call, thread or agent names another. The id is hierarchical, so the nesting shows in it, and grows with depth.

The id's shape decides nothing: a thread is a child thread only when its checkpoint records a RunOrigin, so a caller naming a top-level thread like this gets a top-level thread.

Attributes

Givens

Givens

given given_ReadWriter_ThreadId: ReadWriter[ThreadId]

Encodes as a plain JSON string. Built from upickle's string codecs: inside this scope a ThreadId is a String, so summoning ReadWriter[String] would find this given.

Encodes as a plain JSON string. Built from upickle's string codecs: inside this scope a ThreadId is a String, so summoning ReadWriter[String] would find this given.

Attributes

Extensions

Extensions

extension (id: ThreadId)
def value: String