Package Exports
- agentool/core
Readme
agentool
Lightweight, provider-agnostic AI agent toolkit for CI/CD. Built-in bash, edit, grep, git, and HTTP tools with modular add-ons for Docker, test runners, and MCP.
What it is
A single npm package that gives AI agents a complete set of system tools for CI/CD automation. It wraps Vercel AI SDK v6 (ai package) and provides prebuilt tools, a simple agent runner, and modular add-ons via Node.js subpath exports.
The problem: if you want an AI agent that can run bash, edit files, grep code, call APIs, and interact with GitHub in a CI pipeline, you either use Claude Code (locked to Anthropic) or wire up a dozen libraries yourself. agentool gives you all of that out of the box, with any LLM provider — OpenAI, Anthropic, LiteLLM, or any OpenAI-compatible endpoint.
Tech stack
- TypeScript (strict), Node.js 20+
- Build: tsup
- AI SDK: Vercel AI SDK v6 (
ai) as peer dependency - Testing: vitest
- Package manager: pnpm
- License: Apache-2.0
Package structure
Single npm package, multiple entry points via subpath exports. Users install once (npm install agentool) and import only what they need.
import { createAgent, coreTools } from "agentool/core";
import { dockerTools } from "agentool/docker";
import { testRunnerTools } from "agentool/test-runner";Modules
agentool/core (must-have, zero optional deps)
createAgent— agent runner wrapping AI SDK ToolLoopAgent, auto-assembles system prompt from tool descriptionsbash— shell command execution via child_processread_file— read file contents with optional line rangewrite_file— create/overwrite filesedit— str_replace style find-and-replace (oldStr must be unique in file)grep— structured search, uses ripgrep if available, falls back to native grepfind— find files by glob patterngit— diff, log, status, blame, showgh— GitHub CLI wrapper (pr, issue, workflow, api)http— structured HTTP requests via native fetch
agentool/docker (add-on)
- docker build, run, compose, logs
agentool/test-runner (add-on)
- Generic test runner with structured output parsing (jest, vitest, pytest)
agentool/data-parse (add-on)
- jq, yq, csv parsing
agentool/code-intel (add-on)
- ast-grep, directory tree, symbol extraction
agentool/mcp (add-on)
- Generic MCP client bridge — connect to any MCP server and expose its tools
Usage
import { createAgent, coreTools } from "agentool/core";
const agent = createAgent({
model: "openai/gpt-4o",
// Or LiteLLM: baseURL: "http://localhost:4000/v1"
tools: { ...coreTools() },
});
const result = await agent.run("Find why the tests are failing and fix it");Implementation priorities
- Core types (ToolDefinition, ToolResult, ToolPack interfaces)
- Core tools (bash, read_file, write_file, edit, grep, find, git, gh, http)
- createAgent runner
- System prompt auto-assembly
- Add-on modules (docker, test-runner, data-parse, code-intel, mcp)
- Tests for each tool