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

@hybrd/core

v1.1.1

Published

A flexible framework for building AI agents with plugin-based HTTP server extensions.

Readme

Hybrid Agent Framework

A flexible framework for building AI agents with plugin-based HTTP server extensions.

Features

  • AI Agent Core: Built on AI SDK 5 with streaming and tool support
  • Plugin System: Extensible HTTP server with Hono integration
  • XMTP Integration: Built-in XMTP messaging capabilities
  • Blockchain Events: Ponder integration for blockchain event handling
  • TypeScript First: Full type safety and modern TypeScript patterns

Quick Start

import { Agent, XMTPPlugin, PonderPlugin } from "@hybrd/hybrid"

// Create an agent
const agent = new Agent({
  name: "my-agent",
  model: "gpt-4",
  instructions: "You are a helpful AI assistant."
})

// Start the server with plugins
await agent.listen({
  port: "3000",
  filter: async ({ message }) => {
    console.log("Received message:", message)
    return true // Accept all messages
  },
  plugins: [
    XMTPPlugin(),
    PonderPlugin()
  ]
})

Plugin System

The framework uses a plugin-based architecture that allows you to extend the agent's HTTP server with additional functionality.

Built-in Plugins

  • XMTPPlugin: Provides XMTP messaging capabilities
  • PonderPlugin: Handles blockchain events via Ponder

Creating Custom Plugins

import type { Plugin } from "@hybrd/hybrid"
import { Hono } from "hono"

function MyCustomPlugin(): Plugin {
  return {
    name: "my-custom",
    description: "My custom functionality",
    apply: (app) => {
      app.get("/custom", (c) => c.json({ message: "Hello from custom plugin!" }))
    }
  }
}

// Use the plugin
const agent = new Agent({
  name: "my-agent",
  model: "gpt-4",
  instructions: "You are a helpful AI assistant."
})

// Start server with plugins
await agent.listen({
  port: "3000",
  plugins: [
    XMTPPlugin(),
    PonderPlugin(),
    MyCustomPlugin()
  ]
})

Plugin Registry

You can also register plugins dynamically:

// Register a plugin after agent creation
agent.use(MyCustomPlugin())

// Check registered plugins
console.log(`Agent has ${agent.plugins.size} plugins`)

// Get a specific plugin
const plugin = agent.plugins.get("my-custom")

// Check if a plugin is registered
if (agent.plugins.has("xmtp")) {
  console.log("XMTP plugin is registered")
}

Plugin Context

Plugins receive a context object with the agent instance:

function MyPlugin(): Plugin {
  return {
    name: "my-plugin",
    description: "My plugin",
    apply: (app, context) => {
      if (context) {
        console.log(`Plugin applied to agent: ${context.agent.name}`)
      }
      
      app.get("/my-endpoint", (c) => c.json({ message: "Hello!" }))
    }
  }
}

Architecture

The framework consists of several core components:

  • Agent: Main AI agent with streaming and tool support
  • Plugin System: Extensible HTTP server architecture with Hono
  • Tool System: AI SDK compatible tool framework
  • Server: Hono-based HTTP server with plugin support

Plugin Lifecycle

  1. Registration: Plugins are registered during agent creation or via agent.use()
  2. Application: When agent.listen() is called, all plugins are applied to the Hono app
  3. Execution: Plugins can add routes, middleware, and other functionality to the app

Examples

See the examples/ directory for complete usage examples:

  • plugin-usage.ts: Comprehensive plugin usage examples
  • Basic plugin registration
  • Dynamic plugin registration
  • Custom plugin creation
  • Plugin registry inspection
  • Server startup with plugins

Development

# Install dependencies
pnpm install

# Build the package
pnpm build

# Run tests
pnpm test

# Type check
pnpm typecheck

License

MIT