Persona marketplace¶
The persona marketplace is a catalogue of ready-made personas that an operator installs into a brain from the admin UI or the admin API. This page covers where the catalogue comes from, the on-disk format of an article, what installation does, and the routes involved.
Availability¶
| Condition | Value |
|---|---|
| Edition | Server only. The desktop edition never mounts the marketplace, whatever the flag says |
| Flag | SPONGRAM_MARKETPLACE_ENABLED; code default off, the server image enables it by default |
| Dependency | SPONGRAM_PERSONAS_ENABLED must also be on; without it the marketplace flag has no effect |
| Who can use it | The administrator only. There is no /v1/marketplace route and no end-user surface |
With the flag off at startup, the marketplace routes are not mounted and no catalogue is read. With it on, the catalogue is loaded once when the service starts.
The admin SPA learns whether the marketplace is available from
GET /admin/api/spongram/features, which returns {"personas": <bool>, "marketplace": <bool>}.
The Marketplace page and its navigation entry exist only when marketplace is true.
Not the plugin marketplace
GET /admin/api/spongram/marketplace.json is a different thing: the public manifest of the
Claude Code plugin marketplace. The persona marketplace lives under
/admin/api/spongram/marketplace and its children.
Sources¶
A source is a directory on the server's disk. Nothing is downloaded at run time: no URL is ever fetched to build the catalogue.
| Source | Location | Name |
|---|---|---|
| Standard | Shipped inside the application package, present in every server image | standard |
| Organisation | Each directory listed in SPONGRAM_MARKETPLACE_DIRS (paths separated by :) |
The last segment of the path |
Rules for organisation sources:
- The source name must match
^[a-z0-9][a-z0-9-]{1,39}$. Renaming the directory renames the source, and therefore the reference of every article in it. - A path that is not a directory is skipped with a warning; the other sources still load.
- A source whose name is already loaded is ignored.
standardis always loaded first. - Entries whose name starts with
.and entries that are not directories are not articles. A source can therefore be a Git clone:.gitis not reported as an invalid article. - Mount the directory read-only into the container; the service only reads it.
# Compose or stack excerpt: one organisation source
services:
spongram:
environment:
SPONGRAM_MARKETPLACE_ENABLED: "true"
SPONGRAM_MARKETPLACE_DIRS: /marketplace/my-org
volumes:
- /srv/spongram/marketplace:/marketplace:ro
The Standard catalogue¶
The Standard source ships ten personas, each in a French article (<id>) and an English article
(<id>-en):
| Id | Role |
|---|---|
argus |
Security reviewer |
ariane |
FinOps consulting |
cassandre |
Product owner |
eole |
Product launch |
hermes |
Bilingual technical writer |
hestia |
Support and onboarding |
mercure |
B2B sales |
minerve |
Chief of staff |
orphee |
Media creator |
themis |
In-house counsel |
Article format¶
An article is one directory. Its name is the article id and the slug of the persona it installs.
| File | Content | Size limit |
|---|---|---|
manifest.json |
Catalogue metadata | 16,384 bytes |
card.json |
The persona, as a Character Card V2 with data.extensions.spongram |
131,072 bytes |
avatar.webp |
Illustration; must be a WebP file (the signature is checked) | 153,600 bytes |
skills/<skill-slug>/SKILL.md |
One Agent Skills document per skill, UTF-8, 0 to 8 skills | 32,768 bytes each |
manifest.json¶
{
"id": "release-manager",
"version": "1.0.0",
"lang": "en",
"name": "Release manager",
"tagline": {
"fr": "Notes de version et listes de controle.",
"en": "Release notes and checklists."
},
"tags": ["release", "writing"],
"avatar": "avatar.webp",
"skills": ["release-notes"]
}
| Key | Rule |
|---|---|
id |
Required. Equal to the directory name; kebab-case, 2 to 40 characters |
version |
Required. Three integers X.Y.Z. Increment it on every content change, otherwise installed brains are never offered the update |
lang |
Required. fr or en |
name |
Required. At most 80 characters |
tagline |
Required. An object with a non-empty string for both fr and en |
tags |
Optional list of strings; the first 8 are kept |
avatar |
Optional; if present it must be avatar.webp |
skills |
List of skill slugs, at most 8. It must list exactly the directories present under skills/ |
Other keys are ignored.
card.json¶
The card follows the format described in personas for Character Card V2 export. The simplest way to author one is to write the persona on the Personas page and export its card. Two checks tie the card to the manifest:
data.extensions.spongram.slugmust equal the article id;data.extensions.spongram.skillsmust list the same slugs asmanifest.skills.
SKILL.md¶
Each skill has YAML front matter with a name and a description. The name must equal the name
of the skill's directory.
What makes an article invalid¶
An invalid article is skipped and logged as a warning; it never prevents the rest of the catalogue from loading. The reasons are returned by the reload route. Besides the rules above, an article is invalid when any file it needs resolves outside its source directory: a symbolic link that leaves the source is refused, while a link that stays inside it is accepted.
Routes¶
All routes below sit under /admin/api/spongram and require the admin token
(Authorization: Bearer <admin-token>). See the HTTP API for the rest of
the admin surface.
| Method and path | Purpose |
|---|---|
GET /marketplace |
Sources, article count per source, load time, and one row per article (ref, version, lang, name, tagline, tags, avatar_url, skills_count) |
GET /marketplace/state?instance_id={id} |
For each article: installed, installed_version, update_available for that brain |
POST /marketplace/reload |
Re-read every source from disk; returns sources, counts and the list of skipped articles in errors |
GET /marketplace/{source}/{id} |
Article detail: manifest, card, skill bodies and the rendered persona block |
POST /marketplace/{source}/{id}/install |
Install into a brain; body {"instance_id": 12, "replace": false} |
An article reference is <source>/<id>, for example standard/hermes-en.
curl -s -X POST \
-H "Authorization: Bearer <admin-token>" \
-H "Content-Type: application/json" \
-d '{"instance_id": 12, "replace": false}' \
https://spongram.example.com/admin/api/spongram/marketplace/standard/hermes-en/install
| Status | Meaning |
|---|---|
201 |
Installed. Body: persona, skills (number written), replaced |
404 |
Unknown article or unknown brain |
409 |
A persona with this slug already exists and replace is false. Body: {"detail": "...", "slug": "<slug>"} |
422 |
A per-brain limit would be exceeded (20 personas, 50 skills) |
What installing does¶
Installation writes the article's skills, then the persona, in a single transaction. If any step fails, nothing is written.
- Installing never activates. A new persona is created inactive. Activation remains an act of
the agent through
activate_persona; no marketplace route activates anything. - Replacing keeps the persona's state. With
replace: true, the definition and the skills are overwritten, while the activation state, the activation counter and the compiled summary are left as they were. A persona that was active stays active. - Skills record their origin. Each installed skill is stored with the source
marketplace:<source>/<id>@<version>. That is how the installed version is known. - The avatar is linked, not copied. The persona's
avatar_urlis set to the article's avatar path.
In the admin UI, Install sends replace: false and turns a 409 into a confirmation dialog
naming the slug; only Update sends replace: true directly. The page shows the remaining
capacity of the chosen brain, read from
GET /admin/api/spongram/instances/{id}/personas/summary.
Installed state and updates¶
An article counts as installed on a brain when a persona with the article's id exists there. Its
installed version is read from the source recorded on the brain's skills, and update_available
is true when that version is lower than the catalogue's. An article without skills has no
recorded version, so it is shown as installed and never offered an update.
Language twins¶
The two language versions of a persona, <id> and <id>-en, declare the same skill slugs. A
skill is unique per brain and slug, so installing the second twin overwrites the skills of the
first and its version record with them. Install only one of the two in a given brain. The admin
UI disables the second twin once the first is installed; the install route itself does not check
this.
Avatars¶
Avatars are served without authentication at
GET /static/marketplace/{source}/{id}.webp, with a one-day cache lifetime. The route serves only
the avatar of an article present in the catalogue; it is not a static mount of the source
directory, so cards and skills are never exposed through it. A persona's avatar_url accepts only
a relative path of that form, never an absolute URL.
Updating a catalogue¶
- Change the files of the organisation source on the server (for a Git clone, pull). Increment
versionin the manifest of every article whose content changed. - Call
POST /admin/api/spongram/marketplace/reload, or use the reload button of the Marketplace page. - Check that
errorsis empty in the response.
No restart is needed. The catalogue is replaced as a whole, so requests in flight keep reading a
consistent catalogue. Adding a new directory to SPONGRAM_MARKETPLACE_DIRS does require a
restart, because the variable is part of the service environment. Installed personas are not
changed by a reload: update each brain from the Marketplace page.
From the Personas page¶
In the operator mirror of the Personas page (see personas), a button leads to the Marketplace page for the same brain. It is shown only in admin mode and only when the marketplace is enabled. The page opened with a brain key never shows it.