
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
inferable
Advanced tools
This is the official Inferable AI SDK for Typescript.
npm install inferable
yarn add inferable
pnpm add inferable
This guide will help you quickly set up and run your first Inferable workflow with structured outputs.
A cluster is a logical grouping of tools, agents and workflows that work together.
mkdir inferable-demo
cd inferable-demo
curl -XPOST https://api.inferable.ai/ephemeral-setup > cluster.json
npm init -y
npm install inferable tsx
Workflows are a way to define a sequence of actions to be executed. They run on your own compute and can be triggered from anywhere via the API.
// simple-workflow.ts
import { Inferable } from "inferable";
import { z } from "zod";
const inferable = new Inferable({
apiSecret: require("./cluster.json").apiKey,
});
const workflow = inferable.workflows.create({
name: "simple",
inputSchema: z.object({
executionId: z.string(),
url: z.string(),
}),
});
workflow.version(1).define(async (ctx, input) => {
const text = await fetch(input.url).then((res) => res.text());
const { menuItems, hours } = ctx.llm.structured({
input: text,
schema: z.object({
menuItems: z.array(
z.object({
name: z.string(),
price: z.number(),
}),
),
hours: z.object({
saturday: z.string(),
sunday: z.string(),
}),
}),
});
return { menuItems, hours };
});
// This will register the workflow with the Inferable control-plane at api.inferable.ai
workflow.listen().then(() => {
console.log("Workflow listening");
});
Workflows can be triggered from anywhere.
# Get your cluster details
CLUSTER_ID=$(cat cluster.json | jq -r .id)
API_SECRET=$(cat cluster.json | jq -r .apiKey)
# Run the workflow
curl -XPOST https://api.inferable.ai/clusters/$CLUSTER_ID/workflows/simple/executions \
-d '{"executionId": "123", "url": "https://a.inferable.ai/menu.txt"}' \
-H "Authorization: Bearer $API_SECRET"
You can also trigger the workflow from your application code:
// From your application code
await inferable.workflows.trigger("simple", {
executionId: "123",
url: "https://a.inferable.ai/menu.txt",
});
For support or questions, please create an issue in the repository.
Contributions to the Inferable NodeJs Client are welcome. Please ensure that your code adheres to the existing style and includes appropriate tests.
FAQs
Javascript SDK for inferable.ai
The npm package inferable receives a total of 199 weekly downloads. As such, inferable popularity was classified as not popular.
We found that inferable demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.