packages/examples/autonomous/README.md
This folder contains three minimal, sandboxed “always-on” autonomous loop examples (TypeScript, Python, Rust) that all follow the same pattern:
plugin-local-ai (local GGUF inference)plugin-shell (restricted directory)plugin-inmemorydb (ephemeral, in-process)These demos are intentionally sandboxed:
SHELL_ALLOWED_DIRECTORY to a dedicated sandbox folder.STOP file inside the sandbox directory to stop the loop.Download the Eliza-1 mobile GGUF and place it in your models directory.
elizaos/eliza-1bundles/2b/text/eliza-1-2b-32k.ggufThen set:
export MODELS_DIR="$HOME/.eliza/models"
export LOCAL_SMALL_MODEL="eliza-1-2b-32k.gguf"
Notes:
plugin-local-ai implementation can auto-download its default models. For this example, pre-download the Eliza-1 mobile GGUF and set LOCAL_SMALL_MODEL to the exact filename.Pick a safe directory (example below uses this repo’s examples/autonomous/sandbox):
export SHELL_ALLOWED_DIRECTORY="$(pwd)/examples/autonomous/sandbox"
export SHELL_TIMEOUT=30000
# Recommended extra restrictions (network/process control, etc.)
export SHELL_FORBIDDEN_COMMANDS="curl,wget,ssh,scp,rsync,nc,socat,python,node,bun,kill,pkill,killall,shutdown,reboot"
Create the sandbox directory if it doesn’t exist:
mkdir -p "$SHELL_ALLOWED_DIRECTORY"
cd examples/autonomous
bun install
bun run start
cd examples/autonomous/python
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python autonomous.py
Note: The Rust example requires
elizaos-plugin-local-aiwith thellmfeature enabled for actual inference. This feature depends on a vendoredllama_cpp_rscrate that is not yet included in the repository. The example will compile but exit early with an error message until the vendor is added. See the plugin'sCargo.tomlfor details.
cd examples/autonomous/rust/autonomous
cargo run --release