Package Exports
- @dynamicfeed/tools
- @dynamicfeed/tools/langchain
- @dynamicfeed/tools/schema
- @dynamicfeed/tools/vercel
Readme
@dynamicfeed/tools (TypeScript)
Live, verifiable data tools for AI agents — the Dynamic Feed client plus ready-made adapters for the Vercel AI SDK and LangChain.js, and provider-agnostic schemas for the raw OpenAI / Anthropic SDKs. Give any TypeScript agent 90 signed, current data tools in one import.
Every datapoint comes back with its source, licence, timestamp and an Ed25519 signature you can verify offline. Keyless — no signup needed for the data surface.
npm i @dynamicfeed/tools # core: zero runtime deps (global fetch, Node 18+/Deno/Bun/edge)
npm i @noble/ed25519 # optional: only if you call verify()Client
import { DynamicFeed } from "@dynamicfeed/tools";
const df = new DynamicFeed(); // keyless
const r = await df.call("current_weather", { city: "Tokyo" });
console.log(r.data?.temperature_c); // 26.7
const tools = await df.listTools(); // 90 tool namesVercel AI SDK
import { z } from "zod";
import { generateText } from "ai";
import { makeDfTools } from "@dynamicfeed/tools/vercel";
const tools = makeDfTools([
{ name: "current_weather", description: "Signed live weather for a city.",
schema: z.object({ city: z.string().describe("City, e.g. Tokyo") }) },
{ name: "check_vulnerability", description: "Is a package/version vulnerable? (OSV).",
schema: z.object({ package: z.string(), ecosystem: z.string().optional() }) },
]);
const out = await generateText({ model, tools, prompt: "Is lodash@4.17.10 vulnerable, and what's the weather in Tokyo?" });LangChain.js
import { z } from "zod";
import { makeLangChainTools } from "@dynamicfeed/tools/langchain";
const tools = makeLangChainTools([
{ name: "reality_check", description: "Fact-check a claim against live data.",
schema: z.object({ claim: z.string() }) },
]);
// const agent = createReactAgent({ llm, tools });Raw OpenAI / Anthropic
import { DynamicFeed } from "@dynamicfeed/tools";
import { dfTool, toAnthropic, dispatchAnthropicToolUse } from "@dynamicfeed/tools/schema";
const spec = dfTool("current_weather", "Signed live weather for a city.",
{ city: { type: "string", description: "City, e.g. Tokyo" } });
const tools = [toAnthropic(spec)]; // pass to the Anthropic Messages API
// on a tool_use block:
const df = new DynamicFeed();
const result = await dispatchAnthropicToolUse(df, block, [spec]);Verify a signature (offline)
import { verify } from "@dynamicfeed/tools"; // needs @noble/ed25519
const raw = await fetch("https://dynamicfeed.ai/v1/onboard").then((r) => r.text());
const { ok, keyId } = await verify(raw); // true — verified against the published JWKSverify() takes the raw response text (numbers must be byte-exact); it reproduces the server's
json-sorted-compact canonicalization and checks the detached Ed25519 signature against
/.well-known/keys. Ported from the production verifier, proven identical to the Python reference.
Paying for premium (x402, USDC on Base)
The keyless tier is fair-use. For pay-per-call (no signup, no human) use the x402 endpoints with any
x402 client — POST /v1/pro/tool/{tool}, /v1/pro/batch, /v1/pro/asof. See
https://dynamicfeed.ai/x402 and the live menu at GET /v1/pro/catalog.
Build
npm install && npm run build # tsc -> dist/MIT · dynamicfeed.ai · agent bootstrap: GET /v1/onboard