Agent Playground
_____ _____ _____
/\ \ /\ \ /\ \
/::\ \ /::\ \ /::\ \
/::::\ \ /::::\ \ /::::\ \
/::::::\ \ /::::::\ \ /::::::\ \
/:::/\:::\ \ /:::/\:::\ \ /:::/\:::\ \
/:::/__\:::\ \ /:::/__\:::\ \ /:::/ \:::\ \
/::::\ \:::\ \ /::::\ \:::\ \ /:::/ \:::\ \
/::::::\ \:::\ \ /::::::\ \:::\ \ /:::/ / \:::\ \
/:::/\:::\ \:::\ \ /:::/\:::\ \:::\____\ /:::/ / \:::\ ___\
/:::/ \:::\ \:::\____\/:::/ \:::\ \:::| |/:::/____/ ___\:::| |
\::/ \:::\ /:::/ /\::/ \:::\ /:::|____|\:::\ \ /\ /:::|____|
\/____/ \:::\/:::/ / \/_____/\:::\/:::/ / \:::\ /::\ \::/ /
\::::::/ / \::::::/ / \:::\ \:::\ \/____/
\::::/ / \::::/ / \:::\ \:::\____\
/:::/ / \::/____/ \:::\ /:::/ /
/:::/ / ~~ \:::\/:::/ /
/:::/ / \::::::/ /
/:::/ / \::::/ /
\::/ / \::/____/
\/____/
agent-playground is a simple CLI for running agent in a temporary playground.
Motivation
Agent harnesses are very useful, but they are designed to be launched from a specific working directory.
Sometimes we only want to use them for a quick operation, such as calling a remote service through MCP, or for a one-off task such as searching the web and writing a short report. In those cases, manually creating a fresh working directory first is unnecessary friction.
apg (abbrv. for "agent playground") CLI solves this by letting you define a set of template working directories, called playgrounds, and spin up temporary copies from them to launch an agent. When the work is done, the temporary directory is cleaned up automatically (unless you choose to keep it).
Install
With Cargo
With installer script
|
The installer supports:
APG_INSTALL_DIR=/custom/binto choose the install directoryAPG_VERSION=0.1.0to pin a specific releaseAPG_REPO=<owner>/<repo>if you run the unpatched template directly
Usage
Initialize a playground:
Initialize a playground and include specific agent config templates:
List all playgrounds:
Run a playground with the default agent:
Run a playground with a specific agent:
When the agent exits, apg asks whether to keep the temporary playground copy. Enter y to save it under the configured archive directory, or press Enter to discard it.
Configuration layout
The CLI stores configuration under ~/.config/agent-playground.
config.toml defines the known agents and default selection:
= "claude"
= "~/Download/saved-playgrounds"
[]
= "claude"
= "opencode"
# or you can specify a custom command:
# opencode = "docker run --rm -it opencode/agent:latest"
Each playground gets its own apg.toml:
= "TODO: describe demo"
If you pass --agent <id> to apg init, apg also copies templates/.<id>/ into the new playground. Repeat --agent to initialize multiple agent config directories.