ExAgent.Continuation.DeferredCall (ExAgent v3.0.0)

View Source

An open deferred tool call read from a trusted scoped Store by ExAgent.Continuation.pending/2.

Stability — Stable.

A tool returned {:defer, meta} or {:defer, meta, kind: kind}: its work continues outside the run (:external) or it waits for a datum (:input) or a time (:timer). The input and timer variants are candidate. A timer carries the candidate field :wake_at in UTC milliseconds. Pass this value to ExAgent.Continuation.supply_result/4 with the result. For a timer, supply it before the Store clock reaches that time.

The candidate :call_ref correlates this invocation with tool events. :call_id is the provider ID and :deferral_id is the effect ID. :meta is the JSON object the tool returned for the host. :deferred_hash binds the supplied result to this deferral. :args are the arguments used at dispatch. Ordinary inspection omits :args and :meta.

The candidate :delegation_path lists the edges from the root to the requesting run. :definition identifies the agent owning the tool.

Summary

Types

t()

@type t() :: %ExAgent.Continuation.DeferredCall{
  args: map(),
  call_id: String.t(),
  call_ref: String.t() | nil,
  deferral_id: String.t(),
  deferred_hash: String.t(),
  definition: %{required(String.t()) => String.t()},
  delegation_path: ExAgent.Continuation.delegation_path(),
  expires_at: integer() | nil,
  id: String.t(),
  kind: :external | :input | :timer,
  meta: map(),
  namespace: String.t(),
  operation_id: String.t(),
  record_id: String.t(),
  revision: pos_integer(),
  run_id: String.t(),
  tool_name: String.t(),
  wake_at: non_neg_integer() | nil
}