Jido.Thread.Entry (Jido v2.0.0-rc.4)

View Source

A single entry in a Thread. Typed by kind with kind-specific payload.

Entries are immutable once appended. The refs map provides cross-links to other Jido primitives (signals, instructions, actions).

Entry Kinds

Kinds are open - any atom is accepted. Recommended kinds include:

  • :message - User/assistant/system message
  • :tool_call - Tool execution request
  • :tool_result - Tool execution result
  • :signal_in / :signal_out - Signal events
  • :instruction_start / :instruction_end - Instruction execution
  • :note - Human annotation
  • :error - Error occurred
  • :checkpoint - State snapshot marker

Refs Conventions

Common ref keys (not enforced):

  • signal_id - Associated signal ID
  • instruction_id - Associated instruction ID
  • action - Action module name
  • agent_id - Agent ID
  • parent_thread_id / child_thread_id - Thread relationships

Summary

Functions

Create a new entry from attributes

Types

t()

@type t() :: %Jido.Thread.Entry{
  at: integer(),
  id: binary(),
  kind: atom(),
  payload: map(),
  refs: map(),
  seq: integer()
}

Functions

new(attrs)

@spec new(map() | keyword()) :: t()

Create a new entry from attributes