Full Linux environment with shell access, development tools, and runtime environments
Agentbase provides agents with complete Linux computer environments featuring shell access, multiple programming runtimes, package managers, and development tools for complex workflows.
The Computer primitive represents the full Linux operating system environment that agents can access for executing code, running commands, installing packages, and performing system-level operations. Unlike simple code execution, the computer environment provides:
Shell Access: Full bash shell for running any command
Multiple Runtimes: Python, Node.js, and more pre-installed
Package Management: apt, pip, npm for installing dependencies
Development Tools: git, curl, wget, vim, and standard Unix utilities
Internet Access: Download packages, make API calls, clone repositories
Persistent State: Installed packages and files persist across requests
Full Linux OS
Debian GNU/Linux 12 (bookworm) with kernel 6.1.134 x86_64
Pre-installed Runtimes
Python 3.11.2, Node.js 18.20.4, and essential development tools
Package Managers
apt for system packages, pip for Python, npm for Node.js
Internet Enabled
Full outbound internet access for downloads and API calls
Computer environments are created automatically when agents need to perform tasks that require:
Code & Development
Python, Node.js, or other language execution, package installation, testing, and debugging
File Operations
Creating, reading, writing, or processing files, data transformation, and file system management
Web Interaction
Web scraping, browser automation, form submission, and website testing
System Operations
Shell commands, system configuration, process management, and tool installation
Automatic Creation: You don’t need to explicitly request a computer - agents create them automatically when tasks require persistent state or system access.
// Simple command executionconst result = await agentbase.runAgent({ message: "Run 'ls -la' to list all files"});// Command with pipesconst pipeline = await agentbase.runAgent({ message: "List all Python files and count them"});// Multiple commandsconst multi = await agentbase.runAgent({ message: "Create a directory, navigate to it, and create a file"});
// Run Python scriptconst python = await agentbase.runAgent({ message: "Create and run a Python script that analyzes data.csv"});// Run Node.js scriptconst node = await agentbase.runAgent({ message: "Create a Node.js script to fetch data from an API and save it"});// Run bash scriptconst bash = await agentbase.runAgent({ message: "Create a bash script to backup all .txt files"});
// Clone repositoryconst clone = await agentbase.runAgent({ message: "Clone the repository from https://github.com/user/repo.git"});// Work with git (same session)const gitOps = await agentbase.runAgent({ message: "Navigate to the cloned repo, check the branches, and list recent commits", session: clone.session});// Make changesconst changes = await agentbase.runAgent({ message: "Create a new file in the repo and show git status", session: clone.session});
const development = await agentbase.runAgent({ message: `Create a Python web scraper project: 1. Create project structure (src/, tests/, requirements.txt) 2. Install beautifulsoup4 and requests 3. Create scraper.py with basic scraping logic 4. Create tests for the scraper 5. Run the tests to verify everything works`});
const sysadmin = await agentbase.runAgent({ message: `System maintenance tasks: 1. Check disk usage and identify large files 2. Clean up temporary files older than 7 days 3. Check for available system updates 4. Generate a system health report`});
const ml = await agentbase.runAgent({ message: `Build ML model: 1. Install scikit-learn and tensorflow 2. Load and preprocess training data 3. Train a classification model 4. Evaluate model performance 5. Save the trained model 6. Create prediction script`});
The computer environment provides comprehensive built-in capabilities:
Shell & Command Execution
Bash access: Full shell command execution for system operations, package installation, and process management.Use cases: Installing dependencies, running scripts, system configuration, file operations
Copy
const shell = await agentbase.runAgent({ message: "Use bash to find all log files and compress them"});
File System Operations
Complete file access: Read, write, create, and manage files across the entire Linux filesystem.Use cases: Code development, data processing, configuration management, artifact storage
Copy
const files = await agentbase.runAgent({ message: "Create a project with multiple files and organize them"});
Web Browser Automation
Full browser capabilities: Navigate websites, interact with web applications, and extract data from web pages.Use cases: Web scraping, testing web applications, research, form automation
Copy
const browser = await agentbase.runAgent({ message: "Open Chrome, navigate to a website, and extract data"});
Screenshot & Visual Tools
Screen capture: Take screenshots of the desktop, applications, or specific regions for visual debugging.Use cases: UI testing, visual verification, debugging graphical applications
Copy
const screenshot = await agentbase.runAgent({ message: "Take a screenshot of the website homepage"});
Network Operations
Internet access: Make HTTP requests, download files, clone repositories, access APIs.Use cases: API integration, data fetching, package downloads, repository cloning
Copy
const network = await agentbase.runAgent({ message: "Download data from API and save to file"});
Process Management
Process control: Start, stop, monitor processes and background jobs.Use cases: Running servers, background tasks, monitoring applications
Copy
const process = await agentbase.runAgent({ message: "Start a development server in the background"});
Error Handling: Always check command exit codes and handle errors appropriately. Agents do this automatically but you can be explicit in your instructions.
Copy
// Explicit error handling in instructionsconst result = await agentbase.runAgent({ message: `Run the test suite. If tests fail, show the error details and suggest fixes. If they pass, show the coverage report.`});
// Check resources before heavy operationsconst check = await agentbase.runAgent({ message: "Check available disk space and memory before processing large files"});// Clean up after operationsconst cleanup = await agentbase.runAgent({ message: "Remove temporary files and cached data after processing", session: check.session});
// Each session has its own computer environmentconst session1 = await agentbase.runAgent({ message: "Install package and run script"});const session2 = await agentbase.runAgent({ message: "Install different package and run different script"});// Completely isolated computer environments
Remember: Computer environments are created automatically when tasks require them. Simply describe your goal - agents will handle provisioning, tool selection, and environment management.