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

@vela-labs/sdk

v1.0.10

Published

TypeScript SDK for building agentic AI applications — sessions, tools, providers, and context management

Downloads

1,561

Readme

@vela-labs/sdk

TypeScript SDK for building agentic AI applications. Handles the agent loop, tool execution, context management, and provider abstraction.

Install

Install the latest published release from npm:

npm install @vela-labs/sdk

Quick start

import { Agent, OpenRouterProvider, createBashTool } from "@vela-labs/sdk";

const agent = new Agent({
  provider: new OpenRouterProvider({ apiKey: process.env.OPENROUTER_API_KEY! }),
  model: "deepseek/deepseek-v4-flash",
  systemPrompt: "You are a helpful assistant.",
  tools: [createBashTool()],
});

for await (const event of agent.stream("List the files in the current directory")) {
  if (event.type === "text_delta") process.stdout.write(event.text);
  if (event.type === "tool_call") console.log(`\n→ ${event.name}(${JSON.stringify(event.input)})`);
}

Built-in tools

import { createBashTool, createReadFilesTool, createWriteFileTool, createEditFileTool } from "@vela-labs/sdk";

Custom tools

import type { ToolDefinition } from "@vela-labs/sdk";

const myTool: ToolDefinition = {
  name: "fetch_url",
  description: "Fetch the contents of a URL.",
  parameters: {
    type: "object",
    properties: {
      url: { type: "string" },
    },
    required: ["url"],
  },
  async execute(input) {
    const res = await fetch(input.url as string);
    return { body: await res.text() };
  },
};

Providers

  • OpenRouter — access any model via OpenRouter (DeepSeek, Claude, GPT-4o, etc.)
  • OpenAI — use GPT and o-series models directly through the OpenAI API
import { OpenRouterProvider } from "@vela-labs/sdk";

const provider = new OpenRouterProvider({
  apiKey: "sk-or-...",
  reasoningEffort: "medium", // off | minimal | low | medium | high | xhigh
});
import { OpenAIProvider } from "@vela-labs/sdk";

const provider = new OpenAIProvider({
  apiKey: process.env.OPENAI_API_KEY!,
  reasoningEffort: "medium",
});

Context summarization

Automatically compacts conversation history when it grows large:

const agent = new Agent({
  // ...
  summarization: { threshold: 128_000 }, // token count that triggers compaction
});