funky-sdk
v0.2.18
Published
SDK for spawning sub-agents with full isolation
Readme
funky-sdk
TypeScript SDK for spawning isolated Funky sub-agents.
Install
npm install funky-sdkGetting started
import { Funky } from "funky-sdk";
const client = new Funky({
apiKey: process.env.FUNKY_API_KEY, // optional; falls back to env
});
const agent = await client.createSubagent({ model: "gemini-3-flash-preview" });
try {
const messages = await agent.sendMessage("What is 2 * 2?");
console.log(messages.at(-1)?.text);
} finally {
await agent.terminate();
}createSubagent also accepts an optional systemPrompt:
const agent = await client.createSubagent({
model: "gemini-3-flash-preview",
systemPrompt: "You are a terse coding assistant.",
});Streaming
for await (const [eventType, data] of agent.streamMessage("Hello!")) {
console.log(eventType, data);
}Requirements
Node.js 18+ (uses the built-in fetch and ReadableStream APIs).
Publishing to npm
Bump the
versioninpackage.json.Build and publish:
npm run build npm publish
