Skip to content

feat: add Pi Coding Agent rollout seed source #513

@johnnygreco

Description

@johnnygreco

Summary

Add support for ingesting Pi Coding Agent session artifacts as an agent rollout seed source.

Pi sessions are tree-structured JSONL files stored at ~/.pi/agent/sessions/. The handler resolves the active conversation path by walking from the last entry back to the root via id/parentId links, then normalizes all message types into the shared rollout schema.

Key design points

  • Tree-structured sessions — Pi is the first format with in-place branching; the handler resolves the active path automatically
  • Entry-level typesmodel_change, compaction, branch_summary, custom_message, and thinking_level_change are handled alongside message entries
  • Message rolesuser, assistant (with inline ToolCall/ThinkingContent/TextContent blocks), toolResult, bashExecution (synthesized as tool-call pairs), custom, compactionSummary, branchSummary
  • Shared utility — extracted normalize_message_content to utils.py (was duplicated in Hermes handler)

Format reference

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions