Why Use an Isolated Environment?
Sandboxed Execution
Agents run in a container with their own Node.js, Python, and tools - no conflicts with your host system.
Use Local Credentials
Mount your existing OAuth tokens and API keys - no need to reconfigure authentication.
Reproducible
Same container runs identically across machines. Share your setup with teammates.
Session Persistence
Keep your session history and logs across container restarts.
Quick Start
Start a persistent container that runs in the background:agentuse serve with your local credentials and workspace mounted.
Run Agents
- Via API
- Via exec
Manage Container
What’s Included
| Component | Version | Purpose |
|---|---|---|
| AgentUse | Latest | Bun-compiled binary |
| Node.js | 20.x | Run JavaScript scripts |
| Python | 3.12 | Run Python scripts |
| git | Latest | Version control operations |
| curl | Latest | HTTP requests |
| jq | Latest | JSON processing |
| bash | Latest | Shell scripts |
Using Your Local Credentials
AgentUse stores credentials in~/.local/share/agentuse/. Mount this directory to use your existing authentication:
- OAuth tokens - From
agentuse auth login - API keys - Stored via auth commands
- Session logs - Execution history
Shell Alias
Add to your~/.bashrc or ~/.zshrc:
Make sure the container is running first with
docker start agentuse-dev.Docker Compose
For easier management, use Docker Compose:Using Environment Variables Instead
If you prefer not to mount credentials:Session logs won’t persist unless you mount the data directory.
Adding Custom Tools
If your agents need additional packages, create a custom image:Comparison: Isolated vs Self-Hosting
| Feature | Isolated Environment | Self-Hosting |
|---|---|---|
| Purpose | Local development | Production deployment |
| Credentials | Mount from host | Environment variables |
| Sessions | Persist to host | Optional persistence |
| Workspace | Mount local directory | Bake into image or mount |
| Typical use | Single developer | Team/CI/CD |
Self-Hosting Guide
Need to deploy for production? See the self-hosting guide.
