@fystash_ai/convex-component
v0.1.0
Published
Fystash Convex component — multi-agent rooms (create, spawn, drive, exec, destroy) from Convex actions.
Maintainers
Readme
@fystash_ai/convex-component
Convex component for the Fystash multi-agent sandbox — create a room, spawn agents, write the shared drive, exec, destroy.
Uses shared FystashSession from @fystash_ai/sdk.
Install
npm i @fystash_ai/convex-component @fystash_ai/sdk// convex/convex.config.ts
import { defineApp } from "convex/server";
import fystash from "@fystash_ai/convex-component/convex.config.js";
const app = defineApp();
app.use(fystash);
export default app;Set in the Convex dashboard (or .env.local for convex dev):
FYSTASH_API=https://api.fystash.ai
FYSTASH_API_KEY=key-…Use
// convex/fleet.ts
import { action } from "./_generated/server";
import { components } from "./_generated/api";
import { Fystash } from "@fystash_ai/convex-component";
import { v } from "convex/values";
const fystash = new Fystash(components.fystash);
export const helloFleet = action({
args: { roomId: v.string() },
handler: async (ctx, { roomId }) => {
return await fystash.runFleet(ctx, {
roomId,
agentIds: ["scout", "drafter"],
drivePath: "hello.txt",
driveContent: "many agents, one workspace",
execAgentId: "scout",
execArgv: ["cat", "hello.txt"],
destroyAfter: true,
});
},
});Or call steps individually: createRoom → spawn / spawnMany → driveWrite → exec → destroy.
Develop (this repo)
cd sdk/typescript && npm i && npm run build
cd ../components/convex && npm i && npm run buildCookbook: docs/cookbook/12-convex-component.md.
