JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 49
  • Score
    100M100P100Q95295F
  • License Apache-2.0

Lightweight, provider-agnostic AI agent toolkit for CI/CD

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 descriptions
  • bash — shell command execution via child_process
  • read_file — read file contents with optional line range
  • write_file — create/overwrite files
  • edit — str_replace style find-and-replace (oldStr must be unique in file)
  • grep — structured search, uses ripgrep if available, falls back to native grep
  • find — find files by glob pattern
  • git — diff, log, status, blame, show
  • gh — 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

  1. Core types (ToolDefinition, ToolResult, ToolPack interfaces)
  2. Core tools (bash, read_file, write_file, edit, grep, find, git, gh, http)
  3. createAgent runner
  4. System prompt auto-assembly
  5. Add-on modules (docker, test-runner, data-parse, code-intel, mcp)
  6. Tests for each tool