SkillsReviewed · 101-skills

inference.sh JavaScript SDK Skill

The inference.sh JavaScript SDK skill is an instruction pack for coding assistants and JavaScript developers, but several examples need correction before reuse. It documents @inferencesh/sdk for AI app calls, agents, streaming, file uploads and frontend proxies.

Researched 16 Nov 2026

In short.

The inference.sh JavaScript SDK skill guides coding assistants and developers building AI features in JavaScript or TypeScript, but its examples contain incomplete application logic and specific inconsistencies. Nine Markdown files explain app execution, tool-using agents, uploads, streaming, sessions and backend proxies. Useful implementation details sit alongside calculator handlers that use eval, a conflicting browser-key example and session cleanup examples that do not demonstrate remote worker shutdown. SDK compatibility, current app availability, pricing and applicable licences are unknown. Nothing was executed.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage comprises sdk/javascript-sdk/SKILL.md and all eight supplied references: agent-patterns.md, files.md, react-integration.md, server-proxy.md, sessions.md, streaming.md, tool-builder.md and typescript.md, at revision becc25649700d5457772a00e5143e28ccf9e5afa. Although the stated scope includes licence notices beside and above the folder, no such notices are supplied; applicable rights remain unknown. The npm package implementation, other repository folders, related skills, linked pages and live service are outside the supplied evidence. Installation, compilation, requests, uploads, agent execution, cancellation, session shutdown and billing were not tested.

The overview

Identity

This resource is the javascript-sdk skill folder in 101-skills/superpowers, containing SKILL.md and eight reference documents. It supplies reusable instructions and examples for @inferencesh/sdk; the supplied folder contains documentation rather than the SDK implementation.

The captured source is revision becc25649700d5457772a00e5143e28ccf9e5afa at [https://github.com/101-skills/superpowers/tree/becc25649700d5457772a00e5143e28ccf9e5afa/sdk/javascript-sdk]. Its examples target the inference.sh service.

Assessment

The skill offers a useful starting reference for combining AI generation, chat and tool calls in an existing JavaScript application. Its strongest feature is the connection between backend operations and browser integration: the examples cover both SDK calls and server routes that keep service credentials away from frontend code.

Treat the snippets as implementation sketches. Several depend on application functions such as executeTool, existing workspace agents or illustrative app identifiers. The documents do not establish that the examples compile together or match a particular released SDK version.

Users

The intended users are coding assistants and developers adding inference.sh features to Node.js, React, Next.js or other web applications. Beginners receive short examples for installation, authentication and a first app request, but still need familiarity with asynchronous JavaScript, environment variables and backend routes.

Experienced developers get examples for agent delegation, webhook tools, per-user credentials, streaming interfaces and reusable execution sessions. The resource is most relevant when inference.sh is already an acceptable service dependency.

Capabilities

The documented SDK interface supports waiting for an app result, returning a task ID without waiting, and streaming task status, logs, progress and partial outputs. File examples cover local paths, buffers, browser File and Blob objects, data URIs, remote URLs and downloading generated results.

Agent guidance covers workspace templates and programmatically configured agents, conversation messages, attachments, reusable context called skills, and tools for application code, inference.sh apps, other agents and HTTP endpoints. Internal-tool configuration includes planning, memory, web search, code execution and image generation.

React references define application-level hooks for generation, chat, streaming and uploads. These are supplied hook implementations, not evidence that those hooks are SDK exports.

Using it

Requirements

The main file states Node.js 18.0.0 or later, or a modern browser with fetch, and installation of @inferencesh/sdk. Requests require inference.sh credentials, supplied directly on the server or through a backend proxy for browser applications. App inputs must match the chosen app's schema.

Template-agent examples require corresponding agents in a workspace. Proxy examples target Next.js, Express, Hono, Remix and SvelteKit; authentication, database and Redis examples introduce additional application dependencies. Exact supported framework versions, service quotas and app-specific access requirements are not supplied.

Mechanism

The client submits an app reference and input object through client.run. Requests can wait for completion, return an identifier for later retrieval, or expose an asynchronous stream of updates. Browser examples send requests to the application's backend, which supplies the API key before forwarding them to inference.sh.

Agents combine a core model app with instructions and tool definitions. Client-tool examples receive calls through onToolCall, execute application logic and return results through submitToolResult. Declaring a tool's name and parameters does not implement that logic.

Execution sessions reuse a worker through a session ID, with documented idle timeouts from 1 to 3600 seconds. These worker sessions are distinct from the agent conversation examples; durable conversation restoration is not established.

Setup

The documented installation command is npm install @inferencesh/sdk, with Yarn and pnpm alternatives. Server examples create a client using inference({ apiKey: process.env.INFERENCE_API_KEY }). The main file directs users to create a key through the service's Settings and API Keys interface.

For a browser application, configure a backend proxy and create the frontend client with proxyUrl: '/api/inference/proxy'. A Next.js App Router example imports createRouteHandler from @inferencesh/sdk/proxy/nextjs and exports its POST handler. Authentication and rate limiting require additional application code; the basic route example does not include them.

Example

A documented image-generation example calls client.run with app: 'infsh/flux-schnell' and input: { prompt: 'A sunset over mountains' }, then reads result.output. The React reference extends this pattern with loading and error state and an image element displaying an assumed image field.

This illustrates the intended request and display flow. It does not establish that the named app is currently available, that its output still has that shape, or that a request succeeds. App schemas and returned data need confirmation before building the interface around them.

Assessment & evidence

Limitations

The tool-builder calculator examples pass an agent-provided expression to eval. That executes JavaScript rather than restricting input to arithmetic. The server-proxy reference also includes a local-development example that passes NEXT_PUBLIC_INFERENCE_API_KEY directly to the client, conflicting with its server-only credential guidance when used in browser code.

The main TypeScript example imports TaskStatusCompleted and TaskStatusFailed using import type and then uses them as runtime values. That snippet needs correction. The separate TypeScript reference demonstrates string comparisons for task status, but the actual package exports were not assessed.

Session reset and end examples remove locally stored session IDs without demonstrating a remote worker shutdown request. Stream cancellation examples abort the client stream without establishing whether remote execution or billing stops. The conversation-memory example rebuilds context by replaying user messages; equivalent restoration of the original conversation is not demonstrated.

Reasoning

The skill's practical value comes from showing how app execution, agents, files and frontend routes connect through one service interface. That breadth can help developers plan an integration, while the missing application functions and inconsistent snippets increase the work required before adoption.

Its TypeScript examples also show the boundary between compile-time hints and runtime guarantees: casting result.output to a custom type does not validate returned data. The supplied Zod example demonstrates explicit runtime validation, which is useful when an interface depends on an app-specific output schema. No comparative reliability or performance evidence is provided.

Alternatives

The main file names related Python SDK and inference.sh CLI skills, which may suit a different programming language or command-line workflow. Their contents are not supplied, so feature equivalence and relative quality are unknown.

For developers who prefer API documentation to assistant instructions, the file links to the JavaScript SDK reference [https://inference.sh/docs/api/sdk-javascript] and Agent SDK overview [https://inference.sh/docs/api/agent-sdk]. Those pages' contents and current accuracy were not assessed.

Evidence

The supplied evidence consists of the main skill and eight references covering agent patterns, files, React integration, server proxies, sessions, streaming, tool building and TypeScript. All belong to the same captured Git revision.

These files establish the documented interfaces and visible example issues. They do not establish the SDK implementation's behaviour, successful installation or compilation, live API compatibility, output quality, security isolation or performance. Nothing was executed, and linked documentation was not inspected.

Access & freshness

Costs

The supplied documents provide no SDK price, service rates, free allowance, subscription details or billing units. Total operating cost is unknown.

The sessions reference explicitly says long-running sessions incur ongoing charges. It also claims resource reuse can improve cost efficiency, but supplies no measurements or billing comparison. Backend hosting and optional services such as Redis introduce further dependencies whose costs are not given.

Rights

No applicable licence text or notices beside or above the folder are included in the supplied evidence. Permission to redistribute the skill documents, the SDK's licence and commercial-use conditions are therefore unknown. Generated-output rights and service data terms are also unspecified.

The upload reference explicitly describes public: true as making a file publicly accessible. Default file visibility, retention and deletion guarantees are not established, so the public-upload examples should not be assumed appropriate for confidential material.

Freshness

The source snapshot was captured on 16 November 2026 at 17:49:03 UTC. That timestamp identifies the snapshot, not when the documents were authored or last substantively updated.

The installation examples do not pin an SDK version, and many app and agent references use @latest. The captured documents therefore do not define a reproducible package-and-app combination. Current model availability, API compatibility and subsequent source changes are unknown.

Actions

Before adoption, confirm the current SDK exports, chosen app schema and service access, then pin appropriate package and app versions. Start with a server-side request and validate the returned output before adding browser streaming or agent tools.

Replace the eval calculator handlers, correct the type-only imports and keep credentials on the server. Implement the application's tool execution, approval decisions, authentication and request limits rather than relying on placeholder functions.

Confirm session shutdown and cancellation behaviour, ongoing session charges, file visibility and applicable licences before using the integration with real users or confidential files.

Evidence for this report

sdk/javascript-sdk/SKILL.mdselected · checked 2026-11-16
sdk/javascript-sdk/references/files.mdselected · checked 2026-11-16
sdk/javascript-sdk/references/server-proxy.mdselected · checked 2026-11-16
sdk/javascript-sdk/references/sessions.mdselected · checked 2026-11-16
sdk/javascript-sdk/references/streaming.mdselected · checked 2026-11-16
sdk/javascript-sdk/references/tool-builder.mdselected · checked 2026-11-16
sdk/javascript-sdk/references/typescript.mdselected · checked 2026-11-16