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

megaagent

v0.1.0

Published

Real-Time High-Frequency Autonomous AI Agent Swarm Protocol on MegaETH (Sub-10ms In-Memory Settlement & Micro-Allowances)

Readme

⚡ MegaAgent: Real-Time AI Swarm Protocol on MegaETH

Sub-10ms In-Memory Streaming Settlements & Scoped Micro-Allowances for Autonomous AI Agents

CI Live Dashboard ORCID License: Apache-2.0 Latency: Sub-10ms MegaETH Compatible


👤 Author & Intellectual Property Attribution


⚡ Overview

While classical blockchains operate at 400ms to 12-second block intervals, MegaETH introduces a real-time, 100,000 TPS, 10-millisecond block execution engine.

MegaAgent is the foundational autonomous AI agent infrastructure built specifically to utilize this real-time execution capability. It enables multi-agent AI swarms to negotiate, execute micro-tasks, and stream sub-cent micro-payments in real time:

  • Sub-10ms Settlement Latency: Zero HTTP bottleneck; WebSocket-native in-memory state transition ($p99 < 0.05\text{ ms}$).
  • Scoped AI Allowances: Hard budget limits (maxBudget), temporal expiries (validUntil), and recipient restrictions prevent runaway AI loops.
  • Proof-of-Task Verification: Cryptographic hash chaining ensures payments only release when LLM agent tasks are verified.
  • 20 bps Protocol Fee Routing: Built-in protocol revenue extraction automatically routes 0.20% on every agent spend to the protocol treasury.

🌐 Live On-Chain Deployments (MegaETH Carrot Testnet)

The MegaAgent core protocol is live, operational, and executing on the official MegaETH Carrot Testnet (Chain ID: 6343):


🏛️ Architecture

                 +-------------------------------+
                 | Autonomous AI Agent Swarm     |
                 | (ElizaOS / LangChain / Devin) |
                 +---------------+---------------+
                                 |
                     Sub-10ms Micro-Transactions
                                 v
        +-------------------------------------------------+
        |           MegaAgentRail (Solidity)              |
        |  - Packed Storage (32-byte in-memory slots)     |
        |  - 20 bps Treasury Fee Routing                  |
        |  - Scoped Allowance & Circuit Breaker Guard     |
        +------------------------+------------------------+
                                 |
                 MegaETH In-Memory Execution Trie
                 (Sub-10ms Real-Time Block Finality)
                                 v
        +-------------------------------------------------+
        | Instant Recipient Delivery + Treasury Revenue   |
        +-------------------------------------------------+

📊 Benchmark Verification

Automated benchmark (scripts/benchmark-10ms.ts) across 1,000 continuous synthetic AI transactions:

================================================================================
⚡ MEGAAGENT HIGH-FREQUENCY BENCHMARK: SUB-10MS MEGAETH ENGINE
Author ORCID: https://orcid.org/0009-0008-2818-6579
================================================================================
• Total Processed Transactions: 1000
• Total Elapsed Time:           0.007s
• Throughput:                   149,235.9 tx/sec
• Median Latency (p50):         0.004 ms
• 95th Percentile (p95):        0.010 ms
• 99th Percentile (p99):        0.034 ms (TARGET: < 10.0 ms)
• Sub-10ms Invariant:           PASSED ✅
================================================================================

🚀 Quickstart

npm install @megaagent/core
import { MegaAgentClient } from '@megaagent/core';

const client = new MegaAgentClient({
  chainId: 424242,
  rpcUrl: 'https://testnet.megaeth.systems/rpc',
  wsUrl: 'wss://testnet.megaeth.systems/ws',
  contractAddress: '0x...',
  treasuryAddress: '0x...'
});

// Stream a real-time micro-spend from agent
const receipt = await client.streamMicroSpend('0xAgent...', {
  principalAddress: '0xPrincipal...',
  recipientAddress: '0xProvider...',
  amountWei: 1000000000000n,
  taskProofHash: '0xabc123...'
});

console.log('Confirmed in:', receipt.latencyMs, 'ms');

📄 License & Intellectual Property

Apache-2.0 © 2026 sparkysolutions10-pixel (ORCID: 0009-0008-2818-6579)