Lux.Agent.Base (Lux v0.5.0)

View Source

Base implementation for Lux agents.

This module provides common functionality for all agents:

  1. Signal handling and routing
  2. State management
  3. LLM interaction
  4. Tool usage

Summary

Functions

Returns a specification to start this module under a supervisor.

Uses the agent's LLM to evaluate a task or make a decision.

Callback implementation for GenServer.init/1.

Retrieves information from the agent's memory.

Stores information in the agent's memory.

Uses a specific tool from the agent's toolset.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

evaluate(prompt, context, opts \\ [])

Uses the agent's LLM to evaluate a task or make a decision.

init(opts)

Callback implementation for GenServer.init/1.

recall(key, context)

Retrieves information from the agent's memory.

remember(key, value, context)

Stores information in the agent's memory.

start_link(opts)

use_tool(tool_name, args, context)

Uses a specific tool from the agent's toolset.