Skip to content

v0.6: Character Profiles And Visual Identity [CORE COMPLETED]

Implementation Status

  • [x] CharacterProfile model exists.
  • [x] CharacterStore can save, load, list, and create a default active profile.
  • [x] ContextBuilder renders a stable # Character Profile prompt section.
  • [x] /profile can inspect and list character profiles.
  • [x] Global visual/selfie configuration and OpenAI-compatible image proxy support exist.
  • [ ] Profile switching is not fully wired into live AgentLoop session isolation.
  • [ ] SelfieTool still receives global visual config; profile-level visual override/merge is not fully wired.
  • [ ] Reviewable profile diffs are not implemented.

Goal

Make the agentic character layer explicit and first-class.

User Outcome

The owner can define and inspect character profiles with stable identity, voice, boundaries, relationship model, channel behavior, visual identity, and proactive behavior policy. Full live switching isolation remains follow-up work.

Scope

  • Add character profile files.
  • Support profile switching for multiple characters.
  • Add visual provider config per profile.
  • Support OpenAI-compatible proxy image generation.
  • Support local/reference image roots.
  • Add prompt templates for selfie, mirror, avatar, outfit, and scene.
  • Add identity anchor fields.
  • Add fallback behavior when image provider fails.
  • Keep examples generic; do not bake a private character into docs or defaults.
  • Add owner-visible profile diffs when learning proposes identity changes.

Profile Fields

  • name
  • role
  • voice/tone
  • boundaries
  • relationship model
  • channel behavior
  • visual identity config
  • proactive behavior policy
  • tool policy
  • memory policy

Module Targets

  • backend/agent/g_agent/character/profile.py
  • backend/agent/g_agent/character/store.py
  • backend/agent/g_agent/character/visual.py
  • backend/agent/g_agent/agent/tools/selfie.py
  • backend/agent/g_agent/config/schema.py
  • Character/profile coverage is currently spread across command, profile, and visual tests; dedicated test_character_profile.py and test_visual_identity.py are still useful follow-ups.

Acceptance Criteria

  • [x] Runtime loads a default character profile.
  • [x] Profile context appears in a stable prompt section.
  • [ ] Profile validation errors are fully covered by dedicated tests.
  • [ ] Visual generation reads profile-level identity settings.
  • [ ] Profile switching does not mix session history accidentally.
  • [ ] Profile diffs can be reviewed before apply.

References

  • Main roadmap Phase 5.
  • Existing visual/selfie tool.

Agent Handoff

Current G-Agent State

  • Identity is currently split across workspace bootstrap files, markdown memory, ContextBuilder._get_static_identity(), ContextBuilder._build_persona_priming(), visual config, and MemoryStore.PROFILE.md.
  • ContextBuilder._build_persona_priming() contains a private/default persona example. This must not be the long-term generic product default.
  • character/profile.py, character/store.py, and character/visual.py now exist.
  • SelfieTool still reads visual identity from global config, not a merged per-character profile config.

Implementation Strategy

Add character profile as a new layer without breaking existing config.

Recommended shape:

  • character/profile.py: Pydantic models.
  • character/store.py: load/save/list profiles under workspace or data dir.
  • character/context.py: render profile into prompt section.
  • character/visual.py: map profile visual fields to VisualIdentityConfig.

Implementation Slices

  1. Add CharacterProfile model.
  2. Add default profile loader.
  3. If no profile exists, create a generic non-private default.
  4. Import existing memory/PROFILE.md as owner profile notes, not identity authority.
  5. Update ContextBuilder.
  6. Add stable # Character Profile section.
  7. Keep bootstrap files for compatibility.
  8. Update visual config path.
  9. Profile visual settings override or merge with global visual.
  10. Add /profile.
  11. View active profile.
  12. Later: switch/list/edit.

Profile Fields

Minimum:

  • id
  • name
  • kind
  • role
  • voice
  • boundaries
  • relationship_model
  • visual_identity
  • channel_behavior
  • proactive_policy
  • tool_policy
  • memory_policy

Tests

  • test_character_profile.py
  • default profile creation
  • validation errors
  • load/save/list
  • profile id safety
  • test_character_context.py
  • prompt section stable
  • profile content fenced as configuration, not user input
  • test_visual_identity.py
  • profile visual config maps to selfie tool config.

Guardrails

  • Do not bake a private character into defaults.
  • Do not remove existing workspace bootstrap files in first PR.
  • Do not mix profile identity with owner facts; owner facts belong in memory.

First PR Boundary

Profile model/store + default loading + prompt section + /profile read-only.