npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tinyweb_dev/agent-framework-tool

v0.4.0

Published

Built-in tool factories + FileStorage adapters. Every factory returns a tool ready to plug into `defineAgent({ tools: { ... } })`.

Readme

@tinyweb-agent-framework/tool

Built-in tool factories + FileStorage adapters. Every factory returns a tool ready to plug into defineAgent({ tools: { ... } }).

Quick start: builtinTools(config)

One-liner to wire the whole catalog. Returns Record<string, Tool> you can pass straight into defineAgent({ tools }).

import { builtinTools } from "@tinyweb-agent-framework/tool"

const tools = builtinTools({
  // Zero-config defaults are ON: time_now, weather, crypto_price,
  // vn_gold_price, vn_lottery. Pass `false` to opt out of any of them.
  // Opt-in (need an API key):
  perplexity: { apiKey: process.env.PERPLEXITY_API_KEY! },
  webSearch: { provider: "tavily", apiKey: process.env.TAVILY_API_KEY! },
})

See the full catalog + tier breakdown in the docs site guide.

Tools

Info / utility (zero-config)

  • timeNow(config) — current time in any IANA timezone (default Asia/Ho_Chi_Minh).
  • weather(config) — current weather snapshot via wttr.in (no API key).
  • cryptoPrice(config) — Binance spot ticker, multi-symbol in one call.

Vietnam locale (zero-config, scrape-based)

  • vnGoldPrice(config) — giá vàng nhẫn 24K (BTMC + Bảo Tín Mạnh Hải).
  • vnLottery(config) — kết quả XSMB / XSMT / XSMN từ xoso.com.vn.

Both return warnings: [...] when the upstream layout drifts instead of throwing.

Search

  • perplexitySearch(config) — Sonar API (OpenAI-compatible) answers with citations.
  • webSearch(config) — Tavily / Brave / Exa / Serper unified.

webSearch(config)

import { webSearch } from "@tinyweb-agent-framework/tool"

const search = webSearch({ provider: "tavily", apiKey: process.env.TAVILY_API_KEY! })
// provider: "tavily" | "brave" | "exa" | "serper"

webFetch(config?)

Fetches a URL and returns plain-text content (regex HTML strip, no jsdom).

import { webFetch } from "@tinyweb-agent-framework/tool"
const fetcher = webFetch({ timeoutMs: 15_000, maxLength: 100_000 })

imageGenerate(config)

import { imageGenerate } from "@tinyweb-agent-framework/tool"
const gen = imageGenerate({
  provider: "openai",            // "openai" | "replicate"
  apiKey: process.env.OPENAI_API_KEY!,
  model: "gpt-image-1",          // optional
  storage,                       // optional FileStorage to persist output
})

imageDescribe(config) / imageEdit(config)

import { imageDescribe, imageEdit } from "@tinyweb-agent-framework/tool"
const describe = imageDescribe({ apiKey: process.env.OPENAI_API_KEY! })
const edit = imageEdit({ apiKey: process.env.OPENAI_API_KEY!, storage })

fileRead(config) / fileWrite(config)

import { fileRead, fileWrite, makeLocalFS } from "@tinyweb-agent-framework/tool"

const storage = makeLocalFS("./.agent-data")
const read = fileRead({ storage })
const write = fileWrite({ storage })

FileStorage adapters

  • makeMemoryStore() — in-memory Map<string, Uint8Array>.
  • makeLocalFS(basePath) — node:fs with path-traversal guard.
  • makeS3Store(client, options) — duck-typed against @aws-sdk/client-s3 (peer dep).
import { S3Client, GetObjectCommand, PutObjectCommand, ListObjectsV2Command } from "@aws-sdk/client-s3"
import { makeS3Store } from "@tinyweb-agent-framework/tool"

const storage = makeS3Store(
  new S3Client({ region: "us-east-1" }),
  {
    bucket: "my-bucket",
    prefix: "agent/",
    commands: { GetObjectCommand, PutObjectCommand, ListObjectsV2Command },
    publicUrl: (key) => `https://cdn.example.com/${key}`,
  },
)

License

MIT