View Source Agens.Job.Node (agens v0.2.0)
The Node struct defines a single node within a Job.
A Node is a combination of a text :objective, zero or more MCP :tools and :resources, an
optional :agent_id for loading context, and an optional :sub Job to run in place of this
Node's inference call. The :serving field is the only required link to a running process — it
names the Agens.Serving that performs inference (or, when :sub is set, the Serving whose
Agens.Serving.handle_sub/3 callback maps the Sub-Job's result back into this Node's outputs
and routing).
Fields
:serving- TheAgens.Servingto run inference against. Required, even when:subis set; the Serving owns routing for the Node's result (via the Router'soutputs/1+resolve/2, or viahandle_sub/3when:subis set).:agent_id- The agent identifier used to load context for this Node (seeServing.load_context/2).:sub- The id of a sub-Job to run in place of a Serving inference call. The Node's Serving is still used to route the Sub's result viaAgens.Serving.handle_sub/3.:objective- An optional string added to the LM prompt explaining the purpose of this Node.:tools- Tool definitions made available to the Serving for this Node.:resources- List ofAgens.Resourcestructs to be loaded prior to inference.
Summary
Functions
Builds a Agens.Job.Node from a decoded map (e.g. the output of Jason.decode!/1).
Types
@type schema() :: binary()
A tool schema, opaque to the Job.
Functions
Builds a Agens.Job.Node from a decoded map (e.g. the output of Jason.decode!/1).
String keys are expected. The "serving" field, if present, is converted to an existing atom.