The :beamlet application config.
config :beamlet,
data_dir: "/var/lib/beamlet",
web: [endpoint: MyAppWeb.Endpoint],
eval: [timeout: 60_000],
mcp: [request_timeout: 90_000],
http: [allow: ["homeassistant.local", "192.168.1.0/24"]]The beamlet checks every key when it starts. A bad value stops the boot with a message naming the key. A change takes a restart.
Times are in milliseconds and sizes in bytes.
Keys
:data_dir- The directory where the beamlet keeps everything: its databases, the code agents define and the files they keep. Required. It must be an absolute path to a directory that already exists.:policies- The policies a token can have besidesdefault, as a keyword list of name to policy. None by default.Beamlet.Policydescribes how to write one.:eval- Limits on theevaltool.timeoutis how long one evaluation may run (30 seconds).max_heap_bytescaps the memory it may use (128 MB), andmax_outputthe output returned to the model (32 KB).Beamlet.MCP.Evalsays what happens when each is reached.:define-timeoutis how long onedefineorpatchmay take to compile (30 seconds).:mcp-request_timeoutis how long the MCP server waits for a tool to answer before replying "Server unavailable" (65 seconds). It must be longer than the eval and define timeouts, so a slow tool reports its own error first.:http-allowlists the hosts on private networks that agent code may reach throughHost.HTTP, as names, IP addresses or CIDR blocks. A name must be listed as a name: allowing its address or block is not enough. Empty by default, so agent code reaches only the public internet.:web-endpointnames the Phoenix endpoint that forwards toBeamlet.Router. Required.prefixis a path to serve the routes agents mount under, such as"/app", and cannot be under/beamlet. Empty by default, which serves them at the root.
Summary
Functions
The agent database file, used by Host.Repo.
The beamlet's own database file, used by Beamlet.Repo.
The directory holding the modules agents define, with their git history.
The data directory, an absolute path.
The directory holding both database files.
The :define settings, with the defaults filled in.
The :eval settings, with the defaults filled in.
The directory holding the files agent code keeps through Host.File.
The :http settings, with the defaults filled in.
The :mcp settings, with the defaults filled in.
The policies declared besides default.
Checks every key, raising ArgumentError for the first at fault.
The :web settings, with the defaults filled in.
Functions
@spec agent_db_file() :: Path.t()
The agent database file, used by Host.Repo.
@spec beamlet_db_file() :: Path.t()
The beamlet's own database file, used by Beamlet.Repo.
@spec code_dir() :: Path.t()
The directory holding the modules agents define, with their git history.
@spec data_dir() :: Path.t()
The data directory, an absolute path.
@spec db_dir() :: Path.t()
The directory holding both database files.
@spec define() :: keyword()
The :define settings, with the defaults filled in.
@spec eval() :: keyword()
The :eval settings, with the defaults filled in.
@spec files_dir() :: Path.t()
The directory holding the files agent code keeps through Host.File.
@spec http() :: keyword()
The :http settings, with the defaults filled in.
@spec mcp() :: keyword()
The :mcp settings, with the defaults filled in.
@spec policies() :: keyword()
The policies declared besides default.
@spec validate!() :: :ok
Checks every key, raising ArgumentError for the first at fault.
Beamlet calls it before starting anything. It does not check that
an endpoint is set. A full boot checks that afterwards.
@spec web() :: keyword()
The :web settings, with the defaults filled in.