CoolFace
Apppublic

abyXsmart/A.I-Migration-Code-Generator

sourceHugging Facemitupdated 3mo agoView on Hugging Face
0likes
README.md113 linesDownload Raw Back to root
1---2license: mit3title: A.I Agent - State Migration Handoff4sdk: docker5emoji: ๐Ÿš€6colorFrom: purple 7colorTo: indigo8pinned: true9short_description: Get a Live Import Code/Token10---11 12<!--13========================================================================14METADATA LOCK - DO NOT EDIT THE BLOCK ABOVE15------------------------------------------------------------------------16The YAML front matter between the two `---` lines at the very top of this17file is Hugging Face Spaces configuration metadata. It MUST remain exactly18as written.19 20INSTRUCTION FOR ANY HUMAN OR AI AGENT:21- Do NOT modify, reorder, reformat, translate, or remove any field in the22  metadata block above.23- Do NOT change title, sdk, emoji, colors, license, pinned, or24  short_description.25- You may freely edit ONLY the documentation content BELOW this notice.26Altering the metadata will break the Hugging Face Space deployment.27========================================================================28-->29 30# A.I Agent State Migration Handoff31 32A FastAPI web app that builds a structured agent migration bundle entirely in33memory, uploads it to the SC Agent Migration Relay, and returns a live import34code and download token. You paste the generated prompt into Starchild (or any35compatible agent) to import the migrated state via the `agent-import` skill.36 37## What It Does38 391. Builds a `migration/` bundle as an in-memory `tar.gz` (nothing is written to40   disk, so it runs cleanly on ephemeral or read-only hosts like Hugging Face41   Spaces).422. Uploads the raw bytes to the relay endpoint and reads back a one-time `code`43   and `download_token`.443. Renders a clean, copy-ready import prompt and a checklist of exactly what was45   packed.46 47## Memory Modes48 49- **Strategy Profile** - packs the full FVG-Delta strategy memory, identity,50  soul directives, and Stage 3 / Stage 4 monitoring tasks.51- **Plain Clean Profile** - a neutral, generic bundle with no strategy-specific52  content, for conversations unrelated to your strategy.53- **Custom Memory** - paste text or upload a file (`.md`, `.txt`, `.pdf`, and54  other text-based formats). The content is parsed and packed as declarative55  memory. PDFs are text-extracted; if a PDF has no extractable text, typed56  fallback text is used.57 58## Bundle Structure59 60```61migration/manifest.json62migration/memory/agent.json63migration/memory/user.json64migration/identity/profile.json65migration/identity/soul.md66migration/user/settings.json67migration/tasks/tasks.json68migration/env/keys.json69```70 71The root is always flat (`migration/*`) to stay compatible with the importer.72Identity uses native fields (`name`, `vibe`, `emoji`, `creature`), user settings73include `timezone` / `language` / `what_to_call`, and memory files are74declarative lists ready to be added as memory entries.75 76## Environment Keys77 78`migration/env/keys.json` ships with `STARCHILD_API_KEY` and79`AGENT_MIGRATION_TOKEN`. By default values are empty (the importer will request80them securely). You may optionally embed values from the UI, or the server will81fall back to its own environment variables when embedding is enabled.82 83## Rate Limiting84 85The relay is rate limited. The backend retries transient `429` responses, and86the UI shows a live cooldown countdown before re-enabling generation.87 88## Run Locally89 90```bash91pip install -r requirements.txt92uvicorn app:app --host 0.0.0.0 --port 786093```94 95Then open `http://localhost:7860`.96 97## Deploy On Hugging Face Spaces98 99Create a new Space with the **Docker** SDK and push these three files100(`Dockerfile`, `requirements.txt`, `app.py`) plus this `README.md`. The Space101listens on port `7860`. Keep the metadata block at the top of this file intact.102 103## Files104 105- `app.py` - FastAPI backend, in-memory bundler, relay client, and the106  single-file dashboard UI.107- `requirements.txt` - Python dependencies.108- `Dockerfile` - container build for Hugging Face Spaces (port 7860).109 110## License111 112MIT.113