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

@svton/agent-sdk

v0.3.1

Published

High-level SDK for creating AI Agents with a single createAgent() call

Readme

@svton/agent-sdk

High-level SDK for creating AI Agents with a single createAgent() call. Supports OpenAI, Anthropic, and compatible providers. Includes optional React integration via /react sub-path.

Install

npm install @svton/agent-sdk

Quick Start

Programmatic (10 lines)

import { createAgent } from '@svton/agent-sdk';

const agent = await createAgent({
  provider: { type: 'openai', apiKey: 'sk-xxx', baseUrl: 'https://api.openai.com' },
  model: 'gpt-4o',
  systemPrompt: 'You are a helpful assistant.',
});

for await (const event of agent.chat('Hello!')) {
  if (event.type === 'text_delta') process.stdout.write(event.text);
}

await agent.dispose();

React

npm install @svton/agent-sdk react react-dom
import { AgentProvider, useChat } from '@svton/agent-sdk/react';

function App() {
  return (
    <AgentProvider config={{
      provider: { type: 'openai', apiKey: 'sk-xxx', baseUrl: 'https://api.openai.com' },
      model: 'gpt-4o',
    }}>
      <ChatView />
    </AgentProvider>
  );
}

function ChatView() {
  const { messages, isStreaming, send } = useChat();
  return (
    <div>
      {messages.map(msg => <div key={msg.id}>{msg.content}</div>)}
      <button onClick={() => send('Hello')} disabled={isStreaming}>Send</button>
    </div>
  );
}

Custom Tools

const agent = await createAgent({
  provider: { /* ... */ },
  model: 'gpt-4o',
  tools: [{
    name: 'get_weather',
    description: 'Get weather for a city',
    parameters: {
      type: 'object',
      properties: { city: { type: 'string' } },
      required: ['city'],
    },
    execute: async (args) => JSON.stringify(await fetchWeather(args.city)),
  }],
});

MCP Servers

const agent = await createAgent({
  // ...
  mcpServers: [{
    url: 'https://mcp.example.com/sse',
    type: 'sse',
    name: 'external-tools',
  }],
});

Agent API

| Method | Description | |--------|-------------| | chat(message) | Start conversation, returns AsyncGenerator<AgentEvent> | | abort() | Cancel current conversation | | approveToolCall(id) | Approve a pending tool call | | rejectToolCall(id) | Reject a pending tool call | | getMessages() | Get conversation history | | setMessages(msgs) | Restore conversation history | | addTool(tool) | Add tool at runtime | | removeTool(name) | Remove tool at runtime | | addSkill(skill) | Add skill at runtime | | removeSkill(name) | Remove skill at runtime | | dispose() | Release resources |

React Hooks (@svton/agent-sdk/react)

| Hook | Returns | |------|---------| | useChat() | { messages, status, isStreaming, send, abort, clear } | | useAgent() | { agent } | | useToolApproval() | { pendingCalls, approve, reject } |

Configuration

await createAgent({
  provider: { type: 'openai' | 'anthropic', apiKey, baseUrl? },
  model: 'gpt-4o',
  systemPrompt?: string,
  tools?: UserToolDefinition[],
  mcpServers?: SdkMcpServerConfig[],
  memory?: boolean,          // enable auto-memory (default: false)
  planning?: boolean,        // enable plan tools (default: false)
  permission?: 'read_only' | 'plan' | 'default' | 'accept_edits' | 'auto',
  hooks?: Record<HookEvent, HookHandler>,
  skills?: SkillDefinition[],
  maxIterations?: number,    // default: 50
  workingDir?: string,
});

Compatible Providers

  • OpenAI — GPT-4o, GPT-4o-mini, etc.
  • Anthropic — Claude Sonnet 4, Claude Haiku 4
  • DeepSeek — DeepSeek Chat, DeepSeek Reasoner
  • Ollama — Local models
  • vLLM — Self-hosted models
  • LiteLLM — Unified proxy

License

MIT