npm for AI agents - A package manager and registry for sharing, discovering, and managing AI agents and skills
AgentPKG is a comprehensive platform for publishing, discovering, and managing AI agents and skills. Just like npm revolutionized JavaScript package management, AgentPKG makes it effortless to share and reuse AI agent configurations across projects and teams.
- 🚀 CLI Tool: Publish and install agents/skills with simple commands (
agentpkg publish agent,agentpkg add agent @org/agent) - 🔒 Private by Default: All agents and skills are private to your organization unless explicitly made public
- 🏢 Organizations: Create organizations and invite team members to collaborate
- 📦 Versioning: Semantic versioning support with version history tracking
- 🔐 Access Control: Choose between private (org-only) or public access for each agent/skill
- 🌐 Web UI: Browse, search, and manage agents/skills through a modern web interface
- ✅ Integrity Checking: SHA-256 checksums verify file integrity during installation
- ⚡ Fast: Built with Bun runtime for maximum performance
This is a Turborepo monorepo containing:
apps/cli: Command-line tool for publishing and installing agents/skills (CLI Documentation)apps/api: Backend REST API with authentication, storage, and access control (API Documentation)apps/web: Next.js web application for browsing and managing agents/skills (Web Documentation)
packages/eslint-config: Shared ESLint configurationspackages/typescript-config: Shared TypeScript configurations
Each package/app is 100% TypeScript.
- Runtime: Bun - Fast JavaScript runtime and package manager
- Web Framework: Next.js - React framework for production
- API Framework: Express - Node.js web framework
- Database: PostgreSQL with Prisma ORM
- Storage: Google Cloud Storage for agent/skill files
- Monorepo: Turborepo for efficient builds
- UI Library: Tailwind CSS + shadcn/ui
- CLI Framework: @clack/prompts for beautiful terminal UIs
# Install Bun runtime
curl -fsSL https://bun.sh/install | bash
# Install AgentPKG CLI globally
bun install -g @agentpkg/cli
# Login (create account via web UI first at https://agentpkg.com)
agentpkg login
# Install an agent
agentpkg add agent @acme/my-agent
# Publish your agent
agentpkg publish agentSee CLI Documentation for complete usage guide.
# Clone the repository
git clone https://github.com/elvish-ishaan/agentpkg.git
cd agentpkg
# Install dependencies
bun install
# Set up environment variables (see Environment Variables section)
cp apps/api/.env.example apps/api/.env
cp apps/web/.env.example apps/web/.env
# Set up database
cd apps/api
bun prisma migrate dev
bun prisma generate
# Start development servers
cd ../..
bun devThis starts:
- API server at
http://localhost:4000 - Web app at
http://localhost:3000 - CLI can connect to local API via
AGENTPKG_API_URL=http://localhost:4000
agentpkg/
├── apps/
│ ├── api/ # Backend REST API
│ │ ├── src/
│ │ │ ├── routes/ # API endpoints
│ │ │ ├── middleware/ # Auth, validation, error handling
│ │ │ ├── services/ # Business logic (GCS, email)
│ │ │ └── index.ts # Express app entry point
│ │ ├── prisma/
│ │ │ ├── schema.prisma # Database schema
│ │ │ └── migrations/ # Database migrations
│ │ └── package.json
│ │
│ ├── cli/ # Command-line tool
│ │ ├── src/
│ │ │ ├── commands/ # CLI commands (login, publish, add, etc.)
│ │ │ ├── utils/ # Helpers (API client, validation, file I/O)
│ │ │ └── config/ # Configuration paths
│ │ ├── index.ts # CLI entry point
│ │ └── package.json
│ │
│ └── web/ # Web application
│ ├── app/ # Next.js app directory
│ ├── components/ # React components
│ ├── lib/ # Utilities and API client
│ └── package.json
│
├── packages/
│ ├── eslint-config/ # Shared ESLint config
│ └── typescript-config/ # Shared TypeScript config
│
├── turbo.json # Turborepo configuration
├── DESIGN.md # Architecture and design decisions
├── CHANGELOG.md # Project changelog
└── README.md # This file
# Build everything
bun run build
# Build a specific app
bun run build --filter=cli
bun run build --filter=api
bun run build --filter=web# Run all dev servers
bun dev
# Run specific app
bun dev --filter=api
bun dev --filter=web# Lint all packages
bun run lint
# Lint specific package
bun run lint --filter=cli- CLI Documentation: Complete CLI usage guide
- API Documentation: Backend API reference and setup
- Web Documentation: Web app features and development
- Design Document: Architecture, decisions, and technical design
- Changelog: Version history and release notes
- User registers via web UI (creates user + default org)
- User logs in via CLI or web
- JWT token issued and stored locally (
~/.agentpkg/config.jsonfor CLI) - Token included in API requests for authentication
- User creates
agent.agent.mdorSKILL.mdfile - Runs
agentpkg publish agentoragentpkg publish skill - CLI validates file, prompts for metadata (org, version, access level)
- File uploaded to GCS with SHA-256 checksum
- Metadata stored in PostgreSQL with version tracking
- Default access: Private (org members only)
- Private (default): Only organization members can view and install
- Public: Anyone can view and install
- Ownership: Only org owners can change access levels
- Filtering: API automatically filters results based on user membership
- User runs
agentpkg add agent @org/agentoragentpkg add skill @org/skill - CLI requests agent/skill metadata from API
- API checks user permissions (public access OR user is org member)
- CLI downloads file from GCS
- Verifies checksum matches
- Saves to
.github/agents/or.github/skills/directory
# Build for production
cd apps/api
bun install --production
bun run build
# Run migrations
bun prisma migrate deploy
# Start server
bun run startEnvironment: Node.js/Bun-compatible platform (e.g., Railway, Render, Fly.io)
# Build for production
cd apps/web
bun run build
# Start server
bun run startRecommended: Deploy to Vercel for optimal Next.js performance
# Publish to npm
cd apps/cli
bun run build # If needed
npm publishSee CLI PUBLISHING.md for detailed npm publishing instructions.
# Database
DATABASE_URL="postgresql://user:password@localhost:5432/agentpkg"
# JWT Secret (generate with: openssl rand -base64 32)
JWT_SECRET="your-secret-key"
# Google Cloud Storage
GCS_PROJECT_ID="your-project-id"
GCS_BUCKET_NAME="agentpkg-storage"
GCS_KEY_FILE="path/to/service-account-key.json"
# Email (optional, for invitations)
SMTP_HOST="smtp.gmail.com"
SMTP_PORT="587"
SMTP_USER="your-email@gmail.com"
SMTP_PASS="your-app-password"
SMTP_FROM="AgentPKG <noreply@agentpkg.com>"
# Server
PORT="4000"# API URL
NEXT_PUBLIC_API_URL="http://localhost:4000"
# Or for production
NEXT_PUBLIC_API_URL="https://api.agentpkg.com"# Set API URL (default: https://api.agentpkg.com)
export AGENTPKG_API_URL="http://localhost:4000" # For local developmentContributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project uses Semantic Versioning:
- Current Version: 0.2.0
- Major.Minor.Patch (e.g., 1.2.3)
- See CHANGELOG.md for version history
MIT License - see LICENSE file for details
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- CLI Package: npm @agentpkg/cli
Built with ❤️ by Elvish Ishaan