Multi-language runtime

agentpad

Execute bash, Python, JavaScript, and SQL against a real project directory — with overlay mode, read-only guards, file-change tracking, and OpenAI tool integration. Built for AI agents and CI.

npm install agentpad
4
Languages
TS
TypeScript native
MIT
Licensed
import { Runtime } from "agentpad";

const rt = new Runtime("./my-project");

// Run across four languages
await rt.run("bash", "ls -la src/");
await rt.run("python", "import sys; print(sys.version)");
await rt.run("javascript", "console.log(process.version)");
await rt.run("sql", "SELECT count(*) FROM events;");

// Track file changes
const r = await rt.run("bash", "echo patch > fix.txt");
console.log(r.files); // [{ path: "fix.txt", ... }]

// OpenAI function-calling
const tool = rt.asOpenAITool();
rt.close();

Languages

Four engines, one API

bash

Shell scripts and system commands

python

Python 3 with full stdlib access

javascript

Node.js with ESM and CJS support

sql

SQLite via the sqlite3 CLI

Features

Everything agents need

Workspace modes

  • Normal — run against the live directory
  • Read-only — library-level write guard
  • Overlay — temp copy, apply() to commit

File tracking

  • includeGlobs / excludeGlobs via minimatch
  • RunResult.files shows changed paths
  • Serialize and restore overlay state

Agent tooling

  • asOpenAITool() for function-calling
  • executeToolCall({ language, code })
  • Session run log with onRun callback

Limits & logging

  • Per-run timeoutMs + maxOutputBytes
  • getRunLog() / exportRunLogMarkdown()
  • Structured JSON export for tracing

Ready to build?

Read the full documentation to get started with agentpad.

Read the docs