In Airflow, XCom is implemented as a key-value store that's accessible to all tasks in a DAG. When a task wants to share data with other tasks, it can use the xcom_push method to store a value in XCom. Other tasks can then use the xcom_pull method to retrieve that value.
This is distinct from passing data between functions in a standard Python script. In Airflow, tasks often run on different machines (workers) at different times, so standard memory variables cannot be shared. XCom bridges this gap. airflow xcom exclusive
Airflow automatically pushes a task’s return value as an XCom with key return_value . For exclusivity, return only a primitive or a small dictionary. In Airflow, XCom is implemented as a key-value
—telling Task B exactly which file Task A just finished processing. Are you looking to implement Custom XCom Backends to store larger data in S3, or are you troubleshooting a specific pull/push error XComs — Airflow 3.2.0 Documentation This is distinct from passing data between functions