Skip to content

About

Scripts for setting up and managing an agent server

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Agent Server Scripts

Scripts for setting up a host machine and provisioning isolated microsandbox containers that run pi development agents against a local LLM.

Architecture

Host Machine ──(microsandbox)──► Sandboxed Dev Agent
                                    │
                                    └──► llama.cpp (external GPU server)
  • The host runs microsandbox (msb), which manages lightweight OCI containers
  • Each sandbox is a Debian container with Node.js, neovim, and pi pre-installed
  • An external llama.cpp server provides the LLM backend for the agent

Quick Start

On a bare host, bootstrap everything in one line:

wget -qO- https://raw.githubusercontent.com/ChumpChief/agent-server-scripts/main/host_scripts/setup_host | bash

This installs curl, git, openssh-server, Node.js (via nvm), microsandbox, and downloads scripts from the repo into ~/bin. After setup, run . ~/.bashrc then sandbox provision.

Setup

1. Prepare the host

Run the one-liner from Quick Start, or clone the repo and run:

./host_scripts/setup_host

Either way, this updates system packages, installs curl, git, openssh-server, Node.js (via nvm, latest LTS), and microsandbox globally. Downloads the latest scripts from the repo into ~/bin (added to PATH). Re-run anytime to update.

2. Provision a sandbox

sandbox provision

Runs an interactive prompt that collects:

  1. Sandbox name — unique identifier for the container
  2. AI server — host and port of your llama.cpp server
  3. GitHub token (optional) — classic PAT with repo and workflow scopes

Provisioning installs the following inside the sandbox:

  • APT packages (gh, neovim, git, curl, jq, tmux)
  • nvm + Node.js (latest LTS)
  • pi (global npm install)
  • pi-llama-cpp extension
  • Git user identity (configurable via env vars)
  • llama.cpp server URL in pi settings
  • Default working directory set to ~/git on SSH login

3. Sync code into/out of the sandbox

sandbox sync-in <name>    # host current dir → sandbox ~/sync
sandbox sync-out <name>   # sandbox ~/sync → host current dir

Day-to-Day

After provisioning, use msb directly for routine operations:

msb ssh my-dev-agent      # interactive shell
msb exec my-dev-agent -- nvim
msb stop my-dev-agent

Configuration

Key settings in sandbox are overridable via environment variables:

Variable Default Description
IMAGE debian Base OCI image
CPUS 2 CPU count
MEMORY 2G Memory limit
OCI_UPPER_SIZE 8G OCI upper filesystem size
PACKAGES gh neovim git curl jq tmux APT packages to install
SHELL /bin/bash Default shell for interactive sessions
WORKDIR ~/git Default working directory (SFTP) / SSH login cd target
GIT_USER_NAME ChumpChief-bot Git user name
GIT_USER_EMAIL chump.chief.bot@gmail.com Git user email

The provision command also prompts interactively for:

Prompt Env override Description
Sandbox name — Unique container name
llama.cpp host — Hostname of the llama.cpp server (always prompted)
llama.cpp port — Port of the llama.cpp server (always prompted)
GitHub token GITHUB_TOKEN Classic PAT for repo/workflow access

About

Scripts for setting up and managing an agent server

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages