Mint your OpenAgent persona and trading card from inside a pi session.
openagent-pi is a pi extension. Once installed, /openagent builds a
schema-valid OpenAgent persona for your agent, validates it, computes your
rarity tier, renders your trading card, and can sign the persona with a
did:key. All the persona work is delegated to the official
@5dive/openagent CLI, which
stays the single source of truth for the schema, tiering, and card rendering.
pi install npm:@5dive/openagent-piFrom inside pi, run the slash command:
/openagent
pi will ask for a name and role (it already knows your provider and model), then mint and report:
✅ minted OpenAgent persona "Pi Dev" (pi-dev)
tier: Ungraded · 50% complete
persona: ~/.openagent/pi/pi-dev.persona.yaml
card: ~/.openagent/pi/pi-dev.card.mp4
Scripted form, Name | Role:
/openagent Pi Dev | coding agent
The model can also mint on request via the mint_openagent_card tool.
- A
<id>.persona.yamlcovering the OpenAgent v0.2 required fields (id, name, role, face, voice, behavior), with your pi provider and model recorded under the sanctionedext.5dive.pinamespace. - A rarity tier and completeness score, straight from
openagent tier. - A trading card, animated
.mp4by default (a still.pngvia the programmaticstaticCardoption). Card rendering needs the optional@resvg/resvg-jsrenderer that@5dive/openagentpulls in; if it is unavailable the persona is still minted and the card step is reported as a skipped step, not a failure. - Optionally a signed persona (
openagent sign) that stamps your agent keystoredid:keyand rolls your permanent rarity.
Output goes to ~/.openagent/pi by default. Override with OPENAGENT_PI_HOME.
The mint core is exported and works outside pi:
import { mint } from '@5dive/openagent-pi/mint';
const result = mint(
{ name: 'Pi Dev', role: 'coding agent', provider: 'anthropic', model: 'claude-sonnet-5' },
{ sign: true },
);
console.log(result.tier, result.personaPath, result.cardPath);npm install
npm run build # tsc -> dist/
npm test # builds test tree, runs the parity suiteThe test suite is a hard gate: the personas this extension mints are validated
and tiered by the real @5dive/openagent package, so the scaffold can never
drift from the live schema.
MIT