Company Pack Format v1

Last reviewed November 15, 2026 (checked against the app).

Company Pack v1 is the portable JSON format behind the Marketplace. It carries a company definition, its agents, the skills those agents use, teams, goals, and optional agent memories. It never carries Keychain values or other live credentials.

Use the Marketplace exporter whenever possible. Hand-authored packs are accepted only when they follow the same contract and pass the same import checks.

What is in a v1 pack?

Top-level field Required Contents
manifest Yes Format version, generation time, source company, counts, redaction notes, and excluded tables
company Yes Company name, description, mission, brand color, status, creation time, and source ID
agents No Portable agent configuration and identity, plus optional redacted memories
skills No Skills assigned to exported agents
teams No Team definitions, leads, and member relationships
goals No Company goal tree and progress fields

The exporter always writes all six fields. The importer treats a missing collection as an empty collection, but manifest.schema_version and company.name must be present.

{
  "manifest": {
    "schema_version": 1,
    "generated_at": 1787750000000,
    "source_company_id": "source-company-id",
    "counts": {
      "agents": 2,
      "skills": 2,
      "teams": 1,
      "goals": 1
    },
    "redactions": [],
    "excluded_tables": []
  },
  "company": {
    "name": "Example Operations Team"
  },
  "agents": [],
  "skills": [],
  "teams": [],
  "goals": []
}

Tip: Treat exported pack files as reviewable source artifacts. Secret filtering is a safety net, not permission to publish without inspection.

How do I generate a pack?

  1. Open Marketplace. On web, the Marketplace sidebar entry is shown to admins only.
  2. Click Publish a pack.
  3. Select the source company and enter its listing slug, version, and description, plus an optional publisher website.
  4. Click Scan + publish. CPLai registers the company as the publisher, exports the pack, and runs the automated safety scan.
  5. Review the automated safety result. Only passing submissions enter the community catalog.

The export endpoint can include up to 100 high-importance memory entries per agent. A pack may also contain empty memories arrays, depending on how the export was requested. Review those arrays explicitly before sharing the file.

The desktop and web Scan + publish actions explicitly request include_memories=false, so ordinary UI exports contain empty memories arrays. The current UI has no memory-inclusion toggle. An integration can opt in by sending include_memories=true to the export endpoint. Integrations should always send either true or false deliberately because omitting the query value preserves the endpoint's legacy include-memories behavior.

Tip: Keep include_memories=false unless the pack is intentionally designed to carry reviewed agent memory. Memory entries can contain private business context even after secret-shape filtering.

What does the manifest mean?

Field Contract
schema_version Integer 1. The current importer rejects every other value.
generated_at Unix time in milliseconds when the export was created.
source_company_id Source instance company ID for traceability. The importer creates a new company ID.
counts Exported counts for agents, skills, teams, and goals. Publishers also copy these counts into the registry listing.
redactions Human-readable list of content categories the exporter removed or scrubbed.
excluded_tables Human-readable list of operational tables that are not portable.

Counts describe the exported file. They are not a promise that every record will be newly created. For example, an installer can reuse an existing same-name skill instead of duplicating it.

What agent fields are portable?

Agents can carry these categories:

Category Fields
Identity name, description, role, identity, soul, memory, user_context, learnings, working_context, personality
Runtime cli_type, model, prompt, prerequisites, schedule, template_id
State autonomous, enabled, hatched, created_at
Relationships export_local_id, reports_to_export_local_id, skill_id, skill_name
Setup checklist env_var_keys, credential_keys
Filesystem placeholders workspace_dir, working_dir
Optional memory memories

export_local_id values exist only to reconnect relationships inside the pack. The importer generates new IDs and remaps reporting lines, team membership, team leads, skill assignments, and goal parents.

Every imported agent starts disabled, with autonomy off and no credentials. The installer returns the environment-variable and credential names each agent needs so an administrator can provision them through Keychain, review the imported schedule, and deliberately enable the agent.

What skill, team, goal, and memory fields are portable?

Record Portable fields
Skill id, name, category, description, content, created_at
Team id, name, description, color, lead_agent_export_local_id, created_at, members
Team member agent_export_local_id, role_in_team, is_primary_team
Goal id, parent_export_local_id, title, description, level, status, target_date, progress_pct, created_at
Agent memory topic, content, importance, source, tags, pinned, created_at

Only skills assigned to agents in the source company are exported. Vendor-internal skills are excluded even when an exported agent is assigned to one. During import, same-name skills already present in the global skill library are reused.

What never belongs in a pack?

The exporter applies these boundaries before returning JSON:

  • Environment-variable and credential values are removed. Only key names remain.
  • Keychain entries, channels, user accounts, tickets, chat messages, runs, conversations, API-token settings, and messaging routes are excluded.
  • Local workspace paths are replaced with <cpl-workspace>.
  • Company narrative, skill content, agent identity fields, prompts, and memories are scrubbed for common secret shapes.
  • Vendor-internal skills are blocked from portable skill export and filtered out of Company Packs.
  • Per-install usage and budget state is not portable.

The owner-side publisher performs another secret-shape scan before upload. A successful scan reduces risk, but it cannot decide whether ordinary prose contains private business information.

How do versions and compatibility work?

Company Pack structure and marketplace release versions are separate:

Version Purpose Rule
manifest.schema_version JSON structure compatibility Must be 1 for the current importer.
Registry version Release identity for one pack slug Numeric x.y.z, such as 1.2.0. Prerelease labels and a leading v are rejected.

For v1 authors:

  • Additive fields are safe because the importer reads the fields it understands.
  • Do not rename a v1 field or change its meaning. That requires a new schema version and importer support.
  • Keep the same slug for compatible releases of the same pack.
  • Increment the registry version whenever published content changes.
  • The Marketplace shows the most recently published entry for each slug, based on published_at.
  • Installed packs record their source, slug, version, and company. Installs with recorded component mappings and a baseline can preview in-place updates from the same source-company lineage. Local field conflicts prevent applying an update; removed entities are retained. Legacy installs without that provenance use side-by-side installation. See Marketplace.

Registry slugs must contain 2 to 64 lowercase letters, numbers, or hyphens, start with a letter or number, and match the pack identity users recognize.

How is a pack validated before it is published?

A pack is validated before it reaches the CPLai Pack Registry. The validator checks the following:

  • that the pack file exists and contains valid JSON;
  • manifest.schema_version == 1;
  • a company payload with a name and traceable source identity;
  • omitted optional collections as empty arrays and exact manifest counts for agents, skills, teams, and goals;
  • unique agent, skill, and goal IDs plus valid agent, skill, team-member, and goal-parent references;
  • the 20 MiB import ceiling;
  • common live-secret shapes in the complete JSON body, including CPLai PATs and canonical provider keys.

Publishing also checks the registry slug and the numeric x.y.z release version, then records the pack's SHA-256 in the registry's index.json. Registry installs fetch through the server egress guard, require the pack URL to remain on the configured registry origin, cap pack bodies at 20 MiB, and verify the body against the index SHA-256 before import.

What is the registry index contract?

The registry index.json uses schema version 1 and a packs array. Each entry contains:

Field Purpose
slug, version Stable pack identity and release
name, description, author, tags Marketplace listing content
counts Agent, skill, team, and goal counts copied from the pack manifest
sha256 Lowercase SHA-256 of the exact published pack body
url HTTPS URL of the versioned pack JSON on the registry origin
published_at Unix time in milliseconds used for latest-release ordering

Planned: Signed publisher trust is not part of the current v1 implementation. In-app community submissions (Publish a pack) record a publisher profile (the company name and an optional website) and must pass the automated safety scan, but packs and listings are not cryptographically signed. The validation-only command enforces the frozen v1 structural and referential contract.

Related guides: Marketplace, Agent Hiring, Skills and Prompts, and Keychain.

CPLai user manual, version of November 20, 2026. This is the same manual that ships inside the app.