Skip to content
Skip to content
PGB Learn

Write a package manifest

Become a publisher

You publish under a publisher.

  1. Sign in and open Publish to reach the Publisher portal.
  2. Under Create a publisher, enter a Publisher name (lower-case letters, digits and dashes, 2 to 32 characters) and a Display name.
  3. Choose Create publisher.

The name cannot be changed later. Names starting with pgb and words like admin or official are reserved. You may own up to five publishers. Owners can add colleagues with Add a team member as Maintainer or Owner.

What a package is

A package is a folder with a manifest file, pgb.package.json, plus whatever the package contains. You pack it as a .tgz and upload it. Packages are known as @publisher/name.

A first manifest: an agent

Create a folder weekly-summary containing pgb.package.json:

{
  "schema_version": "1",
  "name": "weekly-summary",
  "publisher": "your-publisher",
  "type": "agent",
  "version": "1.0.0",
  "display_name": "Weekly Summary",
  "summary": "Writes a short summary of last week's mail and emails it to the owner.",
  "license": "MIT",
  "portability": "compatible",
  "categories": ["ai-agents", "productivity"],
  "permissions": ["business.mail.read", "notify.email"],
  "agent": {
    "instructions": "Read last week's mail and email the owner a short summary of what needs attention.",
    "model_route": "smart",
    "tools": ["business.mail.search", "notify.email"],
    "triggers": [{ "type": "manual" }],
    "budget_usd_month": 5
  }
}

The rules, field by field

  • schema_version must be "1".
  • name is lower case with digits and dashes, up to 48 characters.
  • type is one of agent, tool, integration, function, template, workflow, database, business-resource.
  • version is three numbers, such as 1.0.0.
  • display_name up to 80 characters; summary up to 280.
  • license is an open license identifier such as MIT.
  • portability is portable, compatible or native.
  • categories: up to five from the Marketplace list. tags: up to ten short lower-case words.
  • permissions: only values from the Marketplace list. Ask for the least you need.
  • configuration: settings with an UPPER_SNAKE_CASE name, a type (text, email, url, number, boolean, select, phone), and optional required, default, options and description.
  • secrets: names only; never defaults.
  • Unknown keys are rejected.

An agent package needs the agent block: instructions (10 to 20,000 characters), model_route (fast, smart or code), tools, triggers, budget_usd_month and approval_policy. When a user adds your agent in PGB Agents, those values fill in their new agent.

Template packages

A template package has a template block instead: framework, entry, variables, and optionally groups, conditions and locked_paths. Fields can be text, richtext, number, color, image, file, url, email, phone, select, multiselect, boolean, collection or date. Names that look like secrets (password, token, key and so on) are refused. This is the form Studio shows. The easiest route is to build it in Studio and use Publish as a template.

Study real examples

The official starters are good models: Customer Support Agent, Daily Digest, Business Website, Portfolio, CSV to JSON. Open any on the Marketplace and read Setup it needs and What it can access to see how the manifest looks to users.

Try it yourself

  1. Create your publisher.
  2. Write the manifest above in a folder, changing the names.
  3. Change type to a wrong value and note which rule that breaks.

Recap

  • You publish under a publisher you belong to.
  • pgb.package.json describes the package, its permissions, settings and secrets.
  • Agent and template packages have their own blocks.
  • Ask for as few permissions as you can.

Open Access Course

Free

forever
  • 6 structured lessons across 3 modules
  • Interactive knowledge checks with instant feedback
  • Verifiable completion certificate & PDF