inis.run
Integrations

Vercel AI SDK

Pre-built tools for streamText and generateText agents.

Vercel's AI SDK does not ship a first-party inis plugin — and it does not need one. The pattern (same as E2B) is a small helper package that exports tool() definitions wired to the inis SDK.

Status: Available as npm install @inis/ai-sdk (requires inis on npm).

Install

npm install @inis/ai-sdk inis ai zod

Usage

import { anthropic } from "@ai-sdk/anthropic";
import { streamText } from "ai";
import { Client } from "inis";
import { inisTools } from "@inis/ai-sdk";

// Create a persistent session first
const client = new Client({ token: process.env.INIS_API_KEY });
const session = await client.sessions.create();
const sessionRef = { id: session.sessionId };

const result = streamText({
  model: anthropic("claude-sonnet-4-20250514"),
  system: "You are a data analyst. Run Python in the sandbox instead of guessing.",
  messages,
  tools: inisTools({ sessionRef }),
  maxSteps: 5,
});

// Pass sessionRef.id back on the next HTTP request
// so the agent reuses the same sandbox across turns

What inisTools() exports

ToolDescription
execute_pythonRun Python in the sandbox
execute_shellRun an arbitrary shell command
read_file / write_fileFile I/O under /workspace
expose_portStart a preview URL for a guest port

Pass { sessionId } or a pre-populated { sessionRef } to attach to the session.

MCP alternative

If your stack already uses remote MCP, connect to mcp.inis.run via the AI SDK MCP client — no tool definitions in your app code. Use @inis/ai-sdk when you want in-process tools in a Next.js or Node service.

On this page