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

@superdapp/agents

v1.0.2

Published

SuperDapp AI Agents SDK and CLI for Node.js/TypeScript

Readme

SuperDapp Agents SDK for Node.js/TypeScript

npm version License: MIT TypeScript

A professional-grade Node.js/TypeScript SDK and CLI for building AI agents on the SuperDapp platform. This SDK provides a unified interface for creating intelligent bots that can interact with users, handle commands, and integrate with multiple large language models.


🚀 Webhook-Based Agent Architecture

SuperDapp agents use a webhook-based architecture for maximum portability and simplicity.

  • Centralized command/message routing in the SDK runtime
  • Lightweight lifecycle: you instantiate an agent, register handlers, and pass incoming webhook bodies to it
  • Pluggable command and message handlers
  • Interactive UI support (buttons, multiselect, reply markup)
  • Event dispatch built-in (CommandRegistry + WebhookAgent handle command routing and generic messages)
  • Signature validation is application-level: validate incoming requests (e.g., in your Express/Worker handler) before calling agent.processRequest
  • Works with any HTTP hosting (Node.js, serverless, etc.)

This is the default architecture for all SuperDapp agents.

🆕 Latest Updates

v1.0.0 - Production Ready Release

  • Complete Webhook Support - Full webhook-based agent architecture
  • Enhanced CLI - New create command and improved project management
  • Interactive UI - Advanced button layouts and multiselect support
  • Multi-Platform Deployment - Cloudflare Workers, AWS Lambda and Docker
  • Comprehensive Documentation - Complete guides and API reference
  • TypeScript Support - Full type safety and IntelliSense
  • Testing Framework - Jest setup with utilities and mocks

🚦 CLI Usage

Project Initialization

You can now use a positional argument for the project directory:

superdapp create my-awesome-agent

Example

superdapp create my-agent
cd my-agent
npm install
superdapp configure
superdapp run

🧑‍💻 CLI Commands

  • superdapp create [directory] – Create a new agent project (supports positional or --name)
  • superdapp configure – Configure API keys and environment variables
  • superdapp run – Run the agent locally for testing (supports multiple environment file formats)

Environment File Support

The superdapp run command automatically detects your runtime and supports multiple environment file formats:

  • Node.js: .env files
  • AWS Lambda: env.json files
  • Cloudflare Workers: .dev.vars files

The CLI auto-detects formats; see docs/CLI Guide for details.


🎯 Features

  • 🤖 Model-Agnostic AI Integration: Seamlessly work with OpenAI, Gemini, Claude, and other LLMs
  • 💬 Real-time Messaging: Built-in support for channels and direct messages
  • 🔧 CLI Tools: AWS Amplify-inspired CLI for project management and deployment
  • 📱 Command Handling: Structured command routing and message processing
  • 🔄 Webhook Architecture: Modern webhook-based agent architecture
  • 🎨 Interactive UI: Support for buttons, multiselect, and reply markup
  • Serverless Ready: Ready for deployment to various platforms
  • 🛠️ TypeScript First: Full type safety with comprehensive TypeScript support
  • 🧪 Testing Ready: Jest setup with comprehensive test utilities

📦 Installation

Using npm

npm install @superdapp/agents

Using yarn

yarn add @superdapp/agents

Using pnpm

pnpm add @superdapp/agents

🛠️ Development

For local development and testing, see DEVELOPMENT.md for instructions on setting up the development environment using npm link.

For advanced development patterns and best practices, see our API Reference.

Global CLI Installation

npm install -g @superdapp/agents

📚 Documentation

For comprehensive documentation, visit our Documentation Hub:

🔧 Advanced Usage

API Client Coverage

The SDK client currently covers the core messaging flows:

  • Channel and connection messages (send, update, delete)
  • Join/leave social groups
  • Fetch bot info and user channels

Additional endpoints (media uploads, reactions, typing status, etc.) can be added incrementally; open an issue if you need one prioritized.

See the API reference and /examples for details.

Scheduled Tasks

Integrate with node-schedule for periodic tasks:

import { schedule } from '@superdapp/agents';

// Schedule daily news updates
schedule.scheduleJob('0 9 * * *', async () => {
  const news = await generateDailyNews();
  await agent.sendChannelMessage('news-channel', news);
});

Error Handling

The client includes Axios interceptors for basic request/response logging and error propagation. Wrap your command handlers in try/catch and surface actionable messages to users as needed.

Type Safety

Full TypeScript support with comprehensive types:

import type {
  MessageData,
  CommandHandler,
  BotConfig,
  ApiResponse,
} from '@superdapp/agents';

const handleCommand: CommandHandler = async ({
  message,
  replyMessage,
  roomId,
}) => {
  // Fully typed message object
  const messageText = (message.body as any)?.m?.body;
  // ... handler logic
};

🛡 Error Handling

The SDK includes comprehensive error handling:

try {
  // Process webhook request
  await agent.processRequest(webhookBody);
} catch (error) {
  if (error.message.includes('API_TOKEN')) {
    console.error('Invalid API token. Run: superdapp configure');
  } else {
    console.error('Request processing failed:', error);
  }
}

🔐 Security Best Practices

  1. Never commit API tokens to version control
  2. Use environment variables for sensitive configuration
  3. Validate all user inputs before processing
  4. Implement rate limiting for command handlers
  5. Use HTTPS for all API communications

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🆘 Support


Built with ❤️ by the SuperDapp Team