identity
identity
¶
Identity seeder — creates L1-L4 identity stack for agents.
Each agent gets a four-layer identity
L1 identity.md — Persona core: voice, focus, standing patterns (<900 words) L2 profile.yaml — Extended profile: relationships, stage, affinities (<1500 words) L3 recent.md — Recent activity: hot/warm memory, last cycle's work (<1500 words) L4 growth.md — Growth trajectory: autonomous developments, experiential notes (unbounded)
Location: ~/.mzt/agents/{agent_name}/ — git-tracked, project-independent.
An agent is the same person across projects.
For migration: accepts optional existing memory/meditation paths to distill from.
Classes¶
IdentitySeeder
¶
Creates the L1-L4 identity stack for agents.
The seeder is idempotent: running it on an existing agent directory updates files without corrupting existing identity data. Existing content in L3 (recent) and L4 (growth) is preserved if present.
Source code in src/marianne/compose/identity.py
Functions¶
seed
¶
Create the full identity store for an agent.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
agent_def
|
dict[str, Any]
|
Agent definition dict with keys: name, voice, focus, and optionally: role, meditation, a2a_skills, techniques. |
required |
existing_memory_path
|
Path | None
|
Path to existing memory file for migration (distilled into L3 recent.md). |
None
|
existing_meditation_path
|
Path | None
|
Path to existing meditation file for migration (distilled into L1 stakes/identity). |
None
|
Returns:
| Type | Description |
|---|---|
Path
|
Path to the agent's identity directory. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If agent_def is missing required fields. |
Source code in src/marianne/compose/identity.py
seed_all
¶
Seed identity for all agents in a roster.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
agents
|
list[dict[str, Any]]
|
List of agent definition dicts. |
required |
migration_memory_dir
|
Path | None
|
Directory containing existing memory files
named |
None
|
migration_meditation_dir
|
Path | None
|
Directory containing existing meditation
files named |
None
|
Returns:
| Type | Description |
|---|---|
list[Path]
|
List of paths to agent identity directories. |