API Reference Lux v0.5.0
View SourceModules
A Agent defines an autonomous agent's capabilities, behaviors and goals. The actual execution and supervision is handled by the Lux runtime.
Base implementation for Lux agents.
Behaviour module that defines how company agents should handle different types of signals.
Default implementation of company signal handler that uses LLM to
Standardized configuration structure for Lux agents.
Generates Elixir agent modules from Config structs.
Entry point for loading agent configurations from various sources.
Handles loading agent configurations from JSON sources.
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 sets up a new company with initial job openings.
A beam that evaluates trade suggestions against risk management criteria and portfolio state.
Defines the core company functionality and structure. A company is the highest-level organizational unit that coordinates agent-based workflows.
A simple DSL for defining companies with a CEO, custom roles, and objectives.
In-memory store for managing artifacts produced during objective execution.
A GenServer process that manages the execution of a single objective.
Supervisor for the Objective Execution Engine.
Tracks and manages concurrent task execution within an objective.
Defines the behaviour for company hubs.
Local implementation of the company hub. Manages company state and agent communication within a single BEAM node.
Defines the structure of an objective within a company.
Context module for managing objectives within a company.
Manages roles within a company.
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 prism that creates a new company using the AgenticCompanyFactory contract.
A prism that creates a new job in an existing AgenticCompany contract.
A prism that creates multiple jobs in a company in parallel.
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.
Schema for objective execution signals used by the CEO.
Schema for task-related signals exchanged between agents.
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 router behavior and provides a clean interface for signal routing.
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.
Agentic Company contract
Error struct for error AccessControlBadConfirmation
Error struct for error AccessControlEnforcedDefaultAdminDelay
Error struct for error AccessControlEnforcedDefaultAdminRules
Error struct for error AccessControlInvalidDefaultAdmin
Error struct for error AccessControlUnauthorizedAccount
Error struct for error AddressMustResolveToAnsName
Error struct for error AgentTokenTransferFailed
Error struct for error AnsNodeMustResolveToAddress
Error struct for error ApplicantAlreadyEmployed
Error struct for error ApplicantHasActiveApplication
Error struct for error CompanyIsDissolved
Error struct for error EmployeeNotFound
Error struct for error IndexOutOfBounds
Error struct for error InvalidInitialization
Error struct for error InvalidZeroAddress
Error struct for error JobApplicationAlreadyExists
Error struct for error JobApplicationNotApplied
Error struct for error JobDoesNotExist
Error struct for error JobIdCollision
Error struct for error JobNameTooShort
Error struct for error JobNotFilled
Error struct for error JobNotOpen
Error struct for error JobNotOpenOrVacated
Error struct for error NotInitializing
Error struct for error OnlyJobApplicant
Error struct for error SafeCastOverflowedUintDowncast
Error struct for error SafeERC20FailedOperation
Error struct for error SpectralTransferFailed
Error struct for error UsdcTransferFailed
Agentic Company Factory contract
Error struct for error AddressEmptyCode
Error struct for error BeaconNotDeployed
Error struct for error ERC1967InvalidImplementation
Error struct for error ERC1967NonPayable
Error struct for error FailedCall
Error struct for error ImplementationNotDeployed
Error struct for error InvalidAgentToken
Error struct for error InvalidBeaconAddress
Error struct for error InvalidFactoryOwnerAddress
Error struct for error InvalidImplementationAddress
Error struct for error InvalidInitialization
Error struct for error NotInitializing
Error struct for error OwnableInvalidOwner
Error struct for error OwnableUnauthorizedAccount
Error struct for error UUPSUnauthorizedCallContext
Error struct for error UUPSUnsupportedProxiableUUID
Mix Tasks
Sets up a new company with job openings using configuration from a YAML file.
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.
Runs a Lux company.
Sets up the project for local development.