GET STARTED
Quickstart
Go from zero to your first run in three steps: install, authenticate, run.
1. Install the SDK
The SDK works in any modern JavaScript or TypeScript runtime (Node 18+, edge, or the browser with a server proxy).
npm install @taskclan/sdk
# or
pnpm add @taskclan/sdk2. Set your API key
Create a key in your dashboard and expose it to your server as an environment variable. Never ship a key to the browser, see Authentication.
export TASKCLAN_API_KEY="sk_live_..."3. Make your first run
A run takes a goal and returns a verified result. The default t1-flow profile picks the model, tools and reasoning depth for you.
import { Taskclan } from "@taskclan/sdk";
const taskclan = new Taskclan({ apiKey: process.env.TASKCLAN_API_KEY });
const result = await taskclan.run({
profile: "t1-flow",
goal: "Draft a friendly reply to this review",
input: { text: "The app is great but sign-in is slow." },
});
console.log(result.output);Stream the response
For chat-like UIs, stream tokens and events as they happen:
const stream = await taskclan.run.stream({
profile: "t1-flow",
goal: "Explain vector databases to a beginner",
});
for await (const event of stream) {
if (event.type === "text") process.stdout.write(event.delta);
}Tip: Start with
t1-flow. Move to t1-core for high-volume, latency-sensitive tasks or t1-max for deep reasoning. See Models & T1 profiles.Where to next
- Agents & tools, let the model call your functions and APIs.
- Errors & rate limits, handle failures gracefully.
