View Source Agens (agens v0.2.0)
Agens is used to create multi-agent workflows with language models.
It is made up of the following core entities:
Agens.Serving- used to interact with language modelsAgens.Job- used to define multi-agent workflowsAgens.Router- used to map language model outputs to route instructionsAgens.Message- used to facilitate communication between Jobs and Servings
Summary
Types
Summary of a supervised Agens child process.
Functions
Returns a list of all supervised Agens child processes (Jobs and Servings)
with their pid, type, name, and configuration.
Returns the configured list of Agens.Backend implementations.
Generates a random hex-encoded identifier for use as a run, thread, or message id.
Returns process information for a supervised Agens child given its pid and module.
Types
@type process_info() :: %{ pid: pid(), type: :job | :serving, name: binary(), config: Agens.Job.Config.t() | Agens.Serving.Config.t() }
Summary of a supervised Agens child process.
Functions
@spec active_processes() :: [process_info()]
Returns a list of all supervised Agens child processes (Jobs and Servings)
with their pid, type, name, and configuration.
@spec backends() :: [module()]
Returns the configured list of Agens.Backend implementations.
Reads :agens application env key :backends, defaulting to
[Agens.Backend.Emit, Agens.Backend.Log].
@spec generate_uid() :: binary()
Generates a random hex-encoded identifier for use as a run, thread, or message id.
@spec get_process_info(pid(), module()) :: process_info()
Returns process information for a supervised Agens child given its pid and module.
When the module is Agens.Job, the result describes a Job. Otherwise it is treated as a Serving.