Skip to main content

Framework-neutral persona object protocol for agent runtimes.

Project description

Persona Object Protocol (POP)

CI PyPI Python DOI Release License

A lightweight draft protocol for portable persona objects in multimodal AI systems

POP is a lightweight public draft for representing portable persona objects with explicit boundaries. POP is a framework-neutral persona object protocol for agent runtimes. It is positioning-first and protocol-oriented: not a product, not a persona generation pipeline, and not a full runtime stack.

Preferred scholarly citation for POP is the POP-Core paper: 10.5281/zenodo.18907957.

The repository itself is separately archived on Zenodo at 10.5281/zenodo.18898252 for version-specific software citation.

For minimal citation guidance, see docs/cite-pop.md.

Digital Biosphere Ecosystem

This repository is part of the Digital Biosphere Architecture.

Architecture overview: digital-biosphere-architecture

Positioning

  • POP is not a full agent framework.
  • POP is not a prompt template library.
  • POP is not a memory or permissions system.
  • POP focuses on portable persona objects and adapter-based runtime projection.

Ecosystem Direction

  • LangChain integration
  • CrewAI projection
  • Microsoft Agent Framework exploration
  • LlamaIndex exploration

For the current ecosystem plan, see docs/pop-ecosystem-roadmap.md. For the adapter strategy, see docs/pop-adapter-model.md.

Runtime Adapter Layer

The runtime-facing adapter surface is documented in docs/runtime-adapters.md. The current LangChain and CrewAI adapters are early-preview scaffolds that bind canonical POP persona objects to runtime-oriented representations without changing the schema baseline.

Runtime Integrations (Early Preview)

LangChain integration scaffolds are available through the optional langchain extra, and CrewAI integration scaffolds are available through the optional crewai extra. The canonical schema baseline remains v0.1.0 while runtime-facing binding surfaces continue to evolve.

Install examples:

pip install "pop-persona[langchain]"
pip install "pop-persona[crewai]"

Example scripts:

Execution-Layer Helpers (Early Preview)

LangChain execution helpers are available through optional runtime integration surfaces, and CrewAI execution helpers are available through optional runtime integration surfaces. The canonical schema baseline remains v0.1.0.

Execution-layer examples:

Portability Demo

An early cross-runtime portability scaffold is available at examples/cross-runtime-persona-portability/README.md.

Canonical JSON Schema

POP provides a canonical JSON Schema for persona objects at schema/pop-persona.schema.json. The current schema is an early preview intended to define the core structural boundary of a POP persona object. Within that boundary, persona remains separate from memory, tools, and permissions.

schema/pop-persona.schema.json is the current preview alias. schema/versions/ contains versioned historical snapshots, and those versioned schemas are the normative references for stable review and comparison.

Valid and invalid fixtures are maintained under fixtures/valid/ and fixtures/invalid/ to support strict validation and protocol regression testing.

Release Baseline

v0.1.0 is the first tagged baseline release for POP. Versioned schemas under schema/versions/ are the normative snapshots, while the current alias continues to track the latest preview surface.

TestPyPI smoke and Trusted Publishing setup are part of the release-readiness path for this baseline.

For the current public packaging position, see docs/releases/v0.1.1-announcement.md. The runtime adapter release is documented at docs/releases/v0.1.2-release-notes.md. The current execution-layer release is documented at docs/releases/v0.1.3-release-notes.md. Execution-layer planning remains available in docs/releases/v0.1.3-plan.md.

TestPyPI and Trusted Publishing

TestPyPI is used for first publication smoke validation. Trusted Publishing is planned through GitHub Actions with OIDC, and real PyPI publication follows successful smoke validation and release discipline.

PyPI Publication Path

Real PyPI publication is prepared through a dedicated GitHub Actions workflow and a separate pypi environment. The recommended order is: configure the PyPI Trusted Publisher, dispatch the PyPI publish workflow, and then validate installation from the public PyPI index in a clean virtual environment.

Python SDK (Early Preview)

A minimal Python SDK is provided as an early preview for loading, validating, and projecting canonical POP persona objects.

Install from the repository root:

pip install -e .

Strict schema validation is available through an optional dependency:

pip install -e '.[schema]'
pip install "pop-persona[schema]"

For package build and release-readiness checks:

pip install -e '.[dev,schema]'

CLI example:

pop-inspect examples/cross-runtime-persona-portability/personas/lawyer_persona.json
pop-inspect --list-schema-versions
pop-inspect --strict-schema examples/cross-runtime-persona-portability/personas/lawyer_persona.json

Core installation provides lightweight inspection. Strict schema validation requires the optional schema extra.

TestPyPI smoke example:

python -m pip install --index-url https://test.pypi.org/simple/ \
  --extra-index-url https://pypi.org/simple "pop-persona[schema]"

Python API example:

from pop import load_persona, validate_persona
from pop.projections import project_to_crewai, project_to_langchain

persona = load_persona(
    "examples/cross-runtime-persona-portability/personas/lawyer_persona.json"
)
validate_persona(persona)

langchain_view = project_to_langchain(persona)
crewai_view = project_to_crewai(persona)

POP-Core Paper

Zhang, B. (2026). POP-Core: Formal Semantics and Interoperability of Portable Persona Objects. Zenodo. https://doi.org/10.5281/zenodo.18907957

What POP is

POP defines a minimal object layer for packaging persona definitions in a portable and inspectable form. It focuses on persona object representation, plugin attachment entry points, separation from memory and permissions, and basic governance boundaries.

What POP solves

POP provides a minimal shared structure for describing persona objects across systems. Its purpose is to keep persona definitions distinct from memory stores, capability grants, and application-specific orchestration logic.

Scope

POP v0.1 covers:

  • a minimal persona core
  • optional memory hook declarations
  • optional plugin manifest declarations
  • explicit safety and governance boundaries
  • simple draft version labeling

Non-goals

POP is not:

  • a full personality generation system
  • a model training or fine-tuning method
  • a robotics stack
  • a digital immortality framework
  • a universal cross-model persona injection method
  • a substitute for permission, identity, or memory systems

Minimal structure

A POP object is intentionally small. The reference structure in this repository includes:

  • schema_version for draft compatibility
  • id, name, and description for identity and positioning
  • traits, anchors, and behavior for the persona core
  • memory_hooks as references to separate memory subsystems
  • plugins as declarative attachment entry points

The object does not embed long-term memory, permission grants, or execution policy.

Relationship to adjacent work

POP complements adjacent work on persona steering, persona consistency, agent tooling, and agent security. It does not replace those areas. Its role is narrower: to define a portable persona object layer that other systems can interpret, constrain, or extend.

For external messaging and positioning copy, see docs/communication-kit.md.

Repository structure

.
├── .zenodo.json
├── CITATION.cff
├── LICENSE
├── README.md
├── adapters
│   ├── crewai
│   ├── langchain
│   ├── llamaindex
│   └── microsoft-agent-framework
├── docs
│   ├── README.md
│   ├── cite-pop.md
│   ├── communication-kit.md
│   ├── pop-adapter-model.md
│   ├── pop-ecosystem-roadmap.md
│   └── short-outreach-kit.md
├── examples
│   ├── cross-runtime-persona-portability
│   ├── caregiver.persona.json
│   ├── companion.persona.json
│   └── mentor.persona.json
├── schema
│   └── persona.schema.json
└── spec
    └── pop-0.1.md

Status

This repository contains a positioning-first v0.1.0-draft. It is a draft protocol, not a stable standard, and not a guarantee of high-fidelity persona transfer across models or products.

For a forward-looking RFC-style core draft, see spec/POP-core.md. For the draft canonical JSON binding, see spec/POP-json-binding.md and schema/pop.schema.json. For minimal runtime integration patterns, see docs/interop.md.

CLI

The repository now includes a minimal reference CLI for POP:

python3 -m pip install -e .
pop validate examples/mentor.v1.json
pop project examples/mentor.v1.json --runtime prompt
pop migrate-pop01 examples/mentor.persona.json

For direct local execution without installation:

python3 cli/pop_cli.py validate examples/mentor.v1.json

LangChain Integration

POP now includes a first runtime integration for LangChain:

python3 -m pip install -e ".[langchain]"
python3 examples/langchain_agent.py examples/mentor.v1.json --print-config

Middleware-oriented preview package:

python3 examples/langchain_middleware_demo.py --print-config

The installed package exposes langchain_pop as a middleware-oriented preview layer for LangChain agents. It injects the POP-derived system prompt, preserves persona identity in runtime state, and filters tools against POP boundaries.

An extraction-ready standalone package scaffold is available at integrations/langchain-pop.

If you have OPENAI_API_KEY configured, you can invoke a live LangChain agent:

python3 examples/langchain_agent.py examples/mentor.v1.json --model gpt-4.1-mini
python3 examples/langchain_middleware_demo.py --invoke --model gpt-4.1-mini

Package API:

from pop_protocol.adapters.langchain import create_langchain_agent, pop_to_langchain_config
from langchain_pop.agent import create_pop_agent
from langchain_pop.middleware import POPMiddleware

CI And Packaging

The repository includes a GitHub Actions workflow at .github/workflows/validate.yml that:

  • validates all JSON example objects with pop validate
  • builds the Python distribution with python -m build

Typical local packaging commands:

python3 -m pip install -e .
python3 -m pip install build
python3 -m build

The repository includes dedicated TestPyPI and PyPI trusted publishing workflows under .github/workflows/, and package publication now follows tagged release and smoke-validation discipline.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pop_persona-0.1.3.tar.gz (31.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pop_persona-0.1.3-py3-none-any.whl (32.7 kB view details)

Uploaded Python 3

File details

Details for the file pop_persona-0.1.3.tar.gz.

File metadata

  • Download URL: pop_persona-0.1.3.tar.gz
  • Upload date:
  • Size: 31.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pop_persona-0.1.3.tar.gz
Algorithm Hash digest
SHA256 51fc27a26dff54fd55df8dc8380919cefc1cd65037f7ed4bc6eadd1e7efd684b
MD5 60efeac986db43558e28c8bb46de7b40
BLAKE2b-256 db26bc7255c208ef3daef424c703136b20784a3f13eb8412648e20d82fe5e3b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for pop_persona-0.1.3.tar.gz:

Publisher: pypi-publish.yml on joy7758/persona-object-protocol

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pop_persona-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pop_persona-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 32.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pop_persona-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e126c471fae0ac8a329a594ee7f83dbacc163c2430f5dac841f0cd949272c16b
MD5 dea4a73c27a441cdaa4882d6f4bf1eb1
BLAKE2b-256 0544e449db19f3a3360169f1fc77362a23e432f0a97f12ccc2028c39108edb78

See more details on using hashes here.

Provenance

The following attestation bundles were made for pop_persona-0.1.3-py3-none-any.whl:

Publisher: pypi-publish.yml on joy7758/persona-object-protocol

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page