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

@inis-run/ai-sdk

v0.2.0

Published

Vercel AI SDK tools for inis.run sandboxes

Downloads

307

Readme

@inis-run/ai-sdk

Pre-built Vercel AI SDK tools for inis.run sandboxes.

npm License: MIT Node

Beta. Built and tested against ai@^5.0.0. Newer AI SDK majors exist and are not yet validated.

Install

npm install @inis-run/ai-sdk @inis-run/sdk ai zod

Quickstart: inisTools()

Your app creates (or attaches to) the session and owns INIS_API_KEY; inisTools() just hands the model a bounded execution/file surface for it.

import { anthropic } from "@ai-sdk/anthropic";
import { generateText, stepCountIs } from "ai";
import { Client } from "@inis-run/sdk";
import { inisTools } from "@inis-run/ai-sdk";

const client = new Client({ token: process.env.INIS_API_KEY });
const session = await client.sessions.create({ egress: { mode: "deny" } });

try {
  const result = await generateText({
    model: anthropic("claude-sonnet-5"),
    system: "Run Python in the sandbox instead of guessing.",
    messages,
    tools: inisTools({ sessionId: session.sessionId }),
    stopWhen: stepCountIs(5),
  });
  console.log(result.text);
} finally {
  await session.destroy(); // this app owns the session; inisTools() never will
}

sessionId is required and inisTools() never creates, destroys, or discovers a session on its own — one agent conversation maps to one session. To attach to a session another part of your app already owns instead of creating one, pass its ID the same way; nothing here ever destroys it:

const tools = inisTools({ sessionId: existingSessionId });

What it provides

| Tool | Description | |------|-------------| | execute_python | Run Python in the sandbox. Throws on non-zero exit. | | execute_shell | Run an arbitrary shell command. Throws on non-zero exit. | | read_file / write_file | File I/O under /workspace | | list_files | List a directory (defaults to /workspace) |

That's the whole bundle by design — credentials and session lifecycle administration stay host-controlled unless you opt in below.

Owned sessions: createOwnedInisTools()

Let the package create the session for you instead:

import { createOwnedInisTools } from "@inis-run/ai-sdk";

const { tools, sessionId, cleanup } = await createOwnedInisTools({ egress: "deny" });
try {
  const result = await generateText({ model, messages, tools, stopWhen: stepCountIs(5) });
  console.log(result.text);
} finally {
  await cleanup(); // destroys the session this call created
}

One call = one owned session for one conversation — construct a new one per conversation, never share tools/sessionId across concurrent ones.

Pass connections to bind the session to external API origins with session-scoped credential leases (see ConnectionCreate in @inis-run/sdk):

const { tools, cleanup } = await createOwnedInisTools({
  egress: "deny",
  connections: [
    {
      name: "stripe",
      origin: "https://api.stripe.com",
      authentication: { type: "bearer", secret: process.env.STRIPE_KEY! },
      allow: { methods: ["GET"], paths: ["/v1/customers"] },
    },
  ],
});

Opt-in: session administration and one-shot sandboxes

Import from @inis-run/ai-sdk/lifecycle (a separate entry point) only if you want the model itself to control these:

import { inisLifecycleTools } from "@inis-run/ai-sdk/lifecycle";

const tools = {
  ...inisTools({ sessionId: session.sessionId }),
  ...inisLifecycleTools({ sessionId: session.sessionId }), // pause/resume/checkpoint/restore/expose/capture
};

| Export | Tools | Hands the model | |---|---|---| | inisLifecycleTools({ sessionId }) | pause, resume, checkpoint, restore, expose_port, capture_artifacts | Session administration | | inisEphemeralTools() | execute_once | Unbounded throwaway one-shot sandboxes, no sessionId needed |

MCP alternative

Already on remote MCP? Connect to https://mcp.inis.run/sse via the AI SDK MCP client instead — no tool definitions in your app code.

Links

Built and run in the EU. Your code and data never leave Europe.

License

MIT — see LICENSE.