The Egg Format¶
Data model¶
An Egg has core modules and standard artifact fields, defined in pynydus.api.schemas:
Module |
Class |
Contents |
|---|---|---|
Manifest |
|
Nydus version, egg spec version ( |
Skills |
|
List of |
MCP |
|
Raw MCP server configs as |
Memory |
|
List of |
Secrets |
|
List of |
egg.skills.skills # list[AgentSkill]
egg.mcp.configs # dict[str, dict[str, Any]]
egg.memory.memory # list[MemoryRecord]
egg.secrets.secrets # list[SecretRecord]
# Standard artifact fields (populated during spawn)
egg.a2a_card # dict | None — A2A agent card
egg.agents_md # str | None — per-egg AGENTS.md deployment runbook
egg.apm_yml # str | None — passthrough APM manifest
egg.spec_snapshots # dict[str, str] | None — embedded spec snapshots
The .egg archive format¶
A packed Egg is a ZIP file:
agent.egg
├── manifest.json Manifest metadata (neutral fields, versions, redaction policy)
├── memory.json Memory records (labeled)
├── secrets.json Secret/PII placeholders + injection metadata
├── skills/
│ └── <slug>/
│ └── SKILL.md Skill content (YAML front matter + Markdown, agentskills.io)
├── nydus.json Skill slug → {id, agent_type} mapping
├── mcp.json MCP server configs (Claude Desktop format)
├── agent-card.json A2A agent card (passthrough or generated)
├── AGENTS.md Per-egg deployment runbook
├── apm.yml APM manifest (passthrough from source, if present)
├── specs/
│ ├── manifest.json Spec version manifest (Nydus version, spec sources)
│ ├── mcp.md MCP spec snapshot
│ ├── agentskills.md Agent Skills spec snapshot
│ ├── a2a.md A2A spec snapshot
│ ├── apm.md APM spec snapshot
│ └── agents.md AGENTS.md spec snapshot
├── raw/
│ └── ... Redacted source files (for passthrough mode hatch)
├── spawn_log.json Pipeline event log
├── signature.json Ed25519 signature (optional)
└── Nydusfile Copy of the workspace Nydusfile
Standard artifacts¶
File |
Standard |
Notes |
|---|---|---|
|
Claude Desktop format: |
|
|
YAML frontmatter + Markdown body. |
|
|
Passthrough-first: if source has |
|
|
Pure passthrough — Nydus copies but never parses or validates. |
|
|
Generated deployment runbook with prerequisites, hatch instructions, secrets, and skills. |
|
|
— |
Embedded spec snapshots for self-sustained eggs. |
Manifest fields¶
manifest.json contains top-level Egg metadata:
Field |
Type |
Description |
|---|---|---|
|
string |
PyNydus version that created this Egg |
|
string |
Minimum PyNydus version required to open this Egg (default |
|
string |
Egg format spec version ( |
|
ISO 8601 |
Timestamp of Egg creation |
|
string |
Source platform ( |
|
string or null |
Human-readable agent name (cross-platform neutral) |
|
string or null |
Agent description (cross-platform neutral) |
|
string or null |
LLM model identifier (e.g. |
|
int or null |
Context window size in tokens |
|
string or null |
Embedding model identifier |
|
string or null |
Original source directory path |
|
string |
Ed25519 signature (empty if unsigned) |
|
string or null |
|
|
object |
|
|
list |
At most one |
Memory record schema¶
Each entry in memory.json is a MemoryRecord:
Field |
Type |
Description |
|---|---|---|
|
string |
Stable ID ( |
|
string |
Record content (with placeholders, not real secrets) |
|
string |
One of |
|
string |
Source platform that produced this record |
|
string |
Original source file (e.g., |
|
string or null |
Associated skill ID (if this memory relates to a skill) |
|
ISO 8601 or null |
When this memory was created or last updated |
|
bool |
Whether this record can be shared (default |
Example:
{
"id": "mem_001",
"text": "I am a travel planning assistant. My name is {{PII_001}}.",
"label": "persona",
"agent_type": "openclaw",
"source_store": "SOUL.md",
"skill_ref": null,
"timestamp": null,
"shareable": true
}
Secret record schema¶
Each entry in secrets.json is a SecretRecord:
Field |
Type |
Description |
|---|---|---|
|
string |
Stable ID ( |
|
string |
The token in file content ( |
|
string |
|
|
string or null |
Entity type for PII records (e.g., |
|
string |
Human-readable name used as |
|
bool |
If |
|
string |
How the value is substituted ( |
|
string |
What was redacted |
|
bool |
Always |
|
list |
Source files containing this placeholder |
Example:
{
"id": "secret_001",
"placeholder": "{{SECRET_001}}",
"kind": "credential",
"pii_type": null,
"name": "AWS_ACCESS_KEY_ID",
"required_at_hatch": false,
"injection_mode": "env",
"description": "",
"value_present": false,
"occurrences": ["config.json"]
}
raw/ directory¶
The raw/ directory in the archive contains the redacted source files as
they appeared after Step 3 of the spawn pipeline (post-redaction, pre-parsing).
All real secrets and PII have been replaced with placeholders.
This directory is used for passthrough hatching, where the original file structure is replayed verbatim instead of being regenerated from structured modules.
raw/ is populated during spawn() and written during save(). When loading
an Egg with load(path, include_raw=False), this directory is skipped for
faster loading.
API reference¶
See Data Models for the full Pydantic model reference.