mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-12-04 12:08:11 +00:00
Walk through Pi, Hermes Agent and Claude Code exports, imports, separate working-file uploads and continued tasks using real CLI sessions. Add built-in chat and message search instructions and optimized neutral captures. Preserve Claude custom titles and keep tool-result blocks in historical tools instead of duplicating them as user messages. Retain unmatched results and error markers, including coverage through the shared OpenClaw parser. Validation: 28 migration tests and 11 subtests; six live imports into three projects; three completed continuations; two booking tests; documentation links, image privacy checks and rendered previews.
2.7 KiB
2.7 KiB
Migrate Agents DOX
Purpose
- Own the bundled workflow for previewing and importing retained work from Pi, OpenClaw, Hermes Agent, OpenCode, Claude Code, and Codex.
Ownership
helpers/migration.pyowns source parsing, redaction, limits, preview data, and native chat conversion.api/migration_preview.pyowns read-only upload inspection;api/migration_import.pyowns confirmed writes.webui/owns source selection, upload, review, consent, and progress UI.tests/owns parser, privacy, archive-safety, native-chat, project, and import-helper regression coverage.
Local Contracts
- The bundled folder, manifest name, Python imports, and HTTP routes use
_migrate_agents. - Preview must not write Agent Zero state. Import starts only after explicit category selection and review consent.
- Credentials, authentication state, hidden reasoning, schedules, live services, and replayable tool execution stay excluded.
- Imported knowledge and skills remain namespaced below
usr/knowledge/_migrate_agents/andusr/skills/_migrate_agents/. - Preserve source provenance and do not claim transcript metadata can reconstruct unavailable project files.
- Store native chat provenance in
data.migrate_agents; underscore-prefixed context data is transient and stripped by chat persistence. - Claude Code imports retain the latest non-empty custom title for the matching session, with a fallback for title records lacking a session ID. Tool-result blocks belong to historical tools, never extra user turns; unmatched results and error markers remain visible as historical records before any follow-up user text in the same message.
- Pi JSONL versions 1–3 preserve retained public history as separate branch chats, with shared ancestors repeated. Validate parent links and bound branch expansion before normalization. Do not replay system messages, reasoning, compaction/branch summaries, context edits, extension records, or context-excluded shell commands; report omitted context records. Image bytes become omission markers. Tool arguments, results, errors, and public shell records use the shared redaction and inert-history path.
Work Guidance
- Extend the shared parser and redaction path instead of adding source-specific import side channels.
- Keep source commands, supported artifacts, exclusions, and mapping limits accurate in both WebUI copy and README.
- Keep bundled harness assets local and update
webui/assets/ATTRIBUTION.mdwhen their provenance changes.
Verification
- Run
conda run -n a0 python -m pytest plugins/_migrate_agents/tests -q. - For WebUI changes, verify the mounted modal and upload flow against the named live Agent Zero runtime.
Child DOX Index
No child DOX files.