This release is a pre-release and may not be stable for production use.
Migration Agent — experimental alpha
Alpha (
0.1.0a1). Research prototype for evidence-backed dependency-migration assistance. It does not autonomously migrate arbitrary repositories.
Migration Agent helps upgrade a pinned Python dependency across a major version. It discovers the pinned source version, finds affected call sites, plans and applies mechanical edits in a working copy, validates the result, and reports every usage disposition with cited documentation.
Install
pip install migration-agent
Requires Python 3.12+. Runtime dependencies: none; the package uses only the standard library.
How it works
Fixed, auditable pipeline — discovery → knowledge → affected-code search → planning → transformation → validation → completeness → report:
- Dynamic knowledge acquisition. For version paths without built-in rules,
the agent searches for official migration docs (preferring authoritative
sources), fetches the pages, and extracts
MigrationChangeobjects from page bodies — never from search snippets. - Evidence-backed changes. Every change carries document, section, verbatim excerpt, and URL, preserved through to the final report.
- Safe by default. The original repo is never modified (edits happen in a
working copy); unknown versions yield an explicit
unsupportedresult; ambiguous usages are planned asLLM_ASSISTEDand left pending. - Complete accounting. Every usage gets a disposition (
MIGRATED,NOT_MIGRATED,SKIPPED,FAILED,MANUAL_REVIEW); the outcome (SUCCESS,PARTIALLY_MIGRATED,BLOCKED,FAILED,NO_MIGRATION_REQUIRED) is derived from them.
Built-in knowledge covers Pydantic 1.x → 2.x; other paths use the web
backend (injectable via set_backend() for tests).
Example
Library API — there is no CLI. Full pipeline in one snippet:
from pathlib import Path
from migration_agent import (
acquire_migration_knowledge,
create_migration_plan,
discover_affected_usages,
discover_migration,
execute_transformation_plan,
execute_validation,
generate_report,
verify_completeness,
)
repo = Path("./my-repo")
spec = discover_migration(repo, technology="pydantic", target_version="2")
knowledge = acquire_migration_knowledge(spec)
if not knowledge.supported:
print("reason:", knowledge.reason)
else:
usages = discover_affected_usages(repo, knowledge.changes)
plan = create_migration_plan(spec, knowledge.changes, usages)
result = execute_transformation_plan(plan)
validation = execute_validation(result.working_copy, usages, knowledge.changes)
completeness = verify_completeness(usages, result, validation, spec)
report = generate_report(completeness)
print("outcome:", report.outcome)
Limitations
- Knowledge-source verification needs strengthening: the web backend can accept a similarly named project's docs (observed: Django REST Framework notes for a Django query) — check evidence URLs.
- Text-only usages are planned as
LLM_ASSISTEDand left pending; the executor never guesses. Behaviour-only changes without code patterns are not discovered. - Multi-file migrations may be partial; string/docstring text matches can be flagged as candidates; exact-match transformation can fail on conflicting patterns.
Metadata
Release files for migration-agent 0.1.0a2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| migration_agent-0.1.0a2.tar.gz | 61.4 kB | With provenance | Details for migration_agent-0.1.0a2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| migration_agent-0.1.0a2-py3-none-any.whl | Python 3 | none | any | Details for migration_agent-0.1.0a2-py3-none-any.whl |
Total release size: 109.0 kB
Release files / migration_agent-0.1.0a2.tar.gz
| Download URL | migration_agent-0.1.0a2.tar.gz |
|---|---|
| Size | 61.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a72401511d65dc5ab7ec0dfd9572144903cf5b6f1c8f38c95a10dd22588487a3
|
|
BLAKE2b-256 checksum How to use checksums |
8f7381da3a3690038d8f3e4f81f69ff720c4ee7eb3bb789d559e92f9663888e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.
Transparency logRelease files / migration_agent-0.1.0a2-py3-none-any.whl
| Download URL | migration_agent-0.1.0a2-py3-none-any.whl |
|---|---|
| Size | 47.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4645c77a49f28f2e8fbf655a76b7cc7737011e7fada91523f0a808021d42c97b
|
|
BLAKE2b-256 checksum How to use checksums |
ac84acb4ecb766d1a14a3bc66c1c92557fcd3a3d538683e5f9c3559483153af9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.
Transparency logSecurity for migration-agent 0.1.0a2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for migration_agent-0.1.0a2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.