{"id":2371,"library":"adagio","title":"Adagio - DAG IO Framework","description":"Adagio is a lightweight Python framework for building and managing Directed Acyclic Graphs (DAGs), particularly for data orchestration within Fugue projects. It provides abstractions for defining tasks and composing them into execution flows. Current version is 0.2.6. Releases are infrequent, often coinciding with Fugue updates, focusing on stability and compatibility.","status":"active","version":"0.2.6","language":"en","source_language":"en","source_url":"https://github.com/fugue-project/adagio","tags":["dag","workflow","etl","data orchestration","fugue"],"install":[{"cmd":"pip install adagio","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Provides core utilities and type checking support.","package":"triad","optional":false}],"imports":[{"symbol":"Flow","correct":"from adagio.core import Flow"},{"symbol":"DAG","correct":"from adagio.dag import DAG"},{"symbol":"Task","correct":"from adagio.core import Task"}],"quickstart":{"code":"from adagio.dag import DAG\nfrom adagio.core import Flow, Task\nfrom typing import Any, Dict\n\n# Define simple tasks as functions\ndef add_one(value: int) -> int:\n    return value + 1\n\ndef multiply_by_two(value: int) -> int:\n    return value * 2\n\n# Wrap functions as Adagio Tasks, defining input and output names\ntask1 = Task(add_one, \"add_task\", input_names=[\"initial_value\"], output_names=[\"result_add\"])\ntask2 = Task(multiply_by_two, \"mul_task\", input_names=[\"result_add\"], output_names=[\"final_result\"])\n\n# Build the DAG by adding tasks and defining edges (dependencies)\ndag = DAG()\ndag.add_task(task1)\ndag.add_task(task2)\ndag.set_edge(\"add_task\", \"mul_task\") # Connect tasks: output 'result_add' from task1 becomes input 'result_add' for task2\n\n# Define initial data for the DAG execution\ninitial_data = {\"initial_value\": 5}\n\n# Create a Flow and execute the DAG\nflow = Flow(dag)\nresult = flow.run(initial_data)\n\n# Access results\nprint(f\"Initial value: {initial_data['initial_value']}\")\nprint(f\"After add_one: {result['result_add']}\")\nprint(f\"Final result: {result['final_result']}\")\nassert result['final_result'] == 12","lang":"python","description":"This quickstart demonstrates how to define two simple tasks, compose them into a DAG with dependencies, and execute the DAG using Adagio's `Flow`. It shows how to pass initial data and retrieve the final results."},"warnings":[{"fix":"Understand its core purpose as a Fugue-centric DAG framework. For broader, more feature-rich general DAG solutions, consider alternatives like Apache Airflow, Prefect, or Metaflow.","message":"Adagio is primarily designed as an internal component for the Fugue project. While it can be used standalone for DAG management, its API and feature set might be more opinionated and less extensive than other general-purpose DAG libraries.","severity":"gotcha","affected_versions":"All 0.x.x"},{"fix":"Always consult release notes for each new minor version. Pin your Adagio version to a specific minor release (e.g., `adagio==0.2.*`) and test thoroughly before upgrading across minor versions.","message":"Being in a 0.x.x version, Adagio's API is subject to change in minor releases (e.g., 0.1.x to 0.2.x). While efforts are made to minimize disruption, direct API methods or behavior might be altered without a major version increment.","severity":"breaking","affected_versions":"All 0.x.x"},{"fix":"Thoroughly double-check the `input_names` and `output_names` specified in `Task` definitions. Ensure `set_edge` correctly translates upstream outputs to downstream inputs, matching names precisely.","message":"Connecting tasks requires careful mapping of output names to input names using the `Task` constructor (`output_names` parameter) and `DAG.set_edge()`. Mismatches will result in runtime errors due to missing inputs for downstream tasks, which can be hard to debug.","severity":"gotcha","affected_versions":"All 0.x.x"}],"env_vars":null,"last_verified":"2026-04-10T00:00:00.000Z","next_check":"2026-07-09T00:00:00.000Z"}