{"id":150,"library":"controlflow","title":"ControlFlow (archived — use marvin)","description":"ARCHIVED. ControlFlow was a PrefectHQ agentic workflow framework. The repository was archived on August 22, 2025. Its engine was merged into marvin v3. Last version on PyPI: 0.12.1 (Feb 2025). Do not use for new projects — use marvin instead. The controlflow package still installs from PyPI but receives no updates.","status":"deprecated","version":"0.12.1","language":"python","source_language":"en","source_url":"https://github.com/prefect-archive/ControlFlow","tags":["controlflow","marvin","prefect","agents","deprecated","archived"],"install":[{"cmd":"pip install marvin","lang":"bash","label":"Python (use this instead)"},{"cmd":"pip install controlflow","lang":"bash","label":"Python (archived — do not use for new projects)"}],"dependencies":[{"reason":"ControlFlow required prefect as a core dependency. This caused issues for users who only wanted agent DX without Prefect orchestration — a key reason it was merged into marvin.","package":"prefect","optional":false}],"imports":[{"note":"controlflow is archived. marvin v3 is the direct successor. cf.run → marvin.run, cf.Task → marvin.Task, cf.Agent → marvin.Agent, cf.Memory → marvin.Memory, @cf.flow → marvin.Thread() context manager.","wrong":"import controlflow as cf\n\nresult = cf.run('Write a short poem about AI')\n\n@cf.flow\ndef my_flow():\n    cf.run('step one')\n    cf.run('step two')","symbol":"Migration to marvin","correct":"import marvin\n\n# marvin.run replaces cf.run\nresult = marvin.run('Write a short poem about AI')\nprint(result)\n\n# marvin.Task replaces cf.Task\nfrom marvin import Task, Agent\ntask = Task(instructions='Summarize this text', result_type=str)\n\n# marvin.Thread replaces cf.Flow\nwith marvin.Thread():\n    marvin.run('step one')\n    marvin.run('step two')"}],"quickstart":{"code":"# controlflow is archived — use marvin instead\n# pip install marvin\nimport marvin\n\n# Direct equivalent of controlflow's cf.run\nresult = marvin.run('Write a short poem about artificial intelligence')\nprint(result)","lang":"python","description":"Marvin v3 replacement for ControlFlow."},"warnings":[{"fix":"pip install marvin — marvin v3 supersedes controlflow entirely. All cf.* equivalents exist as marvin.*.","message":"ControlFlow repository archived August 22, 2025. No more updates, bug fixes, or security patches. The controlflow PyPI package still installs but is dead.","severity":"breaking","affected_versions":"all"},{"fix":"Migrate to marvin. No prefect dependency required for agent workflows.","message":"ControlFlow had a hard dependency on prefect which caused version conflicts with prefect 3.0.0. marvin removes this dependency.","severity":"breaking","affected_versions":"controlflow <= 0.12.1"},{"fix":"with marvin.Thread(): marvin.run(...)","message":"@cf.flow decorator removed in marvin v3. Replace with marvin.Thread() context manager.","severity":"breaking","affected_versions":"marvin >= 3.0"},{"fix":"Remove LangChain dependencies. Configure providers via pydantic-ai settings.","message":"ControlFlow used LangChain as its LLM backend. marvin v3 uses Pydantic AI — broader provider support but different configuration patterns.","severity":"gotcha","affected_versions":"marvin >= 3.0"},{"fix":"Replace all 'import controlflow as cf' with 'import marvin'. Map cf.run → marvin.run, cf.Task → marvin.Task, cf.Agent → marvin.Agent.","message":"LLMs trained before mid-2025 will generate controlflow code (import controlflow as cf). This is dead code — redirect to marvin.","severity":"gotcha","affected_versions":"all"},{"fix":"Use a glibc-based Python image (e.g., Debian or Ubuntu) instead of alpine, or ensure that a complete build toolchain and glibc compatibility packages (e.g., `apk add build-base gcc gcompat`) are installed in the alpine environment before attempting to install marvin.","message":"Installation of marvin (or its dependencies, like temporalio, which requires Rust compilation) in alpine environments may fail due to missing system libraries (e.g., libgcc_s.so.1) or linker incompatibilities. This is common with musl libc-based alpine images which may not provide the necessary C/C++ build tools or glibc compatibility required by Rust packages.","severity":"breaking","affected_versions":"marvin >= 3.0"}],"env_vars":null,"last_verified":"2026-05-12T08:54:53.031Z","next_check":"2026-09-24T00:00:00.000Z","problems":[{"fix":"Add explicit imports for the required tools, e.g., `import controlflow.tools.web` and `import controlflow.tools.code` at the top of your file.","cause":"The specific tool modules like `code` or `web` within `controlflow.tools` need to be explicitly imported before being accessed as attributes of `controlflow.tools`.","error":"AttributeError: module 'controlflow.tools' has no attribute 'code'"},{"fix":"Implement robust retry logic with exponential backoff for API calls, check and potentially increase your API service's rate limits, or adjust the frequency and volume of agent tasks to stay within allowed limits.","cause":"The ControlFlow agent is encountering rate limits imposed by the external API it's interacting with (e.g., Tavily), leading to task failures.","error":"Tasks Fail with 'Error 429 - Too Many Requests' when executing a Tavily Agent task from a Deployment"},{"fix":"Align your workflow with Prefect 3.x's 'worker' model and recognize that `controlflow`'s agent-centric features may not be directly compatible or require adaptation. For new projects, consider migrating to `marvin v3`, which incorporated `controlflow`'s engine and is actively maintained.","cause":"The `controlflow` library was designed primarily for Prefect 2.x, where 'agents' were a core concept. In Prefect 3.x, agents have been replaced by 'workers,' causing a mismatch in terminology and operational expectations.","error":"Confusion or issues using 'ControlFlow agent' concepts with Prefect 3.x"},{"fix":"For any new development, use `marvin v3` or its current successor, as it provides the updated and actively maintained agentic workflow framework that evolved from `controlflow`.","cause":"The `controlflow` library is officially archived and no longer receives updates or support; its core engine has been merged into `marvin v3`. Using an archived library for new development can lead to unpatched bugs and compatibility issues.","error":"General problems or lack of support when using `controlflow` for new projects"}],"ecosystem":"pypi","meta_description":null,"install_score":38,"install_tag":"stale","quickstart_score":23,"quickstart_tag":"stale","pypi_latest":null,"install_checks":{"last_tested":"2026-05-12","tag":"stale","tag_description":"widespread failures or data too old to trust","results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":6.38,"mem_mb":77.8,"disk_size":"583M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":8.45,"mem_mb":84.5,"disk_size":"624M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":9.17,"mem_mb":82.9,"disk_size":"609M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":8.46,"mem_mb":85.7,"disk_size":"607M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":7.84,"mem_mb":77.9,"disk_size":"147.6M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":7.61,"mem_mb":77.9,"disk_size":"218M"}]},"quickstart_checks":{"last_tested":"2026-04-23","tag":"stale","tag_description":"widespread failures or data too old to trust","results":[{"runtime":"python:3.10-alpine","exit_code":1},{"runtime":"python:3.10-slim","exit_code":0},{"runtime":"python:3.11-alpine","exit_code":1},{"runtime":"python:3.11-slim","exit_code":0},{"runtime":"python:3.12-alpine","exit_code":1},{"runtime":"python:3.12-slim","exit_code":0},{"runtime":"python:3.13-alpine","exit_code":1},{"runtime":"python:3.13-slim","exit_code":0},{"runtime":"python:3.9-alpine","exit_code":1},{"runtime":"python:3.9-slim","exit_code":1}]}}