API Reference Lux v0.3.0

View Source

Modules

Lux

Documentation for Lux.

A Agent defines an autonomous agent's capabilities, behaviors and goals. The actual execution and supervision is handled by the Lux runtime.

Supervisor for managing Agent processes. Handles starting, stopping, and monitoring agents.

A central hub for managing and discovering agents in the system. Provides functionality for registering agents, tracking their status, and discovering agents based on capabilities.

An agent that analyzes market conditions and proposes trades based on research.

An agent that evaluates trade proposals for risk and executes approved trades.

Beams orchestrate workflows by combining multiple Prisms into sequential, parallel, or conditional execution paths with dependency management and execution logging.

Executes beam definitions by running steps in sequence, parallel, or conditionally based on the beam's structure.

A beam that evaluates trade suggestions against risk management criteria and portfolio state.

Central configuration for Lux application

A module for interacting with LLMs. Defines the behaviours for LLMs and provides a default implementation.

OpenAI LLM implementation that supports passing Beams, Prisms, and Lenses as tools.

Configuration module for OpenAI.

A response from an LLM.

A SignalSchema to represent an LLM response. It contains the content, model,tool calls, and finish reason. Any other data should be stored in the Signal's metadata field.

Lenses are used to load data from a source and return it to the calling agent.

Lens for fetching token prices from the Transpose API.

Core memory functionality for Lux agents and components.

A simple memory implementation using GenServer and ETS. Provides efficient chronological storage and retrieval of memory entries.

Provides functions for executing Node.js code with variable bindings.

Modular, composable units of functionality for defining actions.

A simple prism that checks an Ethereum account's balance.

A simple prism that checks the current Ethereum block number.

A prism that handles chat messages between agents. It processes incoming chat messages and generates appropriate responses.

A prism that executes orders on the Hyperliquid exchange.

A prism that fetches open orders from the Hyperliquid exchange.

A prism that calculates risk metrics for a proposed Hyperliquid trade.

A prism that fetches token price data from the Hyperliquid API.

A prism that fetches user state information from the Hyperliquid exchange.

A prism that cancels a specific order on the Hyperliquid exchange.

A no-operation prism that simply returns its input or an empty map if no input. Used as a placeholder in conditional branches where no action is needed.

A prism that performs sentiment analysis on text using Python's NLTK library.

Provides functions for executing Python code with variable bindings.

A Reflection represents a Agent's decision-making process and self-awareness. It can evolve over time as the Agent learns and adapts to new situations.

Represents a signal that can be sent between agents. Signals are the primary means of communication between agents.

Defines the schema for chat messages between agents.

Defines the behaviour for signal routing between agents.

Local implementation of the Router behaviour using GenServer.

Defines the behavior and macros for creating Signal schemas.

Shared Types for Lux.

UUID generation and formatting.

Mix Tasks

Quick helper to read dependency documentation from the command line and print it to the terminal. You might want to add this to your .cursorrules file

Runs Python tests using pytest.

Sets up the project for local development.