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

@agnt5/sdk

v0.3.2

Published

AGNT5 TypeScript SDK - Durable AI workflows and agents

Downloads

411

Readme

AGNT5 TypeScript SDK

Durable AI workflows and agents for TypeScript.

Features

  • Durable Functions - Automatic retry with configurable policies
  • Checkpointing - Resume from last successful step on failure
  • Multi-Runtime - Works on Node.js, Bun, Deno, and Edge runtimes
  • Type-Safe - Full TypeScript support with type inference
  • 🔄 Phase 1 - Local execution (current)
  • 📋 Phase 2 - Platform integration (coming soon)

Installation

npm install @agnt5/sdk
# or
yarn add @agnt5/sdk
# or
pnpm add @agnt5/sdk

Quick Start

Define a Function

import { fn } from '@agnt5/sdk';

export const greet = fn('greet').run(async (ctx, name: string) => {
  ctx.logger.info(`Greeting ${name}`);
  return `Hello, ${name}!`;
});

With Retry and Backoff

import { fn } from '@agnt5/sdk';

export const processData = fn('process-data')
  .retry({ maxAttempts: 3, initialIntervalMs: 1000 })
  .backoff({ type: 'exponential', multiplier: 2.0 })
  .run(async (ctx, data: DataInput) => {
    // Your processing logic here
    return { processed: true };
  });

With Checkpointing

import { fn } from '@agnt5/sdk';

export const dataPipeline = fn('data-pipeline').run(async (ctx, datasetId: string) => {
  // Step 1: Load data (checkpointed)
  const data = await ctx.step('load', () => loadData(datasetId));

  // Step 2: Transform (checkpointed)
  const transformed = await ctx.step('transform', () => transform(data));

  // Step 3: Validate (checkpointed)
  const validated = await ctx.step('validate', () => validate(transformed));

  return { success: true, records: validated.length };
});

Create a Worker

import { Worker } from '@agnt5/sdk';
import './functions'; // Import your function definitions

const worker = new Worker('my-service');
await worker.run();

Runtime Support

The SDK automatically detects and adapts to your runtime:

| Runtime | Binding | Performance | Status | |---------|---------|-------------|---------| | Node.js | NAPI (native) | ⚡ Fastest | ✅ Supported | | Bun | NAPI (native) | ⚡ Fastest | ✅ Supported | | Deno | NAPI (compat) | ⚡ Fastest | ✅ Supported | | Cloudflare Workers | WASM | 🔥 Fast | 📋 Phase 2 | | Vercel Edge | WASM | 🔥 Fast | 📋 Phase 2 | | Next.js Edge | WASM | 🔥 Fast | 📋 Phase 2 |

No configuration needed - the right binding is automatically selected!

Documentation

Development

Setup

# Install dependencies
npm install

# Build TypeScript
npm run build:ts

# Run tests
npm test

# Watch mode
npm run dev

Project Structure

sdk-typescript/
├── src/               # TypeScript source code
│   ├── function.ts    # Function builder
│   ├── context.ts     # Execution context
│   ├── worker.ts      # Worker implementation
│   ├── types.ts       # TypeScript types
│   └── __tests__/     # Test files
├── native/            # NAPI-RS bindings (Phase 2)
├── wasm/              # WASM bindings (Phase 2)
├── docs/              # Documentation
└── dist/              # Compiled output

Examples

See the examples/ directory for complete working examples:

  • basic-function.ts - Simple function definition
  • retry-backoff.ts - Retry and backoff configuration
  • checkpointing.ts - Multi-step checkpointing
  • worker.ts - Worker setup

Phase 1 vs Phase 2

Phase 1 (Current) - Local Execution

  • ✅ Function builder API
  • ✅ Context with state and checkpointing
  • ✅ Retry policies and backoff strategies
  • ✅ Worker infrastructure
  • ✅ TypeScript types and inference
  • ⚠️ In-memory state (not persistent)
  • ⚠️ In-memory checkpoints (not durable)

Phase 2 (Coming Soon) - Platform Integration

  • 📋 NAPI and WASM bindings to Rust core
  • 📋 Durable state (survives process restarts)
  • 📋 Distributed execution across workers
  • 📋 Platform orchestration APIs
  • 📋 LLM integration
  • 📋 Tool and Agent components
  • 📋 Entity and Workflow components

Contributing

See CONTRIBUTING.md for development guidelines.

License

MIT - See LICENSE for details.

Resources