npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@capsulate/ai-tools

v0.1.0

Published

Capsulate tools for AI agent frameworks — drop-in sandbox tools (launch / run code / files / computer-use) for the Vercel AI SDK, LangChain, LlamaIndex, and CrewAI.

Readme

@capsulate/ai-tools

Drop-in sandbox tools for AI agent frameworks. Give your agent the ability to launch an isolated cloud capsule, run code, read/write files, and tear it down — built on @capsulate/sdk. One tool set, adapters for every framework.

npm install @capsulate/ai-tools @capsulate/sdk

Set CAPSULATE_API_KEY (from the dashboard → Settings → API & Keys).

Vercel AI SDK

The returned record plugs straight into tools:

import { generateText } from "ai";
import { openai } from "@ai-sdk/openai";
import { capsulateTools } from "@capsulate/ai-tools";

const tools = capsulateTools({ apiKey: process.env.CAPSULATE_API_KEY });

const { text } = await generateText({
  model: openai("gpt-4o"),
  prompt: "Launch an ubuntu-22.04-headless capsule, run `python3 -c 'print(2**10)'`, tell me the output, then destroy it.",
  tools,
  maxSteps: 8,
});

LangChain (JS)

import { DynamicStructuredTool } from "@langchain/core/tools";
import { capsulateLangChainSpecs } from "@capsulate/ai-tools";

const tools = capsulateLangChainSpecs({ apiKey: process.env.CAPSULATE_API_KEY })
  .map((s) => new DynamicStructuredTool(s));
// pass `tools` to your agent / createReactAgent / AgentExecutor

LlamaIndex.TS (or any TS framework)

Use the generic specs — { name, description, parameters (zod), execute }:

import { capsulateToolSpecs } from "@capsulate/ai-tools";
import { FunctionTool } from "llamaindex";

const tools = capsulateToolSpecs({ apiKey: process.env.CAPSULATE_API_KEY }).map((s) =>
  FunctionTool.from(s.execute, { name: s.name, description: s.description, parameters: s.parameters }),
);

Python (LlamaIndex / CrewAI / LangChain-Python)

There's no Python SDK yet, but the API is one HTTP call. Example CrewAI tool:

import os, requests
API = "https://api.getvm.xyz/api/v1"
H = {"Authorization": f"Bearer {os.environ['CAPSULATE_API_KEY']}"}

def run_in_sandbox(code: str) -> str:
    cap = requests.post(f"{API}/sessions",
        headers=H, json={"templateId": "ubuntu-22.04-headless", "size": "2c4g"}).json()
    sid = cap["sessionId"]
    try:
        out = requests.post(f"{API}/sessions/{sid}/exec",
            headers=H, json={"cmd": ["python3", "-c", code]}).json()
        return out.get("stdout", "")
    finally:
        requests.delete(f"{API}/sessions/{sid}", headers=H)

# CrewAI:   from crewai_tools import tool;  @tool("Run code in a sandbox") def t(code): return run_in_sandbox(code)
# LlamaIndex: from llama_index.core.tools import FunctionTool; FunctionTool.from_defaults(fn=run_in_sandbox)

Tools provided

capsulate_launch_capsule, capsulate_run_code, capsulate_exec, capsulate_write_file, capsulate_read_file, capsulate_destroy_capsule, capsulate_list_capsules.