View Source Agens.Agent (agens v0.1.2)

The Agent module provides functions for starting and stopping Agents.

Agens.Agent is the the primary entity powering Agens. It uses Agens.Serving to interact with language models through Nx.Serving, or with language model APIs through a GenServer.

Agents can have detailed identities to further refine LM outputs, and are used together in multi-agent workflows via the Agens.Job module.

Agent capabilities can be expanded even further with Agens.Tool modules, which are designed to handle LM functional calling.

Summary

Functions

Retrieves the Agent configuration by Agent name or pid.

Starts one or more Agens.Agent processes

Stops an Agens.Agent process

Functions

@spec get_config(pid() | atom()) ::
  {:ok, Agens.Agent.Config.t()} | {:error, :agent_not_found}

Retrieves the Agent configuration by Agent name or pid.

@spec start([Agens.Agent.Config.t()] | Agens.Agent.Config.t()) ::
  [{:ok, pid()}] | {:ok, pid()}

Starts one or more Agens.Agent processes

@spec stop(atom()) :: :ok | {:error, :agent_not_found}

Stops an Agens.Agent process