This folder contains a minimal, sandboxed TypeScript “always-on” autonomous loop example:
- Think using
plugin-local-ai(local GGUF inference) - Optionally act using
plugin-shell(restricted directory) - Record observations using
plugin-inmemorydb(ephemeral, in-process) - Repeat until stopped
These demos are intentionally sandboxed:
- Shell is directory-restricted: set
SHELL_ALLOWED_DIRECTORYto a dedicated sandbox folder. - Default command allowlist: the examples only allow a small set of basic commands (you can expand it).
- Kill switch: create a
STOPfile inside the sandbox directory to stop the loop.
Download the Eliza-1 mobile GGUF and place it in your models directory.
- Model repo:
elizaos/eliza-1 - GGUF file:
bundles/2b/text/eliza-1-2b-32k.gguf
Then set:
export MODELS_DIR="$HOME/.eliza/models"
export LOCAL_SMALL_MODEL="eliza-1-2b-32k.gguf"Note: the TypeScript 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 packages/examples/autonomous/sandbox):
export SHELL_ALLOWED_DIRECTORY="$(pwd)/packages/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 packages/examples/autonomous
bun install
bun run startbun run test
bun run typecheckThe test suite covers the local decision parser, shell-command allowlist, and prompt construction without starting local inference or shell services.