@fystash_ai/ai-tools
v0.1.0
Published
Vercel AI SDK tools for the Fystash multi-agent sandbox (create, spawn, drive, exec, destroy).
Maintainers
Readme
@fystash_ai/ai-tools
Vercel AI SDK tools for the Fystash multi-agent sandbox — create room, spawn agents, write Drive, exec, destroy.
Install
npm i @fystash_ai/ai-tools @fystash_ai/sdk ai zodexport FYSTASH_API=https://api.fystash.ai
export FYSTASH_API_KEY=key-…Use
import { generateText, stepCountIs } from "ai";
import { createFystashTools } from "@fystash_ai/ai-tools";
const tools = createFystashTools();
const { text } = await generateText({
model: yourModel,
tools,
stopWhen: stepCountIs(10),
prompt:
"Create a Fystash room, spawn scout, write hello.txt with 'hi', cat it, destroy the room.",
});Tools exposed: createRoom, spawnAgent, driveWrite, execInSandbox,
destroyRoom, runFleet (one-shot).
Cookbook: docs/cookbook/13-vercel-ai-sdk.md.
Template sketch
// app/api/agent/route.ts
import { streamText, stepCountIs } from "ai";
import { createFystashTools } from "@fystash_ai/ai-tools";
export async function POST(req: Request) {
const { prompt } = await req.json();
const result = streamText({
model: yourModel,
tools: createFystashTools(),
stopWhen: stepCountIs(12),
prompt,
});
return result.toUIMessageStreamResponse();
}