Skip to content

benjamin-james/agentctl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

agentctl

https://raw.githubusercontent.com/benjamin-james/agentctl/refs/heads/badges/.badges/main/coverage.svg

Tool that generates cloud-init YAML for auto-generating agentic virtual machines enabled with the agent communication protocol (ACP). Provide agent config/secrets, SSH key(s), optional packages, optional 9p file mount

Install

go install github.com/benjamin-james/agentctl@latest

Optionally, install this VM provisoning script vm wrapping `virt-install`:

wget https://raw.githubusercontent.com/benjamin-james/dotfiles/refs/heads/master/bin/vm
chmod u+x vm

Usage

Here the cloud-init YAML is installed using a script vm wrapping virt-install

opencode with a provided config file

agentctl -a opencode -c ~/.config/opencode/opencode.json -k ~/.ssh/id_ed25519.pub -o ci_oc.yaml
LIBVIRT_DEFAULT_URI=qemu:///system vm create -n opencode -y ci_oc.yaml

codex with auth.json on remote server

agentctl -a codex -a ~/.codex/auth.json -k ~/.ssh/id_ed25519.pub -o ci_codex.yaml
LIBVIRT_DEFAULT_URI=qemu+ssh://muser@myserver/system vm create -n codex -y ci_codex.yaml

goose with sharing /data

agentctl -a goose -c ~/.config/goose/config.yaml ~/.ssh/id_ed25519.pub -o ci_goose.yaml --share-data
LIBVIRT_DEFAULT_URI=qemu:///system vm create -n goose -y ci_goose.yaml

Generating cloud-init ISO directly

On some platforms like Mac OS X’s UTM, a direct cdimage is necessary:

### here, for example: ci_oc.yaml
VMNAME="my-vm-1"
CIYAML="ci_oc.yaml"
printf "instance-id: %s\nlocal-hostname: %s\n" "${VMNAME}" "${VMNAME}" > meta-data
xorriso -as mkisofs \
	-output "cloud-init.iso" \
	-volid CIDATA -joliet -rock \
	-graft-points "meta-data=meta-data" "user-data=$CIYAML"

About

agent manager

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages