Luagents.Agent (luagents v0.2.0)

View Source

Core ReAct agent that thinks using Lua code. Inspired by smolagents but uses Lua for reasoning.

Summary

Types

t()

@type t() :: %Luagents.Agent{
  llm: Luagents.LLM.t(),
  lua_state: Luagents.LuaEngine.t(),
  max_iterations: pos_integer(),
  memory: Luagents.Memory.t(),
  name: String.t(),
  tools: map()
}

Functions

new(opts \\ [])

@spec new(Keyword.t()) :: t()

run(agent, task)

@spec run(t(), String.t()) :: {:ok, String.t()} | {:error, String.t()}