@taskclan/sdk
v1.8.1
Published
Typed client for Taskclan Intelligence. The T1 developer client — new Taskclan({apiKey}).run({goal}) against the metered T1 API (core/flow/max/auto profiles, streaming, extended thinking, multimodal image input, prompt-cache accounting) — plus the L3 agen
Maintainers
Readme
@taskclan/sdk
The typed client for Taskclan Intelligence.
Quickstart — the T1 client
Run a goal against the metered T1 API. The t1-flow profile picks the model,
tools, and reasoning depth for you (t1-core for fast/high-volume, t1-max for
deep reasoning). Spend debits your key's credit wallet.
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);The API key comes from TASKCLAN_API_KEY when not passed. Create one in the
console at /t1 (Developer API keys). The
default profile can also be set on the client: new Taskclan({ profile: "t1-flow" }).
Stream
const stream = await taskclan.run.stream({ profile: "t1-flow", goal: "Explain vector databases" });
for await (const event of stream) {
if (event.type === "text") process.stdout.write(event.delta);
}run.stream yields { type: "text", delta } per token, then a final
{ type: "done", creditsCharged, balance, model }.
Multimodal — images, video, audio, PDFs
Pass extra modalities on run / run.stream. Every T1 tier accepts images and
PDFs; video and audio route through t1-max (or t1-auto, which floors at Max
when either is present).
await taskclan.run({
profile: "t1-max",
goal: "Summarise the standup video and pull out action items.",
videos: [{ url: "https://example.com/standup.mp4" }],
});
await taskclan.run({
profile: "t1-auto",
goal: "Transcribe and tag the sentiment.",
audios: [{ url: "https://example.com/call.mp3", format: "mp3" }],
});
await taskclan.run({
profile: "t1-flow",
goal: "What's wrong with this diagram?",
images: [{ url: "https://example.com/arch.png" }],
});Every field also accepts inline base64 payloads. Under the hood the SDK
folds all modalities into a single OpenAI-shaped user turn — the engine
translates back to Anthropic content parts on providers that need it.
T1 tiers at a glance
| Profile | Primary | Fallbacks (in order) |
| ----------- | --------------------------------------------- | ------------------------------------------- |
| t1-auto | Router picks per prompt. Video / audio floor at Max. | — |
| t1-core | Haiku 4.5 | GPT-4o mini, Kimi K2 |
| t1-flow | Sonnet 5 | xAI Grok-4-fast, GPT-4.1, Kimi K2 |
| t1-max | Opus 4-8 (text/images/PDFs); Gemini 2.5 Pro (video/audio) | Sonnet 5, xAI Grok-4, Kimi K3, GPT-4.1 |
Grok sits in the failover chain as a provider-diverse frontier partner: different training run, different failure modes, so a bad afternoon at Anthropic never stops the tier.
The L3 agentic layer
The rest of this client is the Taskclan L3 agentic layer. Built on
@taskclan/platform, it adds the agent / skill / memory surface
so any product can:
runAgent— run a named agent's capability (dispatch one of its Hive intents)runSkill— run a named skill's capabilityremember/recall/listMemories/forget— read & write shared memorylistAgents/getAgent/listSkills/listWorkflows— discover the registry
It reuses the platform client's transport, so everything goes through Hive's one
endpoint (POST /api/hive/v1/intent). You also get client.platform for events,
entitlements, identity, and roles.
Install
Published privately to GitHub Packages under the taskclan org. Point the
@taskclan scope at GitHub's registry (one line covers both @taskclan/platform
and @taskclan/sdk) and authenticate with a read:packages token:
# .npmrc (in the consuming repo)
@taskclan:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}npm install @taskclan/sdkUsage
import { createTaskclanClient } from '@taskclan/sdk';
const hive = createTaskclanClient({
baseUrl: 'https://engine.taskclan.com',
product: 'nani',
getToken: () => supabase.auth.getSession().then((s) => s.data.session?.access_token ?? null),
});
// Discover an agent's intents, then run one
const { agents } = await hive.listAgents();
const creator = agents.find((a) => a.id === 'gamenova-creator');
if (creator) {
const result = await hive.runAgent(creator.id, creator.intents[0], { /* input */ });
}
// Shared memory (household-scoped family vault)
await hive.remember({ householdId, type: 'allergy', key: 'peanuts', value: 'severe' });
const { memories } = await hive.listMemories({ householdId, type: 'allergy' });
// Escape hatch + the full platform client
await hive.platform.trackEvent('nani.household_created');Pass { validate: true } to runAgent / runSkill to first check (against the
public registry) that the intent really belongs to that agent/skill.
Publishing
Bump version in package.json, then push a tag:
git tag taskclan-sdk-v1.0.0 && git push origin taskclan-sdk-v1.0.0The Publish @taskclan/sdk GitHub Action builds and publishes to GitHub
Packages using the built-in GITHUB_TOKEN — no secret to configure.
