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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@defikitdotnet/public-agent-module

v0.1.40

Published

Public Agent Management Module using Agent Framework

Readme

Public Agent Management Module

A module for the Agent Framework that enables users to publish their AI agents publicly and provides a listing to view and interact with published agents.

Features

  • Publish agents to make them publicly accessible
  • List all published agents
  • View details of specific published agents
  • Send messages to published agents
  • Unpublish agents to hide them from the public listing

API Endpoints

| Method | Endpoint | Description | | ------ | ---------------------- | ---------------------------------- | | GET | /api/agents/public | Get all published agents | | GET | /api/agents/public/:id | Get details of a published agent | | POST | /api/agents/:id/publish| Publish an agent | | POST | /api/agents/:id/unpublish | Unpublish an agent | | POST | /api/agents/:id/message| Send a message to a published agent|

Database Schema

The module uses the following database schema:

-- Existing accounts table (referenced only)
CREATE TABLE IF NOT EXISTS "accounts" ( 
  "id" TEXT PRIMARY KEY, 
  "createdAt" TIMESTAMP DEFAULT CURRENT_TIMESTAMP, 
  "name" TEXT, 
  "username" TEXT, 
  "email" TEXT, 
  "avatarUrl" TEXT, 
  "details" TEXT DEFAULT '{}' CHECK(json_valid("details")), 
  "character" TEXT CHECK(json_valid("character")),
  "status" TEXT DEFAULT 'active' CHECK(status IN ('active', 'inactive', 'deleted')),
  "createdBy" TEXT DEFAULT 'did:privy:cm6077sr4041241z02cdo6hpv',
  "isExportData" BOOLEAN DEFAULT 0,
  "type" TEXT DEFAULT 'user' CHECK(type IN ('user', 'agent'))
);

-- Public agents table
CREATE TABLE IF NOT EXISTS "public_agents" ( 
  "agentId" TEXT PRIMARY KEY REFERENCES accounts(id) ON DELETE CASCADE, 
  "publishedAt" TIMESTAMP DEFAULT CURRENT_TIMESTAMP, 
  "status" TEXT DEFAULT 'published' CHECK(status IN ('published', 'unpublished'))
);

Installation

pnpm add public-agent-management

Usage

Backend Setup

import express from 'express';
import { initializeBackend } from 'public-agent-management';
import { sqliteAdapter } from '@elizaos/adapter-sqlite';

const app = express();
app.use(express.json());

// Create database adapter
const dbAdapter = sqliteAdapter.createAdapter({
  databasePath: './data/myapp.db',
});

// Initialize the public agent management module
initializeBackend(app, dbAdapter);

app.listen(3000, () => {
  console.log('Server running on port 3000');
});

Environment Variables

Create a .env file with the following configuration:

AGENT_MESSAGING_ENDPOINT=http://localhost:3001/api/agent/message

API Examples

Publish an Agent

curl -X POST http://localhost:3000/api/agents/agent-123/publish

Get Published Agents

curl http://localhost:3000/api/agents/public

Send a Message to an Agent

curl -X POST http://localhost:3000/api/agents/agent-123/message \
  -H "Content-Type: application/json" \
  -d '{"message": "Hello, agent!", "userId": "user-456"}'

Development

# Clone the repository
git clone [repository-url]

# Navigate to the module directory
cd examples/public-agent-management

# Install dependencies
pnpm install

# Start the development server
pnpm run backend

License

MIT