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

@simple-ai-lab/sdk

v0.3.0

Published

Simple AI SDK — define action-first agents and access your organization's data.

Readme

Simple AI SDK

Typed TypeScript client for the Simple AI API. Use it inside Simple AI code actions (preinstalled and authenticated automatically) or in your own applications with an API key.

npm install @simple-ai-lab/sdk

Inside a code action

import { defineAction } from '@simple-ai-lab/sdk';

export default defineAction(async ({ inputs, config, client }) => {
  const { records } = await client.data.query({
    tableName: 'customers',
    filters: [{ column: 'email', values: [inputs.email] }],
  });
  return { found: records.length > 0 };
});

No API key handling needed — the sandbox injects short-lived, organization-scoped credentials automatically.

In your own application

import { SimpleAI } from '@simple-ai-lab/sdk';

// Reads SIMPLE_API_KEY from the environment (dashboard: Settings → API Keys)
const client = new SimpleAI();

const { records, total } = await client.data.query({
  tableName: 'orders',
  text: 'ORD-1042',
});

client.data covers custom data end to end: query, facets, list, get, create, update, delete, deleteAll, batchUpsert, and getBatch. Errors throw SimpleAIError with the HTTP status, machine-readable code, and parsed body.

Define an agent

Agent authoring is action-first: integrations are immutable Actions, and Agent commits pin exact Action versions. New source does not create legacy tools or HTTP graph nodes.

import { action, defineAgent, node, prompt } from '@simple-ai-lab/sdk';
import { z } from 'zod';

const lookup = action.http({
  key: 'lookup-account',
  name: 'Lookup account',
  description: 'Fetch an account',
  input: z.object({
    account_id: z.string().describe('The account identifier from the caller'),
  }),
  output: z.object({ account_name: z.string() }),
  outputMappings: { account_name: '{{ httpResponse.body.name }}' },
  request: {
    method: 'GET',
    url: 'https://example.com/accounts/{{ inputs.account_id }}',
  },
});

export default defineAgent({
  key: 'support',
  name: 'Support',
  branch: 'main',
  nodes: [
    node.prompt({
      key: 'root',
      name: 'Root',
      root: true,
      prompt: prompt.inline('Help the caller.'),
      actions: [
        action.callable({
          key: 'lookup-action',
          action: lookup,
          name: 'lookup_account',
          description: 'Look up an account',
          inputs: {
            account_id: action.fromAgent('The account identifier'),
          },
          // Action output name -> Agent parameter name
          outputParameters: { account_name: 'customer_account_name' },
        }),
      ],
    }),
  ],
});

Install @simple-ai-lab/cli for simple init, pull, typecheck, diff, and publish.

Documentation

Full docs: https://docs.usesimple.ai — see the SDK Quickstart and Code Actions guides.

License

Elastic License 2.0 — free to use; the SDK may not be provided to third parties as a hosted or managed service.