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

@cart.fun/a2a-pages

v1.1.0

Published

Generate beautiful developer documentation pages from A2A agent cards

Readme

@cart.fun/a2a-pages

Generate beautiful developer documentation pages from A2A agent cards

npm version License: MIT

Features

  • 🎨 Beautiful dark/light themes - Professional documentation pages out of the box
  • One-line integration - Add a landing page with a single import
  • 🔧 Fully customizable - Themes, sections, footer links, and more
  • 📱 Responsive design - Looks great on all devices
  • 💳 x402 payment flow - Built-in documentation for x402 payments
  • 📊 Symbol grids - Automatic rendering of supported assets

Installation

npm install @cart.fun/a2a-pages

Quick Start

import express from 'express'
import { createAgentLanding } from '@cart.fun/a2a-pages'

const app = express()

// Serve landing page from agent-card.json file
app.get('/', createAgentLanding('./agent-card.json'))

app.listen(3000)

Usage

Using a file path

app.get('/', createAgentLanding('./.well-known/agent-card.json'))

Using an agent card object

const agentCard = {
  name: 'My Agent',
  description: 'A powerful AI agent',
  url: 'https://my-agent.example.com',
  version: '1.0.0',
  skills: [
    {
      id: 'message/send',
      name: 'Send Message',
      description: 'Send a message to the agent'
    }
  ],
  pricing: {
    model: 'per-request',
    price: '$0.001',
    currency: 'USDC',
    network: 'base'
  }
}

app.get('/', createAgentLanding(agentCard))

With options

app.get('/', createAgentLanding('./agent-card.json', {
  // Theme: 'dark' | 'light' | custom Theme object
  theme: 'dark',
  
  // Toggle sections
  showPaymentFlow: true,
  showSymbols: true,
  showAgentCard: true,
  
  // Add custom sections
  customSections: [
    {
      title: 'Rate Limits',
      content: '<p>100 requests per minute</p>'
    }
  ],
  
  // Customize footer
  footer: {
    links: [
      { label: 'GitHub', url: 'https://github.com/...' },
      { label: 'Discord', url: 'https://discord.gg/...' },
      { label: 'Docs', url: 'https://docs.example.com' }
    ]
  },
  
  // Enable caching (default: true in production)
  cache: true
}))

Custom Themes

Create your own theme by providing a Theme object:

import { createAgentLanding, type Theme } from '@cart.fun/a2a-pages'

const myTheme: Theme = {
  colors: {
    bg: '#0f0f23',
    surface: '#1a1a2e',
    border: '#2d2d44',
    text: '#e4e4e7',
    textDim: '#8b8b9e',
    accent: '#ff6b6b',
    accentDim: '#4a3333',
    codeBg: '#16162a'
  },
  fonts: {
    heading: "'Space Grotesk', sans-serif",
    body: "'Inter', sans-serif",
    mono: "'Fira Code', monospace"
  }
}

app.get('/', createAgentLanding('./agent-card.json', { theme: myTheme }))

Advanced: Direct HTML Generation

For more control, use the generator function directly:

import { generateLandingPage, darkTheme } from '@cart.fun/a2a-pages'

const html = generateLandingPage(agentCard, {
  theme: darkTheme,
  showPaymentFlow: true
})

// Use the HTML however you need
fs.writeFileSync('landing.html', html)

Advanced: Individual Components

For maximum flexibility, use individual components:

import {
  renderHero,
  renderQuickstart,
  renderSkills,
  renderSymbols,
  renderPaymentFlow,
  renderFooter,
  darkTheme
} from '@cart.fun/a2a-pages'

// Build your own page structure
const hero = renderHero(agentCard, darkTheme)
const quickstart = renderQuickstart(agentCard, darkTheme)
// ... compose as needed

Agent Card Schema

The agent card should follow the A2A protocol specification:

interface AgentCard {
  name: string
  description: string
  url: string
  version: string
  skills: Array<{
    id: string
    name: string
    description: string
    tags?: string[]
    examples?: string[]
    inputSchema?: object
    outputSchema?: object
  }>
  supportedSymbols?: {
    [category: string]: {
      source: string
      symbols: string[]
    }
  }
  pricing?: {
    model: string
    price: string
    currency: string
    network: string
  }
}

License

MIT © cart.fun